I will not deliver you any code (Cause I think it's necessary to figure out coding on your own).
Try making the move itself cost 0 mp but spawning a ball (at y: 5000 for example) that damages the player for the amount of hp you want to drain. The Player itself is given a body at y: 5000.
I don't exactly remember if players can get hit by self-spawned balls but the alternative is creating a clone at a certain state (Basically just a frame where he spawns the ball) and then deleting that clone.
Good luck with your coding.
Edit:
How could I forget about that?
Facepalm.
Try making the move itself cost 0 mp but spawning a ball (at y: 5000 for example) that damages the player for the amount of hp you want to drain. The Player itself is given a body at y: 5000.
I don't exactly remember if players can get hit by self-spawned balls but the alternative is creating a clone at a certain state (Basically just a frame where he spawns the ball) and then deleting that clone.
Good luck with your coding.
Edit:
How could I forget about that?
Facepalm.