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()
crash = Sound.load("media/drums/crash.wav")
hi = Sound.load("media/drums/hi.wav")
bass = Sound.load("media/drums/bass.wav")
snare = Sound.load("media/drums/snare.wav")

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


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


tom1 = Sound.load("media/drums/tom1.wav")
tom2 = Sound.load("media/drums/tom2.wav")
opening = Sound.load("media/opening4.wav")

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


x = Image.load("media/black.png")
screen:clear()
screen:print(185, 136, "Loading: 90%", orange)
screen.flip()

 screen:clear()
screen:print(185, 136, "Welcome To PSPlay: Drums", 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:cross() and not oldpad:cross() then
			screen:blit(28, 0, x)
			screen.flip()
			bass:play()
			Music.volume(128)
			
	  end
 		if pad:circle() and not oldpad:circle() then
				tom2:play()
				Music.volume(128)
			
          end

          if pad:triangle() and not oldpad:triangle() then
				tom1:play()
				Music.volume(128)
          end

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

          if pad:up() and not oldpad:up() then
				tom1:play()
				Music.volume(128)
          end

          if pad:right() and not oldpad:right() then
				tom2:play()
				Music.volume(128)
          end

          if pad:down() and not oldpad:down() then
				bass:play()
				Music.volume(128)
          end

         

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


          if pad:r() and not oldpad:r() then
			hi:play()
			Music.volume(128)
	end

          if pad:l() and not oldpad:l() then
			crash:play()
			Music.volume(128)
	end


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

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

oldpad = pad
end
