IF loopscript = 0 THEN LET movex = -300 LET money = -300 SPRITE 1 -300 -300 $star$$ SPRITE 3 285 130 $ship$$ ON KEYDOWN IF keydown$ = "UPARROW" THEN SPRITE -3 285 130 $shipup$$ IF moveyspeed < 40 THEN LET moveyspeed = moveyspeed + 3 END IF IF keydown$ = "DOWNARROW" THEN SPRITE -3 285 130 $shipdown$$ IF moveyspeed > -40 THEN LET moveyspeed = moveyspeed - 3 END IF IF keydown$ = "LEFTARROW" THEN SPRITE -3 285 130 $shipleft$$ IF movexspeed < 40 THEN LET movexspeed = movexspeed + 3 END IF IF keydown$ = "RIGHTARROW" THEN SPRITE -3 285 130 $shipright$$ IF movexspeed > -40 THEN LET movexspeed = movexspeed - 3 END IF IF keydown$ = "w" THEN movexspeed = 0 moveyspeed = 0 END IF END KEYDOWN ELSE LET movex = movex + movexspeed LET movey = moveY + moveyspeed IF movex < -360 THEN movex = movex + 300 END IF IF movey < -360 THEN movey = movey + 300 END IF IF movex > -41 THEN movex = movex - 300 END IF IF movey > -41 THEN movey = movey - 300 END IF SPRITE 1 movex movey END IF
LET movex = -300LET moveY = -300SPRITE 1 -300 -300 $star$$SPRITE 3 285 130 $ship$$ON KEYDOWNIF keydown$ = "UPARROW" THEN SPRITE -3 285 130 $shipup$$ IF moveyspeed < 40 THEN LET moveyspeed = moveyspeed + 3END IFIF keydown$ = "DOWNARROW" THEN SPRITE -3 285 130 $shipdown$$ IF moveyspeed > -40 THEN LET moveyspeed = moveyspeed - 3END IFIF keydown$ = "LEFTARROW" THEN SPRITE -3 285 130 $shipleft$$ IF movexspeed < 40 THEN LET movexspeed = movexspeed + 3END IFIF keydown$ = "RIGHTARROW" THEN SPRITE -3 285 130 $shipright$$ IF movexspeed > -40 THEN LET movexspeed = movexspeed - 3END IFIF keydown$ = "W" THEN movexspeed = 0 moveyspeed = 0END IFkeydown$ = ""ON TIMER 2LET movex = movex + movexspeedLET movey = movey + moveyspeedIF movex < -360 THEN movex = movex + 300IF movey < -360 THEN movey = movey + 300IF movex > -41 THEN movex = movex - 300IF movey > -41 THEN movey = movey - 300SPRITE 1 movex moveyEND TIMEREND KEYDOWNIF y = 0 THENy = 1END IF