white = Color.new(255, 255, 255) 


 Images = {}
Images[1] =  Image.load("mainheadX.png")
Images[2] = Image.load("mainarmsO.png")
Images[3] =  Image.load("mainlegs^.png")
Images[4] =  Image.load("mainultimatesq.png")
Images[5]  = Image.load("mainup.png")
Images[6]  = Image.load("maindown.png")
Images[7] = Image.load("mainleft.png")
Images[8]= Image.load("mainright.png")
Images[9] = Image.load("main.png")
currentImage = 9


while true do
screen:clear(white) 
screen:blit(198, 40,Images[currentImage]) 
 
 
pad = Controls.read()
 
screen:print(135, 251, "Press 'Start' to restart", black)
screen:print(110, 261, "Press 'Select' for a screenshot", black)


if pad:l() then
dofile("char2.lua")
end

 
if pad:cross() then
currentImage = 1
end
 
if pad:circle() then
currentImage = 2
end
 
if pad:triangle() then
currentImage = 3
end
 
if pad:square() then
currentImage = 4
end
 
if pad:up() then
currentImage =5
end
 
if pad:down() then
currentImage = 6
end
 
if pad:left() then
currentImage = 7
end
 
if pad:right() then
currentImage = 8
end

if pad:r() then
currentImage = 9
end 
 
if pad:select() then screen:save("screenshot.tga") end
 
if pad:start() then		
break
end 
 screen.flip()
end