To cause the player to start spinning, run this script (either via an event, or your own JS script):
The first number indicates how many times the player will turn 90 degrees per second. A value of 20 (as in the above example), means that the player will rotate 90 degrees 20 times - 5 full rotations - in 1 second.
The second number indicates the duration for which the player should spin, in frames. There are 60 frames per second, so a value of 60 (as in the above example), means that the player will stop spinning after 1 second.
Additionally, the second number is optional! If left out, the player will spin forever!
Not to worry: you can stop the player from spinning at any time:
Finally, you can test whether or not the player is currently spinning in a Conditional Branch within an event. Use the "Script" option (on the last tab), and enter: