press Z and time it well you can use it in your games just give credit (I didn't do research so sorry if its not accurate, I haven't seen the real one in a bit)
-undertale might make a full fledged battle engine if I feel like it https://scratch.mit.edu/projects/1071308000/