global ExitGame = 0
while not ExitGame
whattodo = MenuScreen()
if whattodo = 1
DoGame()
end if
ShowHighScores()
wend
function MainMenu()
while not exitfunc
if keyhit(1)
exitfunc = 1
exitgame = 1
return 0
end if
if keyhit(57)
exitfunc = 1
return 1
end if
end function