local logo = pge.texture.load("main.png")
local orange = pge.texture.load("orange.png")
local blue = pge.texture.load("blue.png")
local start = pge.texture.load("start.png")
local trophy = pge.texture.load("trophy.png")
local bigblue = pge.texture.load("bigblue.png")
local bigorange = pge.texture.load("bigorange.png")
texture = choose
texture = logo
texture = blue
texture = orange
pge.mp3.play("main.mp3")
cheer = pge.wav.load("cheer.wav")
go = pge.wav.load("go.wav")
engine = pge.wav.load("engine.wav")
go:play()
x = 0
y = 0
z = 360
while pge.running() do
 pge.controls.update()
 pge.gfx.startdrawing()
 pge.gfx.clearscreen()
 pge.controls.update()
logo:activate();
logo:draweasy(0,0,0,255)
blue:activate();
blue:draweasy(20+x,95,0,255)
orange:activate();
orange:draweasy(20+y,145,0,255)
if pge.controls.pressed(PGE_CTRL_RTRIGGER) and y < z then
	x = x + 20
end
if pge.controls.pressed(PGE_CTRL_LTRIGGER) and x < z then
	y = y + 20
end
if y >= z then
	trophy:activate();
	trophy:draweasy(10,45,0,255)
	bigorange:activate();
	bigorange:draweasy(300,45,0,255)
	start:activate();
	start:draweasy(173,130,0,255)
	if y == z then
		cheer:play()
		y = y + 500
		x = x - 500
	end
	if pge.controls.pressed(PGE_CTRL_START) then
		engine:play()
		dofile("script.lua")
	end
end
if x >= z then
	trophy:activate();
	trophy:draweasy(10,45,0,255)
	bigblue:activate();
	bigblue:draweasy(300,45,0,255)
	start:activate();
	start:draweasy(173,130,0,255)
	if x == z then
		cheer:play()
		x = x + 500
		y = y - 500
	end
	if pge.controls.pressed(PGE_CTRL_START) then
		engine:play()
		dofile("script.lua")
	end
end
 pge.gfx.enddrawing()
 pge.gfx.swapbuffers()
 if pge.controls.pressed(PGE_CTRL_START) then
  dofile("one.lua")
 end
end
texture = nil