menu = Image.load("img/background.png")

soundR = Sound.load("sounds/1stS.wav", false)
soundL = Sound.load("sounds/2ndS.wav", false)
soundT = Sound.load("sounds/3rdS.wav", false)
soundS = Sound.load("sounds/4thS.wav", false)
soundC = Sound.load("sounds/5thS.wav", false)
soundX = Sound.load("sounds/6thS.wav", false)


	function sound1()
		
	if pad:r() then
	soundR:play()
	end
end

	function sound2()
	
	if pad:l() then
	soundL:play()
	end
end

	function sound3() 
	
	if pad:triangle() then
	soundT:play()
	end
end

	function sound4()
	
	if pad:square() then
	soundS:play()
	end
end

	function sound5()
	
	if pad:circle() then
	soundC:play()
	end
end

	function sound6()
	
	if pad:cross() then
	soundX:play()
	end
end

	function menur()
	
	if pad:select() then
	dofile("menu.lua")
	end
end
	
while true do

	pad = Controls.read()

sound1()
sound2()
sound3()
sound4()
sound5()
sound6()
menur()

screen:blit(0,0,menu)
screen.flip()
screen.waitVblankStart()

end