CREATESPRITE 1, "BG"MOVESPRITE 1,0,0CREATESPRITE 2, "Ship"MOVESPRITE 2,100,CREATESPRITE 3, "UFO"MOVESPRITE 3, 700, random(300)CREATESPRITE 4, "UFO"MOVESPRITE 4, 700, random(300)CREATESPRITE 5, "UFO"MOVESPRITE 5, 700, random(300)ON TIMER (3) PUSHSPRITE 1, -2,0 PUSHSPRITE 3, -5,0 PUSHSPRITE 4, -5,0 PUSHSPRITE 5, -5,0END TIMER
IF key$ = uparrow$ THEN PUSHSPRITE 2,0,-7END IFIF key$ = downarrow$ THEN PUSHSPRITE 2,0,7END IFIF key$ = leftarrow$ THEN PUSHSPRITE 2,-7,0END IFIF key$ = rightarrow$ THEN PUSHSPRITE 2,7,0END IF
FOR x = 1 to 4IF spritevalid(x) = TRUE THENPushsprite x, -5, 0END IFNEXT
CREATESPRITE 1, "UFO"CREATESPRITE 2, "UFO"CREATESPRITE 3, "UFO"CREATESPRITE 4, "UFO"CREATESPRITE 6, "BG"MOVESPRITE 6,0,0CREATESPRITE 5, "Ship"MOVESPRITE 5, 50, 180FOR x = 1 TO 4 IF SPRITEVALID(x) = TRUE THEN MOVESPRITE x, 700, random(300) END IFNEXTON TIMER (3) PUSHSPRITE 6, -2,0END TIMER