System.usbDiskModeActivate()
y = 0
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()
e8v = Sound.load("media/bass/e8v.wav")
ab = Sound.load("media/bass/ab.wav")
gb = Sound.load("media/bass/gb.wav")
db = Sound.load("media/bass/db.wav")

background = Image.load("media/background2.png")


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

l = Image.load("media/left_trigger.png")

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

right = Image.load("media/eb.png")
b = Sound.load("media/bass/b.wav")
ld = Sound.load("media/l.wav")
c = Sound.load("media/bass/c.wav")
d = Sound.load("media/bass/d.wav")
f = Sound.load("media/bass/f.wav")
g = Sound.load("media/bass/g.wav")
eb = Sound.load("media/bass/eb.wav")
a = Sound.load("media/bass/a.wav")
bb = Sound.load("media/bass/bb.wav")
opening = Sound.load("media/opening2.wav")
e = Sound.load("media/bass/e.wav")
screen:clear()
screen:print(185, 136, "Loading: 80%", orange)
screen.flip()


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

x = Image.load("media/e.png")
screen:clear()
screen:print(185, 136, "Welcome To PSPlay: Bass", orange)
screen:print(185, 150, "Press 'X' To Start", white)
screen:print(290, 260, "Programmed By Amrcidiot", blue)
screen.flip()
opening:play()
screen.waitVblankStart(60)
Music.volume(128)

oldpad = Controls.read()

while true do
          screen:blit(0, 0, background, false)

pad = Controls.read()

if pad:r() then
y = 1
end

	  if pad:cross() and not oldpad:cross() then
			screen:blit(28, 0, x)
			screen.flip()
			e:play()
			Music.volume(128)
			
	  end
 		if pad:circle() and not oldpad:circle() then
			if y == 0 then
				a:play()
				Music.volume(128)
			end
			if y == 1 then
				ab:play()
				Music.volume(128)
			end
          end

          if pad:triangle() and not oldpad:triangle() then
			if y == 0 then
				g:play()
				Music.volume(128)
			end
			if y == 1 then
				gb:play()
				Music.volume(128)
			end
          end

          if pad:square() and not oldpad:square() then
			f:play()
			Music.volume(128)
          end

          if pad:up() and not oldpad:up() then
			if y == 0 then
				d:play()
				Music.volume(128)
			end
			if y == 1 then
				db:play()
				Music.volume(128)
			end
          end

          if pad:right() and not oldpad:right() then
			if y == 0 then
				e8v:play()
				Music.volume(128)
			end
			if y == 1 then
				eb:play()
				Music.volume(128)
			end
          end

          if pad:down() and not oldpad:down() then
			if y == 0 then
				b:play()
				Music.volume(128)
			end
			if y == 1 then
				bb:play()
				Music.volume(128)
			end
          end

         

          if pad:left() and not oldpad:left() then
			c:play()
			Music.volume(128)

          end

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

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


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

if  pad:start() then
dofile("script.lua")
end

oldpad = pad
y = 0
end
