Here is a working version. There are a few edits that I made. Please compare this to what you had. Personally, I think 30 fps is slow; I normally use 60 fps, but in this case 60 is too fast.
`HP system "loop"
`Garrett Minley April, 15, 2008
sync on : sync rate 30
hide mouse
`"Character stats"
MaxHP=1000
HP$="HP: "
HP=MaxHP
Def=150
`Your Hit rate
Hit=Att - (Def / 2)
`"Your attack power"
Att=200
do
GoSub HPsystem
sync
loop
`-GAME MECHANICS-
HPsystem:
`If the down key is pressed, decrease HP
if downkey()=1;
hit = Att - (Def / 2)
DEC HP, hit
`If HP is less than 0, HP equals 0
if HP < 0 then HP = 0
endif
`If the up arrow key is pressed, increase HP
if upkey()=1
heal= (MaxHP * 30) / 100
INC HP, heal
`If HP is more/greater than MaxHP, HP equals MaxHP
if HP > MaxHP then HP= MaxHP
endif
cls
text 0,0,"HP:"+str$(HP)
return
Quote: "Sorry for being such a noob "
We all had to learn and there is no reason to apologize for being new. The problems enter in when a newbie disregards/doesn't read the AUP and/or stickies and does exactly what they were instructed no to.
Quote: "1) "repeat" needs the "while" command"
Actually, it's REPEAT - UNTIL, he he

you can also use WHILE - ENDWHILE. In your code, you jumped to the subroutine and then coded repeat without an until. You really didn't need the repeat there, as your code repeatedly goes to the subroutine. I would strongly advise against coding a repeat - until loop waiting for input from the user for most games, as there likely will be other things happening in your game once it is more developed. For example, if you are moving some shots across the screen, they would stop while waiting for the user to press a key. The rest of the things you can probably figure out on your own - if you have more questions, just post [caution: learn to use the search button and be prepared to look diligently to find answers before you post - otherwise you may get flamed.]
Hope this helps,
LBFN