DECLARE SUB meteor3 (mx3%, my3%)
DECLARE SUB meteor3erase (mx3%, my3%)
DECLARE SUB meteor2erase (mx2%, my2%)
DECLARE SUB meteor2 (mx2%, my2%)
DECLARE SUB nextlevel (mx2%, my2%, mx%, my%)
DECLARE SUB meteorerase (mx%, my%)
DECLARE SUB meteor (mx%, my%)
DECLARE SUB bullet (bx%, by%)
DECLARE SUB spaceship (x%)
DECLARE SUB erasespaceship (x%)
DECLARE SUB titlepage (choice%)
scorecount% = 0
deathcount% = 5
SCREEN 12
LOCATE 15, 30
SLEEP 2
RANDOMIZE TIMER
CALL titlepage(choice%)
CLS
mx% = INT(RND * 600) + 15
my% = -20
mx2% = INT(RND * 600) + 15
my2% = -20
mx3% = INT(RND * 600) + 15
my3% = -20
x% = 280
by% = 322
bx% = x% + 31
LINE (0, 400)-(640, 480), 2, BF
CALL spaceship(x%)
shootcount% = 1
DO
DO


CALL meteor(mx%, my%)
key$ = INKEY$
CALL spaceship(x%)

IF key$ = "p" THEN
scorecount% = scorecount% + 5
END IF

IF scorecount% > 10 THEN
CALL meteor2(mx2%, my2%)
END IF

IF scorecount% > 40 THEN
CALL meteor3(mx3%, my3%)
END IF

IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF

IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF

CALL erasespaceship(x%)
CALL meteorerase(mx%, my%)

IF scorecount% > 10 THEN
CALL meteor2erase(mx2%, my2%)
END IF

IF scorecount% > 40 THEN
CALL meteor3erase(mx3%, my3%)
END IF

IF my% > 400 THEN
my% = -20
deathcount% = deathcount% - 1
ELSEIF my2% > 400 THEN
my2% = -20
deathcount% = deathcount% - 1
ELSEIF my3% > 400 THEN
my3% = -20
deathcount% = deathcount% - 1
END IF
IF scorecount% > 150 THEN

CLS


'*****LOOK HERE!!*****
SCREEN 12
PAINT (1, 1), 1
'stars
 FOR i% = 1 TO 500
 x% = INT(RND * 640) + 1
 y% = INT(RND * 480) + 1
 r% = INT(RND * 3) + 1
 IF r% = 1 THEN
   colorr% = 14
 ELSEIF r% = 2 THEN
   colorr% = 15
 ELSE
   colorr% = 12
 END IF
 PSET (x%, y%), colorr%
 NEXT i%


LINE (0, 345)-(72, 292), 0
LINE (72, 292)-(95, 302), 0
LINE (95, 302)-(120, 267), 0
LINE (120, 267)-(174, 232), 0
LINE (174, 232)-(217, 223), 0
LINE (217, 223)-(265, 229), 0
LINE (265, 229)-(305, 262), 0
LINE (305, 262)-(300, 284), 0
LINE (300, 284)-(305, 346), 0
LINE (305, 346)-(294, 377), 0
LINE (294, 377)-(278, 480), 0
LINE (305, 262)-(320, 397), 0
LINE (320, 397)-(325, 422), 0
LINE (325, 422)-(320, 425), 0
LINE (320, 425)-(327, 480), 0
PAINT (176, 360), 2, 0
PAINT (304, 420), 6, 0
CIRCLE (176, 135), 15, 0
LINE (167, 123)-(215, 103), 0
LINE (215, 103)-(210, 110), 0
LINE (210, 110)-(258, 96), 0
LINE (258, 96)-(238, 114), 0
LINE (238, 114)-(264, 105), 0
LINE (264, 105)-(225, 123), 0
LINE (225, 123)-(248, 120), 0
LINE (248, 120)-(208, 138), 0
LINE (208, 138)-(220, 136), 0
LINE (220, 136)-(180, 150), 0
LINE (177, 120)-(200, 115), 0
LINE (200, 115)-(200, 120), 0
LINE (200, 120)-(230, 111), 0
LINE (230, 111)-(230, 115), 0
LINE (230, 115)-(210, 125), 0
LINE (210, 125)-(220, 125), 0
LINE (220, 125)-(195, 135), 0
LINE (195, 135)-(205, 136), 0
LINE (205, 136)-(187, 145), 0
LINE (183, 122)-(198, 123), 0
LINE (198, 123)-(186, 148), 0
PAINT (193, 129), 11, 0
PAINT (240, 105), 14, 0
PAINT (176, 135), 4, 0
PAINT (208, 120), 12, 0
PSET (178, 130), 12
PSET (179, 131), 12
PSET (185, 132), 12
CIRCLE (189, 132), 2, 12
PSET (189, 132), 12
PSET (170, 130), 12
CIRCLE (490, 80), 50, 0, 4.3, 2
CIRCLE (450, 80), 50, 0, 5.15, 1.15
PAINT (501, 80), 14, 0
LINE (368, 480)-(448, 390), 6, BF
LINE (368, 390)-(384, 374), 6
LINE (384, 374)-(464, 374), 6
LINE (464, 374)-(448, 390), 6
LINE (464, 374)-(464, 480), 6
PAINT (416, 380), 6, 6
PAINT (451, 420), 6, 6
LINE (368, 390)-(448, 390), 0
LINE (448, 390)-(464, 374), 0
LINE (448, 390)-(448, 480), 0
LINE (465, 420)-(528, 480), 0, B
PAINT (496, 450), 7, 0
LINE (465, 420)-(495, 390), 0
LINE (495, 390)-(559, 390), 0
LINE (559, 390)-(529, 420), 0
LINE (559, 390)-(559, 454), 0
LINE (528, 480)-(640, 390), 0
PAINT (512, 405), 7, 0
PAINT (544, 435), 7, 0
LINE (383, 405)-(375, 419), 14, BF
LINE (403, 405)-(395, 419), 14, BF
LINE (423, 405)-(415, 419), 0, BF
LINE (443, 405)-(435, 419), 14, BF
LINE (383, 430)-(375, 444), 0, BF
LINE (403, 430)-(395, 444), 0, BF
LINE (423, 430)-(415, 444), 0, BF
LINE (443, 430)-(435, 444), 14, BF
LINE (383, 455)-(375, 469), 0, BF
LINE (403, 455)-(395, 469), 14, BF
LINE (423, 455)-(415, 469), 14, BF
LINE (443, 455)-(435, 469), 0, BF
LINE (480, 450)-(512, 480), 4, BF
LINE (496, 450)-(496, 480), 0
COLOR 11
LOCATE 28, 61
PRINT "STORE"
REM ************************buddy

CIRCLE (190, 270), 13, 15
CIRCLE (190, 300), 25, 15, 2.2, .9, 2
PAINT (190, 300), 4, 15
REM**********************buddy's legs
LINE (179, 313)-(200, 313), 15
CIRCLE (197, 327), 20, 15, 3, 1, 3
CIRCLE (183, 327), 20, 15, 2.4, .1, 3
PAINT (197, 327), 1, 15
PAINT (183, 327), 1, 15
PAINT (185, 315), 1, 15
CIRCLE (179, 345), 7, 15, , , .6
CIRCLE (200, 346), 7, 15, , , .6
PAINT (179, 345), 15, 15
PAINT (205, 345), 15, 15
PAINT (197, 345), 15, 15
PAINT (183, 344), 15, 15
REM*********************bench
LINE (576, 480)-(640, 428), 0
PAINT (592, 435), 0, 0
PAINT (624, 465), 10, 0
LINE (144, 285)-(160, 345), 6, BF
LINE (224, 285)-(240, 345), 6, BF
CIRCLE (152, 285), 8, 6
CIRCLE (232, 285), 8, 6
LINE (160, 290)-(224, 295), 0, BF
LINE (160, 300)-(224, 305), 0, BF
LINE (160, 310)-(224, 315), 0, BF
LINE (160, 320)-(224, 330), 4, BF
PAINT (152, 284), 0, 6
PAINT (232, 284), 0, 6
REM ****************BENCH GRASS
LINE (160, 345)-(165, 340), 0
LINE (160, 345)-(160, 340), 0
LINE (160, 345)-(155, 340), 0
LINE (155, 345)-(150, 340), 0
LINE (155, 345)-(160, 340), 0
LINE (155, 345)-(155, 340), 0
LINE (150, 345)-(155, 340), 0
LINE (150, 345)-(150, 340), 0
LINE (150, 345)-(145, 340), 0
LINE (145, 345)-(150, 340), 0
LINE (145, 345)-(145, 340), 0
LINE (145, 345)-(140, 340), 0
'right side
LINE (240, 345)-(245, 340), 0
LINE (240, 345)-(240, 340), 0
LINE (240, 345)-(235, 340), 0
LINE (235, 345)-(240, 340), 0
LINE (235, 345)-(235, 340), 0
LINE (235, 345)-(230, 340), 0
LINE (230, 345)-(235, 340), 0
LINE (230, 345)-(230, 340), 0
LINE (230, 345)-(225, 340), 0
LINE (225, 345)-(230, 340), 0
LINE (225, 345)-(225, 340), 0
LINE (225, 345)-(220, 340), 0
REM***********************buddy's arms
CIRCLE (205, 285), 15, 15, , , .3
CIRCLE (175, 285), 15, 15, , , .3
CIRCLE (155, 285), 5, 15
CIRCLE (225, 285), 5, 15
PAINT (205, 285), 4, 15
PAINT (175, 285), 4, 15
PAINT (155, 285), 14, 15
PAINT (225, 285), 14, 15
LINE (177, 283)-(205, 289), 4, BF
REM****************************buddy's head
CIRCLE (190, 270), 13, 15
PAINT (190, 270), 14, 15
CIRCLE (190, 270), 15, 6, .1, 3.14
PSET (175, 270), 6
PSET (205, 270), 6
LINE (175, 270)-(205, 270), 6
PAINT (190, 265), 1, 6
LINE (175, 270)-(180, 275), 6
LINE (180, 275)-(185, 270), 6
LINE (185, 270)-(190, 275), 6
LINE (190, 275)-(195, 270), 6
LINE (195, 270)-(200, 275), 6
LINE (200, 275)-(205, 270), 6
PAINT (179, 272), 6, 6
PAINT (189, 272), 6, 6
PAINT (199, 272), 6, 6
CIRCLE (190, 270), 13, 6
PAINT (190, 280), 6, 6
CIRCLE (190, 270), 13, 1, , , .5
PAINT (190, 275), 1, 1
CIRCLE (190, 255), 5, 15
PAINT (190, 255), 1, 15

 FOR i% = 1 TO 15
 x% = INT(RND * 220) - 100
 y% = INT(RND * 150)

REM ***************************GRASS
LINE (x% + 160, 345 + y%)-(x% + 165, 340 + y%), 0
LINE (x% + 160, 345 + y%)-(x% + 160, 340 + y%), 0
LINE (x% + 160, 345 + y%)-(x% + 155, 340 + y%), 0
LINE (x% + 155, 345 + y%)-(x% + 150, 340 + y%), 0
LINE (x% + 155, 345 + y%)-(x% + 160, 340 + y%), 0
LINE (x% + 155, 345 + y%)-(x% + 155, 340 + y%), 0
LINE (x% + 150, 345 + y%)-(x% + 155, 340 + y%), 0
LINE (x% + 150, 345 + y%)-(x% + 150, 340 + y%), 0
LINE (x% + 150, 345 + y%)-(x% + 145, 340 + y%), 0
LINE (x% + 145, 345 + y%)-(x% + 150, 340 + y%), 0
LINE (x% + 145, 345 + y%)-(x% + 145, 340 + y%), 0
LINE (x% + 145, 345 + y%)-(x% + 140, 340 + y%), 0
                  NEXT i%
REM ****SPEACE SHIP
CIRCLE (550, 300), 50, 15, , , .3
LINE (500, 295)-(600, 305), 15, BF
CIRCLE (550, 315), 10, 15, 3.14, 6.2
CIRCLE (550, 300), 4, 4
PAINT (550, 300), 4, 4
CIRCLE (535, 300), 4, 13
PAINT (535, 300), 13, 13
CIRCLE (565, 300), 4, 13
PAINT (565, 300), 13, 13
CIRCLE (520, 300), 4, 12
PAINT (520, 300), 12, 12
CIRCLE (580, 300), 4, 12
PAINT (580, 300), 12, 12
CIRCLE (505, 300), 4, 10
PAINT (505, 300), 10, 10
CIRCLE (595, 300), 4, 10
PAINT (595, 300), 10, 10
PAINT (550, 290), 7, 15
PAINT (550, 310), 7, 15
PAINT (550, 317), 7, 15
SLEEP 3
LOCATE 1, 1
PRINT "CONGRATULATIONS!!! YOU WON!!"
SLEEP 3
LOCATE 1, 1
PRINT "A happy ending, Thanks to you brave soldier."
SLEEP 3
CLS
SCREEN 12
PRINT "Special thanks to:"
PRINT "Jeff Doherty (he inspired the `how many hits earth can take' thing"
PRINT "Greg Brisbois (he made me laugh and distracted me)"
PRINT "Shawn Trahan (he was attracted to me)"
PRINT "And finally.... Ms. Duffy!! She helped me realize the meaning of life."
PRINT "Thanks guys!"

END


END IF
IF deathcount% = 0 THEN
CLS
FOR i% = 1 TO 100
c% = INT(RND * 14)
PAINT (1, 1), c%
NEXT i%
SCREEN 13
LOCATE 10, 10
COLOR 12
PRINT "YOU LET EARTH BLOW UP!!"
SLEEP 2
CLS
SCREEN 12
PRINT "Special thanks to:"
PRINT "Jeff Doherty (he inspired the `how many hits earth can take' thing"
PRINT "Greg Brisbois (he made me laugh and distracted me)"
PRINT "Shawn Trahan (he was attracted to me)"
PRINT "And finally.... Ms. Duffy!! She helped me realize the meaning of life."
PRINT "Thanks guys!"
END
CALL meteor(mx%, my%)

IF scorecount% > 10 THEN
CALL meteor2(mx2%, my2%)
END IF

IF scorecount% > 40 THEN
CALL meteor3(mx2%, my2%)
END IF

END IF

IF key$ = "4" AND x% > 15 THEN
x% = x% - 40
ELSEIF key$ = "6" AND x% < 570 THEN
x% = x% + 40
END IF


IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
END IF

IF shoot1$ = "yes" THEN
 by% = by% - 10
END IF

IF shoot2$ = "yes" THEN
 by2% = by2% - 10
END IF

IF shoot3$ = "yes" THEN
 by3% = by3% - 10
END IF

IF shoot4$ = "yes" THEN
 by4% = by4% - 10
END IF
IF shoot5$ = "yes" THEN
 by5% = by5% - 10
END IF

LOCATE 1, 1
PRINT "SCORE: "; scorecount%
PRINT "HOW MANY MORE HITS THE EARTH CAN TAKE: "; deathcount%

IF ABS(bx% - mx%) < 50 AND ABS(by% - my% - 5) < 10 THEN

scorecount% = scorecount% + 1
IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF

IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF

IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
 END IF

CALL spaceship(x%)
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx%, my%), r%, 4
FOR moredelay% = 1 TO 10
FOR delay% = 1 TO 1000
NEXT delay%
NEXT moredelay%
r% = r% + 1
NEXT i%
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx%, my%), r%, 0
r% = r% + 1
CALL meteor2(mx2%, my2%)
NEXT i%
CALL meteorerase(mx%, my%)
mx% = INT(RND * 600) + 15
my% = 0
ELSEIF ABS(bx2% - mx%) < 50 AND ABS(by2% - my% - 5) < 10 THEN
scorecount% = scorecount% + 1
IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF

IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF

IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
 END IF
CALL spaceship(x%)
r% = 1
FOR i% = 1 TO 25

CIRCLE (mx%, my%), r%, 4
FOR moredelay% = 1 TO 10
FOR delay% = 1 TO 1000
NEXT delay%
NEXT moredelay%
r% = r% + 1
NEXT i%
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx%, my%), r%, 0
r% = r% + 1
CALL meteor2(mx2%, my2%)
NEXT i%
CALL meteorerase(mx%, my%)
mx% = INT(RND * 600) + 15
my% = 0
ELSEIF ABS(bx3% - mx%) < 50 AND ABS(by3% - my% - 5) < 10 THEN
scorecount% = scorecount% + 1
IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF

IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF
IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
 END IF

CALL spaceship(x%)
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx%, my%), r%, 4
FOR moredelay% = 1 TO 10
FOR delay% = 1 TO 1000
NEXT delay%
NEXT moredelay%
r% = r% + 1
NEXT i%
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx%, my%), r%, 0
r% = r% + 1
CALL meteor2(mx2%, my2%)
NEXT i%
CALL meteorerase(mx%, my%)
mx% = INT(RND * 600) + 15
my% = 0
ELSEIF ABS(bx4% - mx%) < 50 AND ABS(by4% - my% - 5) < 10 THEN
scorecount% = scorecount% + 1
IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF
IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF
IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
 END IF

CALL spaceship(x%)
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx%, my%), r%, 4
FOR moredelay% = 1 TO 10
FOR delay% = 1 TO 1000
NEXT delay%
NEXT moredelay%
r% = r% + 1
NEXT i%
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx%, my%), r%, 0
r% = r% + 1
CALL meteor2(mx2%, my2%)
NEXT i%
CALL meteorerase(mx%, my%)
mx% = INT(RND * 600) + 15
my% = 0
ELSEIF ABS(bx5% - mx%) < 50 AND ABS(by5% - my% - 5) < 10 THEN
scorecount% = scorecount% + 1
IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF

IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF
IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
 END IF

CALL spaceship(x%)
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx%, my%), r%, 4
FOR moredelay% = 1 TO 10
FOR delay% = 1 TO 1000
NEXT delay%
NEXT moredelay%
r% = r% + 1
NEXT i%
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx%, my%), r%, 0
r% = r% + 1
CALL meteor2(mx2%, my2%)
NEXT i%
CALL meteorerase(mx%, my%)
mx% = INT(RND * 600) + 15
my% = 0
END IF
IF ABS(bx% - mx2%) < 50 AND ABS(by% - my2% - 5) < 10 THEN
scorecount% = scorecount% + 1
IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF

IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF
IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
 END IF

CALL spaceship(x%)
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx2%, my2%), r%, 4
FOR moredelay% = 1 TO 10
FOR delay% = 1 TO 1000
NEXT delay%
NEXT moredelay%
r% = r% + 1
NEXT i%
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx2%, my2%), r%, 0
r% = r% + 1
CALL meteor(mx%, my%)

NEXT i%
IF scorecount% > 10 THEN
CALL meteor2erase(mx2%, my2%)
END IF
mx2% = INT(RND * 600) + 15
my2% = 0
ELSEIF ABS(bx2% - mx2%) < 50 AND ABS(by2% - my2% - 5) < 10 THEN
scorecount% = scorecount% + 1
IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF

IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF

IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
 END IF
CALL spaceship(x%)
r% = 1
FOR i% = 1 TO 25

CIRCLE (mx2%, my2%), r%, 4
FOR moredelay% = 1 TO 10
FOR delay% = 1 TO 1000
NEXT delay%
NEXT moredelay%
r% = r% + 1
NEXT i%
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx2%, my2%), r%, 0
r% = r% + 1
CALL meteor(mx%, my%)
NEXT i%
IF scorecount% > 10 THEN
CALL meteor2erase(mx2%, my2%)
END IF
mx2% = INT(RND * 600) + 15
my2% = 0
ELSEIF ABS(bx3% - mx2%) < 50 AND ABS(by3% - my2% - 5) < 10 THEN
scorecount% = scorecount% + 1
IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF

IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF
IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
 END IF

CALL spaceship(x%)
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx2%, my2%), r%, 4
FOR moredelay% = 1 TO 10
FOR delay% = 1 TO 1000
NEXT delay%
NEXT moredelay%
r% = r% + 1
NEXT i%
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx2%, my2%), r%, 0
r% = r% + 1
CALL meteor(mx%, my%)
NEXT i%
IF scorecount% > 10 THEN
CALL meteor2erase(mx2%, my2%)
END IF
mx2% = INT(RND * 600) + 15
my2% = 0
ELSEIF ABS(bx4% - mx2%) < 50 AND ABS(by4% - my2% - 5) < 10 THEN
scorecount% = scorecount% + 1
IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF

IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF
IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
 END IF

CALL spaceship(x%)
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx2%, my2%), r%, 4
FOR moredelay% = 1 TO 10
FOR delay% = 1 TO 1000
NEXT delay%
NEXT moredelay%
r% = r% + 1
NEXT i%
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx2%, my2%), r%, 0
r% = r% + 1
CALL meteor(mx%, my%)
NEXT i%
IF scorecount% > 10 THEN
CALL meteor2erase(mx2%, my2%)
END IF
mx2% = INT(RND * 600) + 15
my2% = 0
ELSEIF ABS(bx5% - mx2%) < 50 AND ABS(by5% - my2% - 5) < 10 THEN
scorecount% = scorecount% + 1
IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF

IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF
IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
 END IF

CALL spaceship(x%)
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx2%, my2%), r%, 4
FOR moredelay% = 1 TO 10
FOR delay% = 1 TO 1000
NEXT delay%
NEXT moredelay%
r% = r% + 1
NEXT i%
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx2%, my2%), r%, 0
r% = r% + 1
CALL meteor(mx%, my%)
NEXT i%
IF scorecount% > 10 THEN
CALL meteor2erase(mx2%, my2%)
END IF
mx2% = INT(RND * 600) + 15
my2% = 0
END IF


IF ABS(bx% - mx3%) < 50 AND ABS(by% - my3% - 5) < 10 THEN
scorecount% = scorecount% + 1
IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF

IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF
IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
 END IF

CALL spaceship(x%)
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx3%, my3%), r%, 4
FOR moredelay% = 1 TO 10
FOR delay% = 1 TO 1000
NEXT delay%
NEXT moredelay%
r% = r% + 1
NEXT i%
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx2%, my2%), r%, 0
r% = r% + 1
CALL meteor(mx%, my%)
CALL meteor2(mx2%, my2%)
NEXT i%
IF scorecount% > 40 THEN
CALL meteor3erase(mx3%, my3%)
END IF
mx3% = INT(RND * 600) + 15
my3% = 0
ELSEIF ABS(bx2% - mx3%) < 50 AND ABS(by2% - my3% - 5) < 10 THEN
scorecount% = scorecount% + 1
IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF

IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF

IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
 END IF
CALL spaceship(x%)
r% = 1
FOR i% = 1 TO 25

CIRCLE (mx3%, my3%), r%, 4
FOR moredelay% = 1 TO 10
FOR delay% = 1 TO 1000
NEXT delay%
NEXT moredelay%
r% = r% + 1
NEXT i%
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx3%, my3%), r%, 0
r% = r% + 1
CALL meteor(mx%, my%)
CALL meteor2(mx2%, my2%)
NEXT i%
IF scorecount% > 40 THEN
CALL meteor3erase(mx3%, my3%)
END IF
mx3% = INT(RND * 600) + 15
my3% = 0
ELSEIF ABS(bx3% - mx3%) < 50 AND ABS(by3% - my3% - 5) < 10 THEN
scorecount% = scorecount% + 1
IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF

IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF
IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
 END IF

CALL spaceship(x%)
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx3%, my3%), r%, 4
FOR moredelay% = 1 TO 10
FOR delay% = 1 TO 1000
NEXT delay%
NEXT moredelay%
r% = r% + 1
NEXT i%
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx3%, my3%), r%, 0
r% = r% + 1
CALL meteor(mx%, my%)
CALL meteor2(mx2%, my2%)
NEXT i%
IF scorecount% > 40 THEN
CALL meteor3erase(mx3%, my3%)
END IF
mx3% = INT(RND * 600) + 15
my3% = 0
ELSEIF ABS(bx4% - mx3%) < 50 AND ABS(by4% - my3% - 5) < 10 THEN
scorecount% = scorecount% + 1
IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF

IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF
IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
 END IF

CALL spaceship(x%)
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx3%, my3%), r%, 4
FOR moredelay% = 1 TO 10
FOR delay% = 1 TO 1000
NEXT delay%
NEXT moredelay%
r% = r% + 1
NEXT i%
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx3%, my3%), r%, 0
r% = r% + 1
CALL meteor(mx%, my%)
CALL meteor2(mx2%, my2%)
NEXT i%
IF scorecount% > 40 THEN
CALL meteor3erase(mx3%, my3%)
END IF
mx3% = INT(RND * 600) + 15
my3% = 0
ELSEIF ABS(bx5% - mx3%) < 50 AND ABS(by5% - my3% - 5) < 10 THEN
scorecount% = scorecount% + 1
IF shoot1$ = "yes" THEN
 CIRCLE (bx%, by%), 5, 15
END IF

IF shoot2$ = "yes" THEN
 CIRCLE (bx2%, by2%), 5, 6
END IF

IF shoot3$ = "yes" THEN
 CIRCLE (bx3%, by3%), 5, 10
END IF

IF shoot4$ = "yes" THEN
 CIRCLE (bx4%, by4%), 5, 11
END IF

IF shoot5$ = "yes" THEN
 CIRCLE (bx5%, by5%), 5, 12
END IF

start! = TIMER
DO
LOOP UNTIL TIMER - start! > .01

IF shoot1$ = "yes" THEN
CIRCLE (bx%, by%), 5, 0
END IF

IF shoot2$ = "yes" THEN
CIRCLE (bx2%, by2%), 5, 0
END IF

IF shoot3$ = "yes" THEN
CIRCLE (bx3%, by3%), 5, 0
END IF

IF shoot4$ = "yes" THEN
CIRCLE (bx4%, by4%), 5, 0
END IF

IF shoot5$ = "yes" THEN
CIRCLE (bx5%, by5%), 5, 0
END IF
IF key$ = "5" THEN
 IF shootcount% = 1 THEN
      shoot1$ = "yes"
      by% = 322
      bx% = x% + 31
      shootcount% = 2
 ELSEIF shootcount% = 2 THEN
      shoot2$ = "yes"
      by2% = 322
      bx2% = x% + 31
      shootcount% = 3
 ELSEIF shootcount% = 3 THEN
      shoot3$ = "yes"
      by3% = 322
      bx3% = x% + 31
      shootcount% = 4
 ELSEIF shootcount% = 4 THEN
      shoot4$ = "yes"
      by4% = 322
      bx4% = x% + 31
      shootcount% = 5
 ELSEIF shootcount% = 5 THEN
      shoot5$ = "yes"
      by5% = 322
      bx5% = x% + 31
      shootcount% = 1
 END IF
 END IF

CALL spaceship(x%)
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx3%, my3%), r%, 4
FOR moredelay% = 1 TO 10
FOR delay% = 1 TO 1000
NEXT delay%
NEXT moredelay%
r% = r% + 1
NEXT i%
r% = 1
FOR i% = 1 TO 25
CIRCLE (mx3%, my3%), r%, 0
r% = r% + 1
CALL meteor(mx%, my%)
CALL meteor2(mx2%, my2%)
NEXT i%
IF scorecount% > 40 THEN
CALL meteor3erase(mx3%, my3%)
END IF
mx3% = INT(RND * 600) + 15
my3% = 0
END IF
LOOP UNTIL key$ = "q" OR key$ = "Q"
LOOP UNTIL key$ = "q" OR key$ = "Q"
CALL spaceship(x%)

SUB bullet (bx%, by%)
FOR i% = 1 TO 20
start! = TIMER
DO
LOOP UNTIL TIMER - start! > .1
CIRCLE (bx%, by%), 5, 0
by% = by% - 5
NEXT i%
END SUB

SUB erasespaceship (x%)
LINE (x%, 399)-STEP(15, 0), 0
LINE STEP(0, 0)-STEP(0, -15), 0
LINE STEP(0, 0)-STEP(10, -10), 0
LINE STEP(0, 0)-STEP(0, 15), 0
LINE STEP(0, 0)-STEP(15, 0), 0
LINE STEP(0, 0)-STEP(0, -15), 0
LINE STEP(0, 0)-STEP(10, 10), 0
LINE STEP(0, 0)-STEP(0, 15), 0
LINE STEP(0, 0)-STEP(15, 0), 0
LINE STEP(0, 0)-STEP(0, -20), 0
LINE STEP(0, 0)-STEP(-23, -23), 0
LINE STEP(0, 0)-STEP(0, -20), 0
LINE STEP(0, 0)-STEP(-10, -5), 0
LINE STEP(0, 0)-STEP(-10, 5), 0
LINE STEP(0, 0)-STEP(0, 20), 0
LINE STEP(0, 0)-STEP(-22, 22), 0
LINE STEP(0, 0)-STEP(0, 20), 0
PAINT STEP(5, 0), 0, 0

END SUB

SUB meteor (mx%, my%)
PSET (mx%, my% - 5), 16
LINE (mx%, my%)-STEP(10, -10), 16
LINE STEP(0, 0)-STEP(15, 5), 16
LINE STEP(0, 0)-STEP(10, -10), 16
LINE STEP(0, 0)-STEP(-5, -10), 16
LINE STEP(0, 0)-STEP(0, -10), 16
LINE STEP(0, 0)-STEP(-5, -15), 16
LINE STEP(0, 0)-STEP(-30, -5), 16
LINE STEP(0, 0)-STEP(-10, -15), 16
LINE STEP(0, 0)-STEP(-5, 20), 16
LINE STEP(0, 0)-STEP(-20, -10), 16
LINE STEP(0, 0)-STEP(-15, 10), 16
LINE STEP(0, 0)-STEP(1, 15), 16
LINE STEP(0, 0)-STEP(10, 5), 16
LINE STEP(0, 0)-STEP(-10, 20), 16
LINE STEP(0, 0)-STEP(10, -10), 16
LINE STEP(0, 0)-(mx%, my%), 16
END SUB

SUB meteor2 (mx2%, my2%)
PSET (mx2%, my2% - 5), 10
LINE (mx2%, my2%)-STEP(10, -10), 10
LINE STEP(0, 0)-STEP(15, 5), 10
LINE STEP(0, 0)-STEP(10, -10), 10
LINE STEP(0, 0)-STEP(-5, -10), 10
LINE STEP(0, 0)-STEP(0, -10), 10
LINE STEP(0, 0)-STEP(-5, -15), 10
LINE STEP(0, 0)-STEP(-30, -5), 10
LINE STEP(0, 0)-STEP(-10, -15), 10
LINE STEP(0, 0)-STEP(-5, 20), 10
LINE STEP(0, 0)-STEP(-20, -10), 10
LINE STEP(0, 0)-STEP(-15, 10), 10
LINE STEP(0, 0)-STEP(1, 15), 10
LINE STEP(0, 0)-STEP(10, 5), 10
LINE STEP(0, 0)-STEP(-10, 20), 10
LINE STEP(0, 0)-STEP(10, -10), 10
LINE STEP(0, 0)-(mx2%, my2%), 10
END SUB

SUB meteor2erase (mx2%, my2%)
PSET (mx2%, my2% - 5), 0
LINE (mx2%, my2%)-STEP(10, -10), 0
LINE STEP(0, 0)-STEP(15, 5), 0
LINE STEP(0, 0)-STEP(10, -10), 0
LINE STEP(0, 0)-STEP(-5, -10), 0
LINE STEP(0, 0)-STEP(0, -10), 0
LINE STEP(0, 0)-STEP(-5, -15), 0
LINE STEP(0, 0)-STEP(-30, -5), 0
LINE STEP(0, 0)-STEP(-10, -15), 0
LINE STEP(0, 0)-STEP(-5, 20), 0
LINE STEP(0, 0)-STEP(-20, -10), 0
LINE STEP(0, 0)-STEP(-15, 10), 0
LINE STEP(0, 0)-STEP(1, 15), 0
LINE STEP(0, 0)-STEP(10, 5), 0
LINE STEP(0, 0)-STEP(-10, 20), 0
LINE STEP(0, 0)-STEP(10, -10), 0
LINE STEP(0, 0)-(mx2%, my2%), 0
my2% = my2% + 5

END SUB

SUB meteor3 (mx3%, my3%)
PSET (mx3%, my3% - 5), 11
LINE (mx3%, my3%)-STEP(10, -10), 11
LINE STEP(0, 0)-STEP(15, 5), 11
LINE STEP(0, 0)-STEP(10, -10), 11
LINE STEP(0, 0)-STEP(-5, -10), 11
LINE STEP(0, 0)-STEP(0, -10), 11
LINE STEP(0, 0)-STEP(-5, -15), 11
LINE STEP(0, 0)-STEP(-30, -5), 11
LINE STEP(0, 0)-STEP(-10, -15), 11
LINE STEP(0, 0)-STEP(-5, 20), 11
LINE STEP(0, 0)-STEP(-20, -10), 11
LINE STEP(0, 0)-STEP(-15, 10), 11
LINE STEP(0, 0)-STEP(1, 15), 11
LINE STEP(0, 0)-STEP(10, 5), 11
LINE STEP(0, 0)-STEP(-10, 20), 11
LINE STEP(0, 0)-STEP(10, -10), 11
LINE STEP(0, 0)-(mx3%, my3%), 11
END SUB

SUB meteor3erase (mx3%, my3%)
PSET (mx3%, my3% - 5), 0
LINE (mx3%, my3%)-STEP(10, -10), 0
LINE STEP(0, 0)-STEP(15, 5), 0
LINE STEP(0, 0)-STEP(10, -10), 0
LINE STEP(0, 0)-STEP(-5, -10), 0
LINE STEP(0, 0)-STEP(0, -10), 0
LINE STEP(0, 0)-STEP(-5, -15), 0
LINE STEP(0, 0)-STEP(-30, -5), 0
LINE STEP(0, 0)-STEP(-10, -15), 0
LINE STEP(0, 0)-STEP(-5, 20), 0
LINE STEP(0, 0)-STEP(-20, -10), 0
LINE STEP(0, 0)-STEP(-15, 10), 0
LINE STEP(0, 0)-STEP(1, 15), 0
LINE STEP(0, 0)-STEP(10, 5), 0
LINE STEP(0, 0)-STEP(-10, 20), 0
LINE STEP(0, 0)-STEP(10, -10), 0
LINE STEP(0, 0)-(mx3%, my3%), 0

my3% = my3% + 5
END SUB

SUB meteorerase (mx%, my%)
PSET (mx%, my% - 5), 0
LINE (mx%, my%)-STEP(10, -10), 0
LINE STEP(0, 0)-STEP(15, 5), 0
LINE STEP(0, 0)-STEP(10, -10), 0
LINE STEP(0, 0)-STEP(-5, -10), 0
LINE STEP(0, 0)-STEP(0, -10), 0
LINE STEP(0, 0)-STEP(-5, -15), 0
LINE STEP(0, 0)-STEP(-30, -5), 0
LINE STEP(0, 0)-STEP(-10, -15), 0
LINE STEP(0, 0)-STEP(-5, 20), 0
LINE STEP(0, 0)-STEP(-20, -10), 0
LINE STEP(0, 0)-STEP(-15, 10), 0
LINE STEP(0, 0)-STEP(1, 15), 0
LINE STEP(0, 0)-STEP(10, 5), 0
LINE STEP(0, 0)-STEP(-10, 20), 0
LINE STEP(0, 0)-STEP(10, -10), 0
LINE STEP(0, 0)-(mx%, my%), 0
my% = my% + 5
END SUB

SUB spaceship (x%)
LINE (x%, 399)-STEP(15, 0), 15
LINE STEP(0, 0)-STEP(0, -15), 15
LINE STEP(0, 0)-STEP(10, -10), 15
LINE STEP(0, 0)-STEP(0, 15), 15
LINE STEP(0, 0)-STEP(15, 0), 15
LINE STEP(0, 0)-STEP(0, -15), 15
LINE STEP(0, 0)-STEP(10, 10), 15
LINE STEP(0, 0)-STEP(0, 15), 15
LINE STEP(0, 0)-STEP(15, 0), 15
LINE STEP(0, 0)-STEP(0, -20), 15
LINE STEP(0, 0)-STEP(-23, -23), 15
LINE STEP(0, 0)-STEP(0, -20), 15
LINE STEP(0, 0)-STEP(-10, -5), 15
LINE STEP(0, 0)-STEP(-10, 5), 15
LINE STEP(0, 0)-STEP(0, 20), 15
LINE STEP(0, 0)-STEP(-22, 22), 15
LINE STEP(0, 0)-STEP(0, 20), 15
PAINT STEP(5, 0), 4, 15
END SUB

SUB titlepage (choice%)
CLS
COLOR 10
LOCATE 13, 30
PRINT "Welcome"
SLEEP 1
COLOR 13
LOCATE 13, 38
PRINT "To"
SLEEP 1
COLOR 14
LOCATE 13, 41
 PRINT "ARMAGEDON!"
SLEEP 3
COLOR 15
LOCATE 14, 30
PRINT "(1)-Intstructions"
LOCATE 15, 30
PRINT "(2)-Story Line"
LOCATE 16, 30
PRINT "(3)-SAVE THE PLANNET FROM DESTRUCTION!"
LOCATE 19, 28
INPUT "What would you like to do?", choice%
REM***CHOICES
DO
IF choice% = 2 THEN
CLS
COLOR 14
PRINT "Long ago, a massive meteor hit our plannet, killing all the dinosaurs.  "
PRINT "Nothing survived... Now, it seems that the human race may have the risk of"
PRINT "extinction, for the meteor is back."
SLEEP 4
INPUT "-Press any key-", nothing%
CALL titlepage(choice%)
END IF
IF choice% = 1 THEN
CLS
PRINT "Use the number pad arrow keys to move your ship back and forth (6-right, 4-left)"
PRINT "Use the number 5 on the number pad to shoot your missles at the falling"
PRINT "meteors. Press `q' at anytime to quit the game."

PRINT "After 10 points, 2 meteors will be falling."
PRINT "After 40 points, 3 meteors will be falling."
PRINT "REACH 150 POINTS TO WIN THE GAME!!!"

INPUT "-Press any key-", nothing%
CALL titlepage(choice%)
ELSEIF choice% = 3 THEN
CLS
LOCATE 13, 20
PRINT "You are a very brave human, I envy heros like you! Press `q' to chicken out!"
LOCATE 15, 20
PRINT "press the `Pasue Break' button to pause the game"
SLEEP 3
ELSE
LOCATE 20, 20
PRINT "Please enter one of the available options!"
LOCATE 21, 28
INPUT "Press the enter key", phh
LOCATE 21, 28
PRINT "-------------"
LOCATE 19, 28
INPUT "What would you like to do?", choice%
END IF
LOOP UNTIL choice% = 1 OR choice% = 2 OR choice% = 3
END SUB

