You'll have to check "if (HP<=0);" every frame. Right now it checks it one time, (unless the frame with the condition is played several times) when you've just set HP to 100.
Instead either use a frame loop, or put the condition into an onEnterFrame, e.g.
i put the HP=100 on my first frame, and so is the HP<=0
now when i attack, it goes to frame 3 and reduces HP by 5
after that attck, it goes back again to my first frame
so, maybe its just my scripting?
Wouldn't that put your HP back at 100 since you set it to 100 on the same frame as your condition. So your HP would go; 100 then 95 then 100 again, then 95 etc...