local sound = menumsk
voice = sound:play()

Music.volume(128)


while true do
pad = Controls.read()
screen:clear()
screen:blit(0,0,mainmenu)

if menustatus == 0 then
screen:blit(125, 38, selector)
end

if menustatus == 1 then
screen:blit(115, 120, selector)
end

if menustatus == 2 then
screen:blit(125, 205, selector)
end

if pad:down() and menustatus == 0 then
screen.waitVblankStart(5)
menustatus = menustatus + 1
screen.waitVblankStart(5)

    else if pad:down()and menustatus == 1 then
    screen.waitVblankStart(5)
    menustatus = menustatus + 1
    screen.waitVblankStart(5)
    
        else if pad:down()and menustatus == 2 then
        screen.waitVblankStart(5)
        menustatus = menustatus - 2
        screen.waitVblankStart(5)
    
else if pad:up() and menustatus == 0 then
screen.waitVblankStart(5)
menustatus = menustatus + 2
screen.waitVblankStart(5)
        
        else if pad:up()and menustatus == 1 then
        screen.waitVblankStart(5)
        menustatus = menustatus - 1
        screen.waitVblankStart(5)

                else if pad:up()and menustatus == 2 then
              screen.waitVblankStart(5)
              menustatus = menustatus - 1
              screen.waitVblankStart(5)
end
end
end
end
end
end 

if pad:cross()and menustatus == 0 then
dofile ("game.lua")
end
if pad:cross()and menustatus == 1 then
dofile ("optionsmenu.lua")
end
if pad:cross()and menustatus == 2 then
dofile ("exit.lua")
end
if pad:select() then
dofile ("screenshot.lua")
end
if exit == 1 then
break
end
screen.flip()
screen.waitVblankStart()
oldpad = pad
end