Thanks for the help, I'm not very good at editing scripts, but my friend helped me complete this script
void main()
{
void self = getlocalvar("self");
void Dir = getentityproperty(self, "direction");
void vAniID = getentityproperty(self,"animationID");
int b =...