Hey wait Bro...

You can't have two MY.EVENT functions, but only one.
Just use one, then use variables to determine what you want to do once it enters that function.

Oh, and why is there a break; at the start of the while loop?
Btw, you don't need this code below in a while loop.
my.enable_entity=on;
my.enable_impact=on;
MY.EVENT=headhit;
Put that code before the while loop. Just put your movement or sounnds or whatever in that loop.
