local select = 1;
local music = 1;
local loaded = false;
function loadeverything()
	if loaded == false then
		sfx_bog = pge.wav.load("sounds/bog.wav")
		sfx_energy = pge.wav.load("sounds/energy.wav")
		sfx_achuh = pge.wav.load("sounds/achuh.wav")
		sfx_steam = pge.wav.load("sounds/steam.wav")
		sfx_alert = pge.wav.load("sounds/alert.wav")
		sfx_construct = pge.wav.load("sounds/construct.wav")
		sfx_wind = pge.wav.load("sounds/wind.wav")
		sfx_water = pge.wav.load("sounds/water.wav")
		sfx_vodka = pge.wav.load("sounds/vodka.wav")
		sfx_sea = pge.wav.load("sounds/sea.wav")
		sfx_boom = pge.wav.load("sounds/boom.wav")
		sfx_earthquake = pge.wav.load("sounds/earthquake.wav")
		sfx_thunder = pge.wav.load("sounds/thunder.wav")
		sfx_cass = pge.wav.load("sounds/cass.wav")
		air = pge.texture.load("elements/air.png")
		intro = pge.texture.load("intro.png")
		air = pge.texture.load("elements/air.png")
		steam = pge.texture.load("elements/steam.png")
		cloud = pge.texture.load("elements/cloud.png")
		boom = pge.texture.load("elements/boom.png")
		hps = pge.texture.load("elements/hps.png")
		sky = pge.texture.load("elements/sky.png")
		glass = pge.texture.load("elements/glass.png")
		brick = pge.texture.load("elements/brick.png")
		wall = pge.texture.load("elements/wall.png")
		dam = pge.texture.load("elements/dam.png")
		dirt = pge.texture.load("elements/dirt.png")
		hh = pge.texture.load("elements/hh.png")
		ice = pge.texture.load("elements/ice.png")
		rust = pge.texture.load("elements/rust.png")
		oo = pge.texture.load("elements/oo.png")
		ooo = pge.texture.load("elements/ooo.png")
		algae = pge.texture.load("elements/algae.png")
		bacteria = pge.texture.load("elements/bacteria.png")
		beach = pge.texture.load("elements/beach.png")
		geyser = pge.texture.load("elements/geyser.png")
		vodka = pge.texture.load("elements/vodka.png")
		volcano = pge.texture.load("elements/volcano.png")
		stone = pge.texture.load("elements/stone.png")
		spirit = pge.texture.load("elements/spirit.png")
		sand = pge.texture.load("elements/sand.png")
		water = pge.texture.load("elements/water.png")
		bog = pge.texture.load("elements/bog.png")
		dust = pge.texture.load("elements/dust.png")
		tornado = pge.texture.load("elements/tornado.png")
		powder = pge.texture.load("elements/powder.png")
		clay = pge.texture.load("elements/clay.png")
		coal = pge.texture.load("elements/coal.png")
		metal = pge.texture.load("elements/metal.png")
		ashes = pge.texture.load("elements/ashes.png")
		life = pge.texture.load("elements/life.png")
		electricity = pge.texture.load("elements/electricity.png")
		energy = pge.texture.load("elements/energy.png")
		fire = pge.texture.load("elements/fire.png")
		gas = pge.texture.load("elements/gas.png")
		firebig = pge.texture.load("elements/firebig.png")
		sea = pge.texture.load("elements/sea.png")
		pressure = pge.texture.load("elements/pressure.png")
		wind = pge.texture.load("elements/wind.png")
		ground = pge.texture.load("elements/ground.png")
		lava = pge.texture.load("elements/lava.png")
		information = pge.texture.load("information.png")
		control = pge.texture.load("control.png")
		shock = pge.texture.load("shock.png")
		bg = pge.texture.load("bg.png")
		smokelittle = pge.texture.load("smokelittle.png")
		smoke = pge.texture.load("smoke.png")
		einstain = pge.texture.load("einstain.png")
		sel = pge.texture.load("sel.png")
		cho = pge.texture.load("cho.png")
		bar = pge.texture.load("bar.png")
		white = pge.gfx.createcolor(255, 255, 255)
		lcchalk = pge.font.load("lcchalk.ttf", 15, PGE_RAM)
		lcchalk30 = pge.font.load("lcchalk.ttf", 22, PGE_RAM)
		loaded = true;
	end
end
introtimer = 1
introgamma = 0
timer = 0
starttimer = 0
coefficienta = 0
math.randomseed(math.random(0,100000))
loadeverything()
while pge.running() do
 pge.controls.update()
 pge.gfx.startdrawing()
 pge.gfx.clearscreen()
 pge.controls.update()
intro:activate();
intro:draweasy(0,0,0,introgamma)
if starttimer == 0 then
	timer = timer + 1
end
if timer == 70 then
	sfx_water:play()
end
if timer == 150 then
	sfx_water:play()
end
if timer == 225 then
	sfx_water:play()
end
if timer >= 70 and timer <= 73 then
	lcchalk:activate();
	lcchalk:print(390, 32, white, "O")
end
if timer >= 70 and timer <= 73 then
	lcchalk:activate();
	lcchalk:print(360, 28, white, "O")
end
if timer >= 75 and timer <= 80 then
	lcchalk:activate();
	lcchalk:print(400, 32, white, "O")
end
if timer >= 75 and timer <= 80 then
	lcchalk:activate();
	lcchalk:print(360, 32, white, "O")
end
if timer >= 80 and timer <= 83 then
	lcchalk:activate();
	lcchalk:print(390, 32, white, "O")
end
if timer >= 83 and timer <= 89 then
	lcchalk:activate();
	lcchalk:print(390, 32, white, "O")
end
if timer >= 83 and timer <= 89 then
	lcchalk:activate();
	lcchalk:print(360, 20, white, "O")
end
if timer >= 89 and timer <= 103 then
	lcchalk:activate();
	lcchalk:print(370, 42, white, "O")
end
if timer >= 89 and timer <= 103 then
	lcchalk:activate();
	lcchalk:print(390, 35, white, "O")
end
if timer >= 103 and timer <= 110 then
	lcchalk:activate();
	lcchalk:print(400, 32, white, "O")
end
if timer >= 103 and timer <= 110 then
	lcchalk:activate();
	lcchalk:print(360, 26, white, "O")
end
if timer >= 155 and timer <= 160 then
	lcchalk:activate();
	lcchalk:print(390, 32, white, "O")
end
if timer >= 155 and timer <= 160 then
	lcchalk:activate();
	lcchalk:print(390, 32, white, "O")
end
if timer >= 80 and timer <= 83 then
	lcchalk:activate();
	lcchalk:print(380, 40, white, "O")
end
if timer >= 90 and timer <= 93 then
	lcchalk:activate();
	lcchalk:print(367, 20, white, "O")
end
if timer >= 90 and timer <= 103 then
	lcchalk:activate();
	lcchalk:print(360, 32, white, "O")
end
if timer >= 100 and timer <= 103 then
	lcchalk:activate();
	lcchalk:print(360, 32, white, "O")
end
if timer >= 110 and timer <= 115 then
	lcchalk:activate();
	lcchalk:print(365, 36, white, "O")
end
if timer >= 120 and timer <= 123 then
	lcchalk:activate();
	lcchalk:print(382, 30, white, "O")
end
if timer >= 120 and timer <= 125 then
	lcchalk:activate();
	lcchalk:print(370, 28, white, "O")
end
if timer >= 130 and timer <= 133 then
	lcchalk:activate();
	lcchalk:print(360, 32, white, "O")
end
if timer >= 130 and timer <= 135 then
	lcchalk:activate();
	lcchalk:print(365, 25, white, "O")
end
if timer >= 140 and timer <= 143 then
	lcchalk:activate();
	lcchalk:print(380, 35, white, "O")
end
if timer >= 200 and timer <= 206 then
	lcchalk:activate();
	lcchalk:print(380, 35, white, "O")
end
if timer >= 150 and timer <= 153 then
	lcchalk:activate();
	lcchalk:print(360, 32, white, "O")
end
if timer >= 150 and timer <= 153 then
	lcchalk:activate();
	lcchalk:print(390, 20, white, "O")
end
if timer >= 160 and timer <= 163 then
	lcchalk:activate();
	lcchalk:print(370, 28, white, "O")
end
if timer >= 160 and timer <= 163 then
	lcchalk:activate();
	lcchalk:print(365, 24, white, "O")
end
if timer >= 170 and timer <= 173 then
	lcchalk:activate();
	lcchalk:print(365, 24, white, "O")
end
if timer >= 170 and timer <= 173 then
	lcchalk:activate();
	lcchalk:print(365, 24, white, "O")
end
if timer >= 170 and timer <= 173 then
	lcchalk:activate();
	lcchalk:print(370, 30, white, "O")
end
if timer >= 170 and timer <= 173 then
	lcchalk:activate();
	lcchalk:print(390, 20, white, "O")
end
if timer >= 180 and timer <= 183 then
	lcchalk:activate();
	lcchalk:print(400, 26, white, "O")
end
if timer >= 180 and timer <= 185 then
	lcchalk:activate();
	lcchalk:print(360, 30, white, "O")
end
if timer >= 190 and timer <= 193 then
	lcchalk:activate();
	lcchalk:print(370, 26, white, "O")
end
if timer >= 197 and timer <= 200 then
	lcchalk:activate();
	lcchalk:print(380, 20, white, "O")
end
if timer >= 200 and timer <= 203 then
	lcchalk:activate();
	lcchalk:print(375, 20, white, "O")
end
if timer >= 203 and timer <= 206 then
	lcchalk:activate();
	lcchalk:print(360, 28, white, "O")
end
if timer >= 213 and timer <= 216 then
	lcchalk:activate();
	lcchalk:print(360, 28, white, "O")
end
if timer >= 223 and timer <= 226 then
	lcchalk:activate();
	lcchalk:print(390, 20, white, "O")
end
if timer >= 123 and timer <= 126 then
	lcchalk:activate();
	lcchalk:print(390, 20, white, "O")
end
if timer >= 223 and timer <= 228 then
	lcchalk:activate();
	lcchalk:print(370, 30, white, "O")
end
if timer >= 233 and timer <= 237 then
	lcchalk:activate();
	lcchalk:print(379, 20, white, "O")
end
if timer >= 243 and timer <= 247 then
	lcchalk:activate();
	lcchalk:print(350, 33, white, "O")
end
if timer >= 300 and timer <= 305 then
	lcchalk:activate();
	lcchalk:print(350, 33, white, "O")
end
if timer >= 253 and timer <= 257 then
	lcchalk:activate();
	lcchalk:print(400, 40, white, "O")
end
if timer >= 103 and timer <= 107 then
	lcchalk:activate();
	lcchalk:print(400, 40, white, "O")
end
if timer >= 203 and timer <= 207 then
	lcchalk:activate();
	lcchalk:print(400, 40, white, "O")
end
if timer >= 303 and timer <= 307 then
	lcchalk:activate();
	lcchalk:print(400, 40, white, "O")
end
if timer >= 260 and timer <= 264 then
	lcchalk:activate();
	lcchalk:print(360, 40, white, "O")
end
if timer >= 160 and timer <= 164 then
	lcchalk:activate();
	lcchalk:print(360, 40, white, "O")
end
if timer >= 195 and timer <= 200 then
	lcchalk:activate();
	lcchalk:print(360, 40, white, "O")
end
if timer >= 195 and timer <= 200 then
	lcchalk:activate();
	lcchalk:print(380, 40, white, "O")
end
if timer >= 270 and timer <= 274 then
	lcchalk:activate();
	lcchalk:print(360, 30, white, "O")
end
if timer >= 280 and timer <= 284 then
	lcchalk:activate();
	lcchalk:print(380, 20, white, "O")
end
if timer >= 180 and timer <= 184 then
	lcchalk:activate();
	lcchalk:print(380, 20, white, "O")
end
if timer >= 290 and timer <= 294 then
	lcchalk:activate();
	lcchalk:print(370, 20, white, "O")
end
if timer >= 300 and timer <= 304 then
	lcchalk:activate();
	lcchalk:print(390, 27, white, "O")
end
if timer >= 100 and timer <= 104 then
	lcchalk:activate();
	lcchalk:print(390, 27, white, "O")
end
if timer >= 300 and timer <= 304 then
	lcchalk:activate();
	lcchalk:print(350, 20, white, "O")
end
if timer >= 310 and timer <= 314 then
	lcchalk:activate();
	lcchalk:print(380, 30, white, "O")
end

if introtimer == 1 then
	introgamma = introgamma + 2;
	if introgamma >= 255 then
		introtimer = 255;
	end
end
if timer >= 300 then
	introgamma = introgamma - 2;
	if introgamma <= 0 then
		dofile("game.lua")
	end
end
 pge.gfx.enddrawing()
 pge.gfx.swapbuffers()
end
texture = nil