System.usbDiskModeActivate()
pink = Color.new(255, 0 , 153)
white = Color.new(255, 255, 255)
blue = Color.new(0 , 153, 255)
orange = Color.new(255, 102, 0)
gray = Color.new(153, 153, 153)
black = Color.new(0 , 0 , 0) 
screen:print(185, 136, "Loading: 0%", orange)
screen.flip()

background = Image.load("images/background.jpg")

circle = Image.load("images/buttons/circle_button.png")
down = Image.load("images/buttons/down_arrow.png")

screen:clear()
screen:print(185, 136, "Loading: 40%", orange)
screen.flip()

l = Image.load("images/buttons/left_trigger.png")
left = Image.load("images/buttons/left_arrow.png")

screen:clear()
screen:print(185, 136, "Loading: 60%", orange)
screen.flip()

r = Image.load("images/buttons/right_trigger.png")
right = Image.load("images/buttons/right_arrow.png")
b = Sound.load("music/b.wav")
ld = Sound.load("music/l.wav")
rd = Sound.load("music/r.wav")
c = Sound.load("music/c.wav")
d = Sound.load("music/d.wav")
f = Sound.load("music/f.wav")
g = Sound.load("music/g.wav")
eb = Sound.load("music/eb.wav")
a = Sound.load("music/a.wav")
opening = Sound.load("music/opening.wav")
e = Sound.load("music/e.wav")
screen:clear()
screen:print(185, 136, "Loading: 80%", orange)
screen.flip()

square = Image.load("images/buttons/square_button.png")
triangle = Image.load("images/buttons/triangle_button.png")

screen:clear()
screen:print(185, 136, "Loading: 90%", orange)
screen.flip()

up = Image.load("images/buttons/up_arrow.png")
x = Image.load("images/buttons/cross_button.png")
splash = Image.load("images/lua.png")

screen:clear()
screen:print(185, 136, "Loading: Complete", orange)
screen:print(185, 150, "Welcome to 'Guitar'", orange)
screen.flip()
screen.waitVblankStart(60)
opening:play()
screen.waitVblankStart(240)
Music.volume(128)
oldpad = Controls.read()
while true do
          screen:blit(0, 0, background, false)

pad = Controls.read()

screen:print(150, 255, "Welcome to 'Guitar' By Amrcidiot", white)
screen.flip()

		if pad:cross() and not oldpad:cross() then
			screen:blit(20, 10, x)
			screen.flip()
			e:play()
			Music.volume(128)
	end
 		if pad:circle() and not oldpad:circle() then
                   screen:blit(200, 10, circle)
                    screen.flip()
			a:play()
			Music.volume(128)
          end

          if pad:triangle() and not oldpad:triangle() then
                    screen:blit(140, 10, triangle)
                    screen.flip()
			g:play()
			Music.volume(128)
          end

          if pad:square() and not oldpad:square() then
                    screen:blit(80, 10, square)
                    screen.flip()
			f:play()
			Music.volume(128)
          end

          if pad:up() and not oldpad:up() then
                    screen:blit(380, 10, up)
                    screen.flip()
			d:play()
			Music.volume(128)
          end

          if pad:right() and not oldpad:right() then
                    screen:blit(440, 10, right)
                    screen.flip()
			eb:play()
			Music.volume(128)
          end

          if pad:down() and not oldpad:down() then
                    screen:blit(260, 10, down)
                    screen.flip()
			b:play()
			Music.volume(128)
          end

          if pad:left() and not oldpad:left() then
                    screen:blit(320, 10, left)
                    screen.flip()
			c:play()
			Music.volume(128)
          end

          if pad:l() and not oldpad:l() then
                    screen:blit(20, 120, l)
                    screen.flip()
			ld:play()
			Music.volume(128)
          end

          if pad:r() and not oldpad:r() then
                    screen:blit(20, 180, r)
                    screen.flip()
			rd:play()
			Music.volume(128)
          end

if pad:select() and not oldpad:select() then
screen:save("screenshot.png") 
end 

if pad:start() then
break
end
oldpad = pad
end
