Help me stop it pls ;)

Hi I want stop my ship when the range = 100 and stop the range increasig when the ship is not moving:crazy:… please help me