Is it possible to script it like this:

If it is rotating, and you press a button: That it will slowly rotate to the starting point. So it will stop rotating at 360 degrees?

If yes, how ?