my first 20 liner [edited]
sync on
make object cube 1,5:turn object left 1,4
state#=0
do
if escapekey()=1 then gosub menu
sync
loop
menu:
do
text 1,1,"Wicked's Menu System v.1"
if state#=2 then state#=1
if state#=-1 then state#=0
if state#=0 then text screen width()/2,screen height()/2,"Resume" if returnkey()=1 and state#=0 then return
if rightkey()=1 then inc state#,1:wait 200
if leftkey()=1 then dec state#,1:wait 200
if state#=1 then text screen width()/2,screen height()/2,"exit"
if returnkey()=1 and state#=1 then end
sync
loop