blue = Color.new(0,191,255)

-- Assign flash0
function System.EasyAssign(flash)
System.unassign("flash"..flash..":")
System.sleep(80)
System.assign("flash"..flash..":","lflash0:0,"..flash,"flashfat"..flash..":")
System.sleep(80)
end

--Values
modus = 1

--Main
oldpad = Controls.read()
while true do
pad = Controls.read()
screen:clear()
screen:print(150,1,"SensMe XMB Mod - For 5.XX", blue)
    screen:print(1,10,"________________________________________________________________________", green)
    screen:print(1,222,"                        By The Z", blue)
    screen:print(1,250,"________________________________________________________________________", yellow)
	screen:print(1,37,"__________________________________________________________________________", green)
	screen:print(1,22,"Special Thanks to Sawaz for letting me use his Easy Installer", gray)
if modus == 1 then
screen:print(1,80,"  Mod install for GEN", blue)
screen:print(1,90,"  Exit", white)
screen.flip()
screen.waitVblankStart(0)
elseif modus == 2 then
screen:print(1,80,"  Mod install for GEN", white)
screen:print(1,90,"  Exit", blue)
screen.flip()
screen.waitVblankStart(0)
end

if pad:up() and not oldpad:up() then
if modus == 1 then
modus = 2
elseif modus == 2 then
modus = 1
end
end

if pad:down() and not oldpad:down() then
if modus == 1 then
modus = 2
elseif modus == 2 then
modus = 1
end
end

if pad:cross() and not oldpad:cross() then
if modus == 1 then
screen:print(150,1,"SensMe XMB Mod - For 5.XX", blue)
screen:print(1,20,"                        By The Z", white)
screen:print(1,22,"Special Thanks to Sawaz for letting me use his Easy Installer", gray)
screen:print(1,80,"  Mod install for GEN", blue)
screen:print(1,90,"  Exit", white)
screen:print(1,130,"  Assign Flashes...", yellow)
screen.flip()
System.EasyAssign(0) 
screen:print(1,130,"  Assign Flashes...Done", yellow)
screen:print(1,140,"  Flashing Files...", yellow)
screen.flip()
System.copyFile("GEN/vshmain.prx", "flash0:/vsh/module/vshmain.prx", 0)
System.copyFile("gen/topmenu_plugin.rco", "flash0:/vsh/resource/topmenu_plugin.rco", 0)
System.copyFile("gen/topmenu_icon.rco", "flash0:/vsh/resource/topmenu_icon.rco", 0)
screen:print(1,130,"  Assign Flashes...Done", yellow)
screen:print(1,140,"  Flashing Files...Done", yellow)
screen:print(1,260,"Mod installed, XMB restarts in 4 Seconds", green)
screen.flip()
screen.waitVblankStart(240)
System.Quit()
end
if modus == 2 then
screen:print(1,260,"Exit...", green)
screen.flip()
screen.waitVblankStart(120)
System.Quit()
end
end
oldpad = pad
end