menuload = nil
cutsceneload = nil
multiplayermenuload = nil
credits = nil
collectgarbage()

menuload3,message = loadfile("menu.lua")
if menuload3 == nil then
screen:clear()
screen:print(0,0,"LOAD FAILED",Color.new(255,0,0))
screen:print(0,10,message,Color.new(255,255,255))
screen.flip()
end

state = "creditss"
Music.stop()
   
   backgroundCache = Image.load("backgrounds/credits.png")
   cursor = Image.load("backgrounds/sbutton1.png") ------load cursor
   
   selected = 1
   maxselected = 1
   oldpad = Controls.read() 

while true do

 if selected > maxselected then
   selected = 1
   elseif selected <= 0 then
   selected = maxselected
   end


   padmenu = Controls.read()

   screen.waitVblankStart(6)

   screen:blit(0, 0, backgroundCache, false)


   screen:blit(320, 195, cursor)


if padmenu:cross() and oldpad:cross() ~= padmenu:cross() then
menuload3()
end


screen.flip()
oldpad = padmenu
end