Add a global variable rotation
on space pressed
system set rotation = 1-rotation
system compare two values : rotation = 1
sprite rotate clockwise
system compare two values : rotation = 0
sprite rotate counter clockwise
You could ofcourse also do this by toggling a boolean instance variable..
or using an instance variable as above..