you need to put the part where you draw the health box in the main loop You will need to put a sync rate in to stop it flashing when you redraw it. Also the code is working but you need to clear the old health box before you draw the new one:
`Your Health
Health = 100
SYNC ON : SYNC RATE 30
`Loop
do
ohealth# = Health
`press down click to lower health
if downkey()=1 then Health=Health-10
`press right to lower health
if upkey()=1 then Health=Health+10
` check if health is different
IF ohealth#<>Health
`clear old health bar
INK RGB(0,0,0),RGB(0,0,0)
BOX 1,5,ohealth#,15
`draw new health bar
INK RGB(0,255,0),RGB(0,0,0)
BOX 1,5,Health,15
ENDIF
SYNC
loop
hope this helps
I should have changed my signature when asked