local poptions = {GAMESTATE:GetPlayerState(0):GetPlayerOptions('ModsLevel_Song'),GAMESTATE:GetPlayerState(1):GetPlayerOptions('ModsLevel_Song')}
local function apply_mod(mod, pn) poptions[pn]:FromString(mod) end
--local cond_uA_result= FUCK_EXE
local cond_uA_result= true

local FORCE_NVIDIA = false--The NVidia fix is needed in SM5 AFTs as well. -Kid

local cond_vA_result= GAMESTATE:IsPlayerEnabled(PLAYER_1)

local cond_wA_result= GAMESTATE:IsPlayerEnabled(PLAYER_2)

local function optional_actor(cond, actor)
	if cond then return actor end
	return Def.Actor{}
end

return Def.ActorFrame{
  Name= "actor_xA",
  InitCommand= function(self)

	songName = GAMESTATE:GetCurrentSong():GetSongDir();
	
	function Plr(pn)
		return _G['P'..pn]
	end
	function Proxy(pn)
		return _G['P'..pn..'p']
	end
	
	for pn=1,2 do
		_G['uksrt_p'..pn..'bonus'] = 0;
	end
	
	sw = SCREEN_WIDTH
	sh = SCREEN_HEIGHT
	
	gat_judgecount = {{0,0,0,0,0,0},{0,0,0,0,0,0}}
	
end,
  optional_actor(cond_uA_result,
  Def.ActorFrame{
    Name= "actor_yA",
    OnCommand= function(self)

	--PREFSMAN:SetPreference('MaxTextureResolution',1024);

	--We don't need this check. -Kid
-- 	if DISPLAY:GetDisplayWidth() ~= 800 and DISPLAY:GetDisplayWidth() ~= 640 or DISPLAY:GetDisplayHeight() ~= 600 and DISPLAY:GetDisplayHeight() ~= 480 then
-- 		SCREENMAN:SystemMessage('Unusual (not 800x600 or 640x480) res detected. Good luck.');
-- 	end
	if not string.find(string.lower(PREFSMAN:GetPreference('VideoRenderers')), 'opengl')
	or string.find(string.lower(PREFSMAN:GetPreference('VideoRenderers')), 'd3d')
	and string.find(string.lower(PREFSMAN:GetPreference('VideoRenderers')), 'opengl') 
	and string.find(string.lower(PREFSMAN:GetPreference('VideoRenderers')), 'd3d') < 
	string.find(string.lower(PREFSMAN:GetPreference('VideoRenderers')), 'opengl') then
		SCREENMAN:SystemMessage('D3D Video Renderer detected. Expect textures to fail.');
	end
	
	gat_nvidia = false
	gat_alphamult = 1
	if string.find(string.lower(PREFSMAN:GetPreference('LastSeenVideoDriver')), 'nvidia') or FORCE_NVIDIA then
		Trace('NVidia graphics driver detected.')
		Trace('AFT multiplier set to 0.9')
		gat_nvidia = true
		gat_alphamult = 0.9
	end
	
end,
    Def.Quad{
      Name= "actor_zA",
      InitCommand= cmd(visible,false),
      OnCommand= cmd(sleep,1000),
    },
    LoadActor('modhelpers.lua') .. {
      Name= "actor_AA",
      File= "modhelpers.lua",
    },
    Def.Quad{
      Name= "actor_BA",
      InitCommand= function(self)
		
			gat_scrollspd = 0;
			gat_endfluct = 1;
			
			gat_tumblr = 1;
			
			gat_isk = 1;
			
			gat_splitm = 1;
			gat_splitrot2 = {};
			gat_splitset = 0;
			
			gat_splitvib = {};
			gat_splitposnew = {};
			gat_toss = {}
			
			gat_slamdist = 60*(SCREEN_HEIGHT/480);--Scale slamdist. -Kid
			
			gat_proxies = {{},{}}
			gat_proxiesc = {{},{}}
			
			gat_alt_v = 1;
			gat_alt = 159.85;
			
			gat_tinyfluct = 1;
			gat_bigsmallamt = 100;
			gat_logden = math.log(0.5)--We're gonna do some logarithms to get what we want. -Kid
			gat_tinyamnt = 1
			gat_logtiny1 = 100
			gat_logtiny2 = 100
			
			gat_delayframeskewx = 1;
			gat_delayframedur = 0.5;
			
			gat_scrollspd = 0
			gat_walkerdir = 0 
			
			gat_sdwidth_ratio = (480*(SCREEN_WIDTH/SCREEN_HEIGHT))/640 --These variables help with making things look nice regardless of resolution! -Kid
			gat_width_ratio = SCREEN_WIDTH/640
			gat_height_ratio = SCREEN_HEIGHT/480
			
			checked = false;
			
			---------------------------------------------------------
			---------DOCUMENTATION-----------------------------------
			---------------------------------------------------------
			
			--function perframe( beat, endBeat )
				--return true if the current beat is between 'beat' and 'endBeat'
			
			--function mod_shader(beat,key,which)
				--turn on shader key at specified beat (up to 10 keys available, defined by 'which' = 0-9
				
			--function mod_insert(beat,len,mod,len_or_end,pn)
				--insert mod into beat mods table
			--function mod_insert2(time,len,mod,len_or_end,pn)
				--insert mod into time mods table
				
			--function mod_message(beat,msg,persistent)
				--insert something into the actions table.
				--msg can also be a function. If string, a message gets broadcast at that beat
				--if 'persistent' is true, message will run even if editor starts at a beat past it
				
			--function mod_blacklist(t,n)
				--check if number n occurs in table t
				--useful for doing 'every beat EXCEPT the contents of t'
				
			--function simple_m0d(beat,strength,mult,mod)
			--function simple_m0d2(beat,strength,mult,mod,pn)
			--function simple_m0d3(beat,strength,duration,bpm,mod,pn)
				--activate mods at specific beat but also deactivate them
				
			--function mod_wiggle(beat,num,div,amt,speed,mod,pn,first)
				--alternates a mod back and forth before resetting to 0
				
			--function mod_spring(beat,strength,num,mod,pn)
				--like mod_wiggle, but springier
			
			--function mod_springt(time,strength,dur,mod,pn)
				--time-based per-frame alternating mod that decreases based on how much time is left.
					--think doorstopper
			
			--function mod_springt2(time,strength,dur,mod,pn)
				--time-based per-frame alternating mod
			
			--function mod_spring_adjustable(beat,strength,num,period,mod,pn, first)
				--it's not very good
			
			--function mod_beat(beat,strength,pn)
				--turns on beat for the beat specified, at the desired strength	
			
			--function switcheroo_add(beat,which,speed,len,pn)
				--adds a column swap at the desired beat
			--[[	switcheroos = {normal = {0,0}, ldur = {0,0}, reset = {0,0},
					flip = {100,0}, rudl = {100,0}, invert = {0,100}, dlru = {0,100},
					ludr = {25,-75}, rdul = {75,75}, drlu = {25,125}, ulrd = {75,-125}, urld = {100,-100}}
			]]
			
			

			---------------------------------------------------------
			---------DOCUMENTATION-----------------------------------
			---------------------------------------------------------
			
			

			init_modsp1 = '';
			init_modsp2 = '';
			
			mod_plr = {nil, nil};--Handle one player better. -Kid
			
			mod_firstSeenBeat = GAMESTATE:GetSongBeat();

			
			gat_shame_rng = {2,5}
			gat_shame_rng2 = {1,4,6,7}
			
			--Scaled all positions. -Kid
			gat_shame_posx = {100*gat_width_ratio,100*gat_width_ratio+(440*0.333*gat_width_ratio),100*gat_width_ratio+(440*0.666*gat_width_ratio),540*gat_width_ratio,100*gat_width_ratio,100*gat_width_ratio+(440*0.333*gat_width_ratio),100*gat_width_ratio+(440*0.666*gat_width_ratio),540*gat_width_ratio}
			gat_shame_posy = {128*gat_height_ratio,128*gat_height_ratio,128*gat_height_ratio,128*gat_height_ratio,352*gat_height_ratio,352*gat_height_ratio,352*gat_height_ratio,352*gat_height_ratio}


			--beat based mods
			--{beat_start, beat_end, mods, len_or_end, player_number}
			mods = {
			--We also add the 'default' periods for Square, Digital and DigitalZ because of the changes I did to the mods. -Kid
				{0,9000,'2x, -50 drawsizeback, -10000000 cover, 194.5% digitalperiod, 194.5% squareperiod, 214.2% digitalzperiod','end'},
				{0,60,'*10000 1000% Sudden, *10000 160% SuddenOffset','end'},--The beginning needs this. -Kid
				{60,0.100,'*10000 no Sudden, *10000 no SuddenOffset','len'},--The beginning needs this. -Kid
				
				--[[
				{60,128,'*10000 50 splinezoffset0, *10000 -300 splinez0','end'},
				{60,128,'*10000 50 splineyoffset0, *10000 -100 spliney0','end'},
				{60,128,'*10000 100 splinezoffset1, *10000 300 splinez1','end'},
				{60,128,'*10000 100 splineyoffset1, *10000 -100 spliney1','end'},
				]]
				
				{63.5,128,'*10000 200 beat','end',1},
				{63.5,128,'*10000 -200 beat','end',2},
				{95.5,128,'*10000 500 beat','end',1},
				{95.5,128,'*10000 -500 beat','end',2},
				{128,129,'*10000 no beat','end'},
				
				{128,252,'*100000 sudden, *100000 60 suddenoffset, 1.4x','end'},
				
				--{128,256,'*12 60 splinex0','end'},
				
				{143.5,155.5,'*10000 200 beat','end'},
				{155.5,1,'*10000 1000 beat','len'},
				{156.5,1,'*10000 no beat','len'},
				
				{160,188,'*200 400 beatz,*200 400 beaty,*200 0 beatyoffset,*200 200 beat,*200 50 beatoffset,*200 -50 beatmult,*200 -50 beatzmult','end'},
				--GOD
				{188,1,'*200 no beatx, *200 no beaty, *200 no beatz','len'},
				
				--{189-.1,2,'*12 60 splinex0','len'},
				--{191-.1,2,'*12 no splinex0','len'},
				
				{192,252,'*1000 dizzyholds','end'},
				{252,253,'*1000 no dizzyholds','end'},
				
				--[[
				{224-.15,4,'*6 -60 splinex0','len'},
				{228-.15,2,'*6 no splinex0','len'},
				{232-.15,4,'*6 60 splinex0','len'},
				{236-.15,2,'*6 no splinex0','len'},
				{240-.15,4,'*6 -60 splinex0','len'},
				{244-.15,4,'*6 no splinex0','len'},
				{248-.15,4,'*6 60 splinex0','len'},
				{252,2,'*100000 no splinex0','len'},
				]]
				
				{252,444,'*3.416 400 invert','end'},
				
				{338.000-.1,1,'*1 5 reverse','len',2},
				{338.666-.1,1,'*2 15 reverse','len',2},
				{339.333-.1,1,'*2 25 reverse','len',2},
				{340.000-.1,2,'*1 30 reverse','len',2},
				{338.333-.1,1,'*1 10 reverse','len',1},
				{339.000-.1,1,'*2 20 reverse','len',1},
				{339.666-.1,1,'*2 30 reverse','len',1},
				
				{341.000-.1,1,'*1 25 reverse','len',1},
				{341.666-.1,1,'*2 15 reverse','len',1},
				{342.333-.1,1,'*2 5 reverse','len',1},
				{343.000-.1,2,'*1 no reverse','len',1},
				{342.333-.1,1,'*1 20 reverse','len',2},
				{342.000-.1,1,'*2 10 reverse','len',2},
				{342.666-.1,1,'*2 no reverse','len',2},
				
				{444,454,'*6.832 no invert','end'},
				
				--{454,2,'*1000 blind','len'},--Replaced with MessageCommands. -Kid
				--{456,2,'*1000 no blind','len'},
				{454,584,'*1.8 100 sudden, *1.8 dark, *0.45 1.5x, *1.8 100 hidden, *10000 -100 hiddenoffset','end'},
				{453,454,'*10000 100 sudden, *10000 160 SuddenOffset','end',2},--This makes it so Reverse doesn't cause arrow issues. -Kid
				{454,455,'*1.8 -100 SuddenOffset','end',2},--This makes it so Reverse doesn't cause arrow issues. -Kid
				{454,584,'*1.8 reverse','end',2},
				{454,584,'*10000 50 suddenoffset','end',1},
				{455,584,'*10000 -100 suddenoffset','end',2},
				
				{584,712,'*1000 sudden, *2 50 suddenoffset, *10 no drunk, *2 1.4x','end'},
				{677,712,'*0.5 90 suddenoffset','end'},
				
				{469,16,'*2 no dark','len'},
				{501,16,'*2 no dark','len'},
				
				--{517,100,'*5 alternate','len'},
				
				--{468,100,'220 hallway','len'},
				
				--{472,16,'*1.8 1 sudden, *1.8 100 hidden','len'},
				
				{592,712,'*0.2 70 stealth','end'},
				{600,648,'*1.5 stealth, *1 dark','end'},
				
				{600,.2,'*10000 50 stealth, *10000 75 dark','len'},
				{601.5,.2,'*10000 50 stealth, *10000 75 dark','len'},
				{603,.2,'*10000 50 stealth, *10000 75 dark','len'},
				
				{600,1.3,'*2 drunk','len'},
				{601.5,1.3,'*2 drunk','len'},
				{603,1.3,'*2 drunk','len'},
				
				{632,.2,'*10000 50 stealth, *10000 75 dark','len'},
				{633.5,.2,'*10000 50 stealth, *10000 75 dark','len'},
				{635,.2,'*10000 50 stealth, *10000 75 dark','len'},
				
				{632,1.3,'*2 drunk','len'},
				{633.5,1.3,'*2 drunk','len'},
				{635,1.3,'*2 drunk','len'},
				
				{608,.2,'*10000 50 stealth, *10000 75 dark, *10000 0.2x','len'},
				{608.2,5-.2,'*0.5 1.4x, *0.75 stealth','len'},
				
				{613,3,'*10 no stealth, *10 no dark','len'},
				
				{588,597,'*1000 tornado','end'},
				{597,600,'*1 no tornado','end'},
				{624,632,'*1000 50 drunk','end'},
				
				{624,629,'*0.5 70 stealth, *0.25 70 dark','end'},
				{629,632,'*10 stealth, *10 dark','end'},
				{629-.05,.2,'*1000 50 stealth, *1000 50 dark','len'},
				{629.5-.05,.2,'*1000 50 stealth, *1000 50 dark','len'},
				{630-.05,.2,'*1000 50 stealth, *1000 50 dark','len'},
				{630.5-.05,.2,'*1000 50 stealth, *1000 50 dark','len'},
				{631-.05,.2,'*1000 50 stealth, *1000 50 dark','len'},
				
				{640,.2,'*10000 50 stealth, *10000 75 dark, *10000 0.2x','len'},
				{640.2,5-.2,'*0.5 1.4x, *0.75 stealth','len'},
				
				{456+64,584,'*0.07 200 hiddenoffset','end'},
			
			}
			
			
			
			
			
			
			
			--simple_m0d(454,800,1,'bumpy');

			--time based mods
			mod_time = 0;
			--{time_start, time_end, mods, len_or_end, player_number}
			mods2 = {
			--{0,200,'3x','end',1},
			}
			
			
			curaction = 1;
			--{beat,message,persists}
			mod_actions = {
				
			
				{0,function()
					char_shame:x(SCREEN_CENTER_X);--Use SCREEN variables. -Kid
					char_shame:y(SCREEN_CENTER_Y);
					char_shame:queuecommand('Spawn');
				end},
				
				{380,function()
					char_shame:x(-150*gat_aft_height_ratio);--Scale position. -Kid
					char_shame:y(SCREEN_CENTER_Y);
					char_shame:queuecommand('SpawnQ');
				end},
				
				{446,function()
					char_shame:stoptweening()
					char_shame:queuecommand('HideQ');
				end},
				
				{454,function()
					
				end},
				{456,function()
					--char_shame:queuecommand('Hide');
				end},
			
				{0,function()
					for pn=1,2 do
						local a = Plr(pn)
						if a then
							a:decelerate(120/205);
							a:rotationz(360);
							a:sleep(0);
							a:rotationz(0);
						end
					end
					MESSAGEMAN:Broadcast('ProxyThis')--This sets up our screen aft. -Kid
				end},
			
				{3,function()
					if P1 then
						P1:bouncebegin(60/205);
						P1:x(SCREEN_CENTER_X);
						P1:sleep(0);
						P1:zoomx(2*gat_height_ratio);--Scale zoom. -Kid
						P1:decelerate(60/205);
						P1:zoomx(gat_height_ratio);
					end
					if P2 then
						P2:bouncebegin(60/205);
						P2:x(SCREEN_CENTER_X)
						P2:sleep(0);
						P2:zoomx(2*gat_height_ratio);
						P2:decelerate(60/205);
						P2:zoomx(gat_height_ratio);
					end
				end},
				
				--{8,function() GAMESTATE:KeyPress(113) end},
				
				{4,function()
					for pn=1,2 do
						local a = _G['P'..pn]
						local d = -1
						if pn == 2 then d = 1 end
						if a then
							a:x(SCREEN_CENTER_X);
							a:y(SCREEN_CENTER_Y);
							a:GetChild('Judgment'):x(200*d*gat_sdwidth_ratio):sleep(37.975);
							a:GetChild('Combo'):x(200*d*gat_sdwidth_ratio):sleep(37.975);--Hold position. -Kid
						end
					end
				end,true},
				
				{144,function()
					for pn=1,2 do
						local a = _G['P'..pn]
						local d = -1
						if pn == 2 then d = 1 end
						if a then
							a:GetChild('Judgment'):x(0);
							a:GetChild('Combo'):x(0);
						end
					end
				end,true},
				
				
				
				{96,function()
					for pn=1,2 do
						local a = _G['gat_prottilt'..pn]
						local d = 1; if pn == 2 then d = -1 end
						if a then
							a:linear(480/205);
							a:x(20*d);
						end
					end
				end},
				
				{127,'MakeProxy1',true},
				{128,'WhiteFlashLong'},
				{128,'ShowAFT',true},
				{128,'ShowAFTBG'},
				{252,'HideAFT',true},
				{128.001,'StartShit2',true},
				
				{128,function()
					for pn=1,2 do
						local d = 0.5; --if pn == 2 then d = 0.75 end
						local a = _G['P'..pn]
						if a then
							a:x(SCREEN_WIDTH*0.5);
							a:y(SCREEN_CENTER_Y);
							a:z(0);
							a:rotationx(0);
							a:rotationz(0);
							a:zoom(gat_height_ratio);--Scale zoom
						end
					end
				end},
			
				{191,function()
					gat_scroller:linear(60/205)
					gat_scroller:x(0);
					gat_scroller:y(0);
				end},
				
				{192,function()
					
					gat_shitprox_offset:x(SCREEN_CENTER_X*0.8)
					gat_shitprox_offset:y(SCREEN_CENTER_Y*0.8)
					
					for pn=1,2 do
						for i=1,9 do
							gat_proxies[pn][i]:addx(SCREEN_CENTER_X*0.8)
							gat_proxies[pn][i]:addy(SCREEN_CENTER_Y*0.8)
						end
					end
					
					for pn=1,2 do
						local a = Plr(pn)
						if a then
							a:x(0);
							a:y(0);
						end
					end
				
					gat_scroller2:linear(960/205);
					gat_scroller2:addx(2);
					gat_scroller2:addy(-1);
				end},
				
				{229,function()
					gat_scroller2:linear(960/205);
					gat_scroller2:addx(-4);
				end},
				
				--[[
				{224-.15,function()
					gat_scroller:linear(0.1)
					gat_scroller:addx(3);
					gat_scroller:addy(-4.5);
					gat_scroller:sleep(240/205 - 0.1)
					gat_scroller:linear(0.1)
					gat_scroller:addx(-3);
					gat_scroller:addy(4.5);
				end},
				{232-.15,function()
					gat_scroller:linear(0.1)
					gat_scroller:addx(-3);
					gat_scroller:addy(4.5);
					gat_scroller:sleep(240/205 - 0.1)
					gat_scroller:linear(0.1)
					gat_scroller:addx(3);
					gat_scroller:addy(-4.5);
				end},
				{240-.15,function()
					gat_scroller:linear(0.1)
					gat_scroller:addx(3);
					gat_scroller:addy(-4.5);
					gat_scroller:sleep(240/205 - 0.1)
					gat_scroller:linear(0.1)
					gat_scroller:addx(-3);
					gat_scroller:addy(4.5);
				end},
				{248-.15,function()
					gat_scroller:linear(0.1)
					gat_scroller:addx(-3);
					gat_scroller:addy(4.5);
					gat_scroller:sleep(240/205 - 0.1)
				end},
				]]
				
				{252.001,'StopShit',true},
				{252.002,'GotoSides'},
				{256,'GotoSidesFast',true},
				{256,'Rotator'},
				
				
				
				{444,'SplitReset'},
				
				--colswaps
				{448,function() for pn = 1, 2 do local a = _G['P'..pn] if a then
					a:decelerate(0.1); a:rotationz(-30);
				end end end},
				{448.75,function() for pn = 1, 2 do local a = _G['P'..pn] if a then
					a:decelerate(0.1); a:rotationz(-20);
				end end end},
				{449.5,function() for pn = 1, 2 do local a = _G['P'..pn] if a then
					a:decelerate(0.1); a:rotationz(-10);
				end end end},
				{450.25,function() for pn = 1, 2 do local a = _G['P'..pn] if a then
					a:decelerate(0.1); a:rotationz(0);
				end end end},
				{451,function() for pn = 1, 2 do local a = _G['P'..pn] if a then
					a:decelerate(0.1); a:rotationz(10);
				end end end},
				{451.75,function() for pn = 1, 2 do local a = _G['P'..pn] if a then
					a:decelerate(0.1); a:rotationz(20);
				end end end},
				{452.5,function() for pn = 1, 2 do local a = _G['P'..pn] if a then
					a:decelerate(0.1); a:rotationz(30);
				end end end},
				{453.25,function() for pn = 1, 2 do local a = _G['P'..pn] if a then
					a:decelerate(0.1); a:rotationz(40);
				end end end},
				{454,function() for pn = 1, 2 do local a = _G['P'..pn] if a then
					a:decelerate(0.1); a:rotationz(50); if pn==1 then a:addx(40) else a:addx(-40) end
					a:accelerate((120/205)-0.1); a:rotationz(360); a:x(SCREEN_CENTER_X);
					a:sleep(0); a:rotationz(0);
					
					MESSAGEMAN:Broadcast('TargOn');
					
				end end end},
				{454,'BlindOn'},--THe second set of Blind. -Kid
				{456,'BlindOff'},
				
				{456,'TargOnFast',true},
				{456,'CenterJoinFast',true},
				
				{60,'SetUpS',true},
				{456,'GetProxy',true},
				{456,function()
					for pn=1,2 do
						local d = 0.25; if pn == 2 then d = 0.75 end
						local a = _G['P'..pn]
						if a then
							a:visible(false);
						end
						local b = _G['jud'..pn..'p']
						if b then
							b:visible(true);
							b:basezoomx(0.6);
							b:basezoomy(0.6);
							b:x(SCREEN_WIDTH*d)
							b:y(SCREEN_HEIGHT*0.45)
						end
						local c = _G['com'..pn..'p']
						if c then
							c:visible(true);
							c:basezoomx(0.6);
							c:basezoomy(0.6);
							c:x(SCREEN_WIDTH*d)
							c:y(SCREEN_HEIGHT*0.5)
						end
					end
					
					--[[
					for i=1,8 do
						local b = gat_splitrot2[i]
						if b then
							b:x(math.random(-50,50))
							b:y(math.random(-50,50))
							b:z(math.random(-50,50))
						end
					end
					]]
					
					for pn=1,4 do
						local a = Proxy(pn)
						local d = 0.5; --if pn > 2 then d = 0.75 end
						if a then
							if pn<3 then
								a:visible(true);
								_G['proxP'..pn..'p']:visible(true);--We apply it to the proxy as well. -Kid
							end
							a:x(SCREEN_WIDTH*d);
							a:y(SCREEN_HEIGHT/2);
							a:vibrate();
						end
					end
					
				end,true},
				
				--
				{1508,function()
					if FUCK_EXE and STATSMAN:GetCurStageStats() then
						for pn = 1,2 do
							if GAMESTATE:IsPlayerEnabled(pn-1) then
								local ebonus = _G['uksrt_p'..pn..'bonus']
								local poss = STATSMAN:GetCurStageStats():GetPlayerStageStats(pn-1):GetPossibleDancePoints()
								local act = STATSMAN:GetCurStageStats():GetPlayerStageStats(pn-1):GetActualDancePoints()
								local bonus = ebonus*(poss/100)
								STATSMAN:GetCurStageStats():GetPlayerStageStats(pn-1):SetActualDancePoints(act+bonus);
							end
						end
					end
				end},
				
				
			}
			
			
			
			
			-----------------------------------------------------
			------------GUARDIAN GIRL'S GERBERA GOT GERM---------
			-----------------------------------------------------
			
			--mod_insert(0,60,'*10 50 flip','end');
			
			--#1/2: tumblr stuff
			--mod_insert(60,128,'*10000 centered, *10000 1.2x','end')
			--mod_insert(60,128,'*10000 80 drawsize, *10000 100 sudden, *10000 -30 suddenoffset, *10000 100 stealthtype','end')
			
			--[[
			for i=0,15 do
				table.insert(mod_actions,{64+(4*i),function() gat_swap(-1,0,60/205,'spring') end})
				table.insert(mod_actions,{65+(4*i),function() gat_swap(0,1,60/205,'spring') end})
				table.insert(mod_actions,{66+(4*i),function() gat_swap(1,0,60/205,'spring') end})
				table.insert(mod_actions,{67+(4*i),function() gat_swap(0,-1,60/205,'spring') end})
			end
			]]
			
			--[[
			for i=0,15 do
				table.insert(mod_actions,{64+(4*i),function() gat_swap(-1,0,60/205,'bouncebegin') end})
				table.insert(mod_actions,{65+(4*i),function() gat_swap(0,1,60/205,'bouncebegin') end})
				table.insert(mod_actions,{66+(4*i),function() gat_swap(1,0,60/205,'bouncebegin') end})
				table.insert(mod_actions,{67+(4*i),function() gat_swap(0,-1,60/205,'bouncebegin') end})
			end
			]]
			
			--[[
			mod_message(60,function()
					if P1 then
						P1:x(128);
					end
					if P2 then
						P2:x(SCREEN_WIDTH-128);
					end
				end)
			
			mod_insert(60,128,'*10000 300 movex','end',1);
			mod_insert(60,128,'*10000 -300 movex','end',2);
			]]
			
			--[[
			mod_insert(60,128,'*10000 20 dizzy','end',1);
			mod_insert(60,128,'*10000 -20 dizzy','end',2);
			]]
			
			--mod_insert(128,1,'*10000 no movex, *10000 no dizzy','len');
			
			
			--[[
			local zmult = 50;
			
			for i=0,30 do
				local amt = i*5;
				--table.insert(mods,{60,128,'*10000 '..amt..' spline0zoffset'..i..', *10000 '..(zmult*math.cos(((amt/100)*math.pi*2)+(math.pi/2)))..' spline0z'..i,'end'});
				table.insert(mods,{60,128,'*10000 '..amt..' splinexoffset'..i..', *10000 -10 splinex'..i,'end',1});
				table.insert(mods,{60,128,'*10000 '..amt..' splinexoffset'..i..', *10000 10 splinex'..i,'end',2});
			end
			]]
			
			--[[
			for i=0,30 do
				local amt = i*5;
				--table.insert(mods,{60,128,'*10000 '..amt..' spline0zoffset'..i..', *10000 '..(zmult*math.cos(((amt/100)*math.pi*2)+(math.pi/2)))..' spline0z'..i,'end'});
				table.insert(mods,{60,128,'*10000 '..amt..' splinezoffset'..i..', *10000 -5 splinez'..i,'end'});
				table.insert(mods,{60,128,'*10000 '..amt..' splineyoffset'..i..', *10000 -5 spliney'..i,'end'});
			end
			]]
			
			--WHENEVER YOU WANT FUNCTION LOOPS TO BEHAVE RIGHT, REMEMBER THIS
			--[[
			for i=0,7 do
				local p = i
				mod_message(i,function()
					Trace(p);
				end);
			end
			]]
			
			
			mod_message(8,function()
				gat_g_rot_intro:accelerate(30/205)
				gat_g_rot_intro:y(20)
				gat_g_rot_intro:decelerate(30/205)
				gat_g_rot_intro:y(40)
				gat_g_rot_intro:accelerate(30/205)
				gat_g_rot_intro:y(30)
				gat_g_rot_intro:decelerate(30/205)
				gat_g_rot_intro:y(20)
				gat_g_rot_intro:accelerate(30/205)
				gat_g_rot_intro:y(40)
				gat_g_rot_intro:decelerate(30/205)
				gat_g_rot_intro:y(60)
				gat_g_rot_intro:accelerate(30/205)
				gat_g_rot_intro:y(30)
				gat_g_rot_intro:decelerate(30/205)
				gat_g_rot_intro:y(0)
			end)
			
			mod_message(12,function()
				gat_g_rot_intro:accelerate(30/205)
				gat_g_rot_intro:z(20)
				gat_g_rot_intro:decelerate(30/205)
				gat_g_rot_intro:z(40)
				gat_g_rot_intro:accelerate(30/205)
				gat_g_rot_intro:z(30)
				gat_g_rot_intro:decelerate(30/205)
				gat_g_rot_intro:z(20)
				gat_g_rot_intro:accelerate(30/205)
				gat_g_rot_intro:z(40)
				gat_g_rot_intro:decelerate(30/205)
				gat_g_rot_intro:z(60)
				gat_g_rot_intro:accelerate(30/205)
				gat_g_rot_intro:z(45)
				gat_g_rot_intro:decelerate(30/205)
				gat_g_rot_intro:z(30)
			end)
			
			mod_insert(16-.1,1,'*10 dark','len')
			mod_insert(16.75-.1,1,'*10 no dark','len')
			
			local function wrapcols(num)
				local cols = {'cross','alternate','split'}
				return cols[math.mod(num,3)+1]
			end
			
			mod_insert(0,60,'*8 no cross, *8 no split, *8 no alternate','end');
			for i=0,16 do
				mod_insert(i,0.5,'*8 50 '..(wrapcols(i)),'len')
			end
			
			mod_message(28,function() gat_g_rot_intro:y(60) end)
			mod_message(29,function() gat_g_rot_intro:y(30) end)
			mod_message(30,function() gat_g_rot_intro:y(60) end)
			mod_message(31,function() gat_g_rot_intro:y(20) end)
			
			for i=48,55 do
				mod_insert(i,0.5,'*8 50 cross','len')
			end
			for i=0,56,8 do
				if i ~= 16 and i~= 24 and i~=48 then
					mod_insert(i-.1,4,'*10 reverse','len');
					mod_insert(i-.1+4,4,'*10 no reverse','len');
				end
			end
			
			mod_insert(36-.1,4,'*10 flip')
			mod_insert(40-.1,4,'*10 no flip, *10 invert')
			mod_insert(44-.1,4,'*10 no invert')
			
			mod_insert(44-.1,1,'*5 50 reverse')
			mod_insert(45-.1,1,'*5 no reverse')
			mod_insert(45.5-.05,1,'*20 invert');
			mod_insert(45.75-.05,1,'*20 no invert');
			mod_insert(46-.05,1,'*20 invert');
			mod_insert(46.5-.05,1,'*6.66 66 invert');
			mod_insert(47-.05,1,'*6.66 33 invert');
			mod_insert(47.5-.05,1,'*6.66 no invert');
			
			mod_insert(48-.1,8,'*10 flip *10 reverse, *10 beat')
			mod_insert(55.5,1,'*10 no beat')
			mod_insert(56-.1,4,'*10 no flip, *10 no reverse')
			
			mod_message(48,function() gat_g_skewer_intro:x(0.1) end)
			mod_message(52,function() gat_g_skewer_intro:x(0.2) end)
			mod_message(56,function() gat_g_skewer_intro:x(0.3) end)
			
			--switcheroo_add(beat,which,speed,len,pn)
			switcheroo_add(57.375,'dlru',10000,2);
			mod_message(57.375,function() gat_g_skewer_intro:x(0.2) end)
			switcheroo_add(58.917,'drlu',10000,2);
			mod_message(58.917,function() gat_g_skewer_intro:x(0.4) end)
			switcheroo_add(59.250,'rdul',10000,2);
			mod_message(59.250,function() gat_g_skewer_intro:x(0.2) end)
			switcheroo_add(59.583,'drlu',10000,2);
			mod_message(59.583,function() gat_g_skewer_intro:x(0.4) end)
			switcheroo_add(60.750,'rdul',10000,2);
			mod_message(60.750,function() gat_g_skewer_intro:x(0.2) end)
			switcheroo_add(61.083,'urld',10000,2);
			mod_message(61.083,function() gat_g_skewer_intro:x(0.4) end)
			
			mod_insert(62.625,1,'*10000 no flip, *10000 no invert');
			mod_message(63,function() switcheroo_reset() end)
			
			mod_message(57,function() gat_g_skewer_intro:x(0.1) end)
			mod_message(58,function() gat_g_skewer_intro:x(0.3) end)
			mod_message(59.25,function() gat_g_skewer_intro:x(0.2) end)
			mod_message(60,function() gat_g_skewer_intro:x(0.3) end)
			
			mod_message(60,function() gat_g_rot_intro:x(20) gat_g_rot_intro:z(30) end)
			mod_message(60.75,function() gat_g_rot_intro:z(0) end)
			mod_message(61.875,function() gat_g_rot_intro:z(30) end)
			mod_message(62.875,function() gat_g_rot_intro:y(40) end)
			mod_message(64,function() gat_g_rot_intro:x(0) gat_g_rot_intro:y(0) gat_g_rot_intro:z(0) gat_g_skewer_intro:x(0) end)
			
			mod_message(76.5,function() gat_g_skewer_intro:x(0.3) end)
			mod_message(77.5,function() gat_g_skewer_intro:x(0) end)
			mod_message(78,function() gat_g_skewer_intro:x(0.3) end)
			mod_message(80,function() gat_g_skewer_intro:x(0) end)
			mod_message(125,function() gat_g_skewer_intro:x(0.3) end)
			mod_message(127,function() gat_g_skewer_intro:x(0) end)
			
			mod_message(32,function()
				for pn=1,2 do
					local a = Plr(pn)
					if a then
						a:bounce()
						a:effectperiod(1)
						a:effectclock('bgm');
						a:effectmagnitude(0,-100*gat_height_ratio,0);--These get scaled. -Kid
					end
				end
			end)
			mod_message(36,function()
				for pn=1,2 do
					local a = Plr(pn)
					if a then
						a:bob()
						a:effectperiod(1)
						a:effectclock('bgm');
						a:effectmagnitude(100*gat_height_ratio,0,0);--These get scaled. -Kid
					end
				end
			end)
			mod_message(40,function()
				for pn=1,2 do
					local a = Plr(pn)
					if a then
						a:wag()
						a:effectperiod(1)
						a:effectclock('bgm');
						a:effectmagnitude(0,0,30);
					end
				end
			end)
			mod_message(44,function()
				for pn=1,2 do
					local a = Plr(pn)
					if a then
						a:stopeffect();
					end
				end
			end)
			
			mod_message(17.25,function()
				gat_g_skewer_intro:x(0.6)
				gat_g_skewer_intro:sleep(0.375*60/205)
				gat_g_skewer_intro:x(0)
				gat_g_skewer_intro:sleep(0.375*60/205)
				gat_g_skewer_intro:x(0.6)
				gat_g_skewer_intro:sleep(0.375*60/205)
				gat_g_skewer_intro:x(0)
			end)
			
			mod_insert(19-.1,1,'*10 flip');
			mod_insert(19.5-.1,1,'*10 no flip');
			
			simple_m0d2(20.25,400,2,'tipsy',1);
			simple_m0d2(20.25,400,2,'drunk',1);
			simple_m0d2(20.25,-400,2,'tipsy',2);
			simple_m0d2(20.25,-400,2,'drunk',2);
			
			mod_message(21,function()
				gat_g_rot_intro:accelerate(2)
				gat_g_rot_intro:z(0)
			end)
			
			simple_m0d(24,300,0.3,'drunk')
			simple_m0d(24.5,-300,0.3,'drunk')
			simple_m0d(25,300,0.3,'drunk')
			
			simple_m0d(26,-300,0.3,'drunk')
			simple_m0d(27,300,0.3,'drunk')
			simple_m0d(27.5-.2,300,0.3,'tipsy')
			
			local function chaos(beat,spd,pn)
				mod_insert(beat,(1/spd)+.1,'*'..(10*spd)..' 300 drunk, *'..(10*spd)..' tipsy, *'..(5*spd)..' 100 mini, *'..(5*spd)..' no stealth, *'..(5*spd)..' dark, *'..(4*spd)..' -100 flip','len',pn);
				mod_insert(beat+(1/spd),(1/spd)+.1,'*'..(10*spd)..' no drunk, *'..(10*spd)..' no tipsy, *'..(5*spd)..' no mini, *'..(5*spd)..' 100 stealth, *'..(5*spd)..' no dark, *'..(4*spd)..' no flip','len',pn);
				mod_insert(beat+(2/spd),(1/spd)+.1,'*'..(5*spd)..' no stealth','len',pn);
			end
			
			local function mod_invt(beat)
				mod_insert(beat-.1,3,'*3.2 centered')
				mod_insert(beat+.75-.1,.1,'*20 no centered')
				mod_insert(beat+1.5-.1,.1,'*20 no centered')
				mod_insert(beat+2-.1,1,'*20 no centered')
			end
			
			local bfluct = 1
			for i=64,126 do
				if not mod_blacklist({82,83,84,90,91,92,93,94,107,108,109,110,111},i) then
					chaos(i,1,bfluct)
					if bfluct == 1 then
						bfluct = 2
					else
						bfluct = 1
					end
				end
			end
			
			mod_invt(83)
			mod_invt(109)
			
			mod_message(82-.1,function()
				for pn=1,2 do
					local a = Plr(pn)
					local d = -1; if pn == 2 then d = 1 end
					if a then
						a:linear(0.1)
						a:addx(32*d*gat_height_ratio)--This gets scaled, too. -Kid
					end
				end
			end)
			mod_insert(82-.1,4,'*5 -50 flip');
			mod_insert(83-.1,2,'*20 150 flip','len',1);
			mod_insert(83.75-.1,2,'*20 150 flip','len',2);
			mod_insert(84.5-.1,2,'*20 -50 flip','len',1);
			mod_insert(85-.1,2,'*20 -50 flip','len',2);
			mod_insert(85,2,'*1.71 no flip');
			mod_message(85,function()
				for pn=1,2 do
					local a = Plr(pn)
					local d = -1; if pn == 2 then d = 1 end
					if a then
						a:decelerate(60/205)
						a:addx(-32*d*gat_height_ratio)--This gets scaled, too. -Kid
					end
				end
			end)
			
			
			mod_message(92-.1,function()
				for pn=1,2 do
					local a = Plr(pn)
					local d = -1; if pn == 2 then d = 1 end
					if a then
						a:linear(0.1)
						a:addx(32*d*gat_height_ratio)--This gets scaled, too. -Kid
					end
				end
			end)
			mod_insert(92-.1,4,'*5 -50 flip');
			
			mod_insert(92.5-.1,2,'*20 200 invert','len',1);
			mod_insert(93-.1,2,'*20 200 invert','len',2);
			mod_insert(93.5-.1,2,'*20 no invert, *20 150 flip','len',1);
			mod_insert(94-.1,2,'*20 no invert, *20 150 flip','len',2);
			mod_insert(94.5-.1,2,'*20 -50 flip','len',1);
			mod_insert(95-.1,2,'*20 -50 flip','len',2);
			
			mod_insert(95,2,'*1.71 no flip');
			mod_message(95-.1,function()
				for pn=1,2 do
					local a = Plr(pn)
					local d = -1; if pn == 2 then d = 1 end
					if a then
						a:bouncebegin(60/205)
						a:addx(32*-d*gat_height_ratio)--This gets scaled, too. -Kid
					end
				end
			end)
			
			mod_insert(82.5,2,'*1000 no beat');
			mod_insert(108.5,2,'*1000 no beat');
			
			mod_message(108-.1,function()
				for pn=1,2 do
					local a = Plr(pn)
					local d = -1; if pn == 2 then d = 1 end
					if a then
						a:linear(0.1)
						a:addx(32*d*gat_height_ratio)--This gets scaled, too. -Kid
					end
				end
			end)
			mod_insert(108-.1,4,'*5 -50 flip');
			mod_insert(109-.1,2,'*20 150 flip','len',1);
			mod_insert(109.75-.1,2,'*20 150 flip','len',2);
			mod_insert(110.5-.1,2,'*20 -50 flip','len',1);
			mod_insert(111-.1,2,'*20 -50 flip','len',2);
			mod_insert(111,2,'*1.71 no flip');
			mod_message(111,function()
				for pn=1,2 do
					local a = Plr(pn)
					local d = -1; if pn == 2 then d = 1 end
					if a then
						a:decelerate(60/205)
						a:addx(-32*d*gat_height_ratio)--This gets scaled, too. -Kid
					end
				end
			end)
			
			--mod_insert(128,16,'*100 blind')
			--mod_insert(144,1,'*100 no blind')
			mod_message(128,'BlindOn');--These replace the mod Blind. -Kid
			mod_message(144,'BlindOff');
			
			for i=0,7 do
				mod_insert(192-.1+(8*i),4,'*4 no flip','len')
				mod_insert(196-.1+(8*i),4,'*4 flip','len')
				mod_insert(200-.1+(8*i),4,'*4 no flip','len')
			end
			
			mod_message(196,function()
				gat_shitproxy_rot2:accelerate(120/205)
				gat_shitproxy_rot2:x(90)
				gat_shitproxy_rot2:decelerate(120/205)
				gat_shitproxy_rot2:x(180)
			end);
			mod_message(204,function()
				gat_shitproxy_rot1:accelerate(120/205)
				gat_shitproxy_rot1:x(90)
				gat_shitproxy_rot1:decelerate(120/205)
				gat_shitproxy_rot1:x(180)
				gat_shitproxy_rot2:accelerate(120/205)
				gat_shitproxy_rot2:x(270/3)
				gat_shitproxy_rot2:decelerate(120/205)
				gat_shitproxy_rot2:x(360*0)
				gat_shitproxy_rot2:sleep(0)
				gat_shitproxy_rot2:x(0)
			end);
			mod_message(212,function()
				gat_shitproxy_rot2:accelerate(120/205)
				gat_shitproxy_rot2:x(90)
				gat_shitproxy_rot2:decelerate(120/205)
				gat_shitproxy_rot2:x(180)
				gat_shitproxy_rot1:accelerate(120/205)
				gat_shitproxy_rot1:x(270/3)
				gat_shitproxy_rot1:decelerate(120/205)
				gat_shitproxy_rot1:x(360*0)
				gat_shitproxy_rot1:sleep(0)
				gat_shitproxy_rot1:x(0)
			end);
			mod_message(220,function()
				gat_shitproxy_rot1:accelerate(120/205)
				gat_shitproxy_rot1:x(90)
				gat_shitproxy_rot1:decelerate(120/205)
				gat_shitproxy_rot1:x(180)
				gat_shitproxy_rot2:accelerate(120/205)
				gat_shitproxy_rot2:x(270/3)
				gat_shitproxy_rot2:decelerate(120/205)
				gat_shitproxy_rot2:x(360*0)
				gat_shitproxy_rot2:sleep(0)
				gat_shitproxy_rot2:x(0)
			end);
			mod_message(228,function()
				gat_shitproxy_rot2:accelerate(120/205)
				gat_shitproxy_rot2:x(90)
				gat_shitproxy_rot2:decelerate(120/205)
				gat_shitproxy_rot2:x(180)
				gat_shitproxy_rot1:accelerate(120/205)
				gat_shitproxy_rot1:x(270/3)
				gat_shitproxy_rot1:decelerate(120/205)
				gat_shitproxy_rot1:x(360*0)
				gat_shitproxy_rot1:sleep(0)
				gat_shitproxy_rot1:x(0)
			end);
			mod_message(236,function()
				gat_shitproxy_rot1:accelerate(120/205)
				gat_shitproxy_rot1:x(90)
				gat_shitproxy_rot1:decelerate(120/205)
				gat_shitproxy_rot1:x(180)
				gat_shitproxy_rot2:accelerate(120/205)
				gat_shitproxy_rot2:x(270/3)
				gat_shitproxy_rot2:decelerate(120/205)
				gat_shitproxy_rot2:x(360*0)
				gat_shitproxy_rot2:sleep(0)
				gat_shitproxy_rot2:x(0)
			end);
			mod_message(244,function()
				gat_shitproxy_rot2:accelerate(120/205)
				gat_shitproxy_rot2:x(90)
				gat_shitproxy_rot2:decelerate(120/205)
				gat_shitproxy_rot2:x(180)
				gat_shitproxy_rot1:accelerate(120/205)
				gat_shitproxy_rot1:x(270/3)
				gat_shitproxy_rot1:decelerate(120/205)
				gat_shitproxy_rot1:x(360*0)
				gat_shitproxy_rot1:sleep(0)
				gat_shitproxy_rot1:x(0)
			end);
			
			mod_message(252,function()
				gat_shitproxy_rot2:x(0)
				gat_shitproxy_rot1:x(0)
			end);
			
			simple_m0d(128,1000,4.5,'drunk');
			simple_m0d(128,1000,4.5,'tipsy');
			
			for i=0,3 do
				mod_wiggle(196-.2+(16*i),6,2,150,1,'drunk');
			end
			for i=0,2 do
				mod_wiggle(204-.2+(16*i),6,2,150,1,'tipsy');
			end
			
			--mod_insert(1014.75,9999,'*0.5 1.7x','end');
			mod2_insert(317.882-.05,0.2,'*10 stealth','len');
			mod2_insert(317.982+.05,0.2,'*4 no stealth','len');
			
			mod2_insert(317.982,0.1,'*100000 0.5x','len');
			mod2_insert(317.982+.1,0.5,'*1.7 1.6x','len');			
			
			mod_insert(316,380,'1.7x','end');
			mod_insert(384,454,'1.7x','end');
			
			simple_m0d2(156,50,1,'reverse');
			simple_m0d2(156,800,1.5,'bumpy');
			
			--simple_m0d3(beat,strength,duration,bpm,mod,pn)
			for i=288,314,2 do
				simple_m0d3(i,200,0.5,205,'drunk',1)
				simple_m0d3(i+1,-200,0.5,205,'drunk',2)
			end
			
			mod_insert(288,316,'*1 centered','end',1);
			mod_insert(289,316,'*1 centered','end',2);
			for i=290,315,2 do
				mod_insert(i-.05,.2,'*20 -25 centered','len',1);
				mod_insert(i+1-.05,.2,'*20 -25 centered','len',2);
			end
			mod_insert(316-.1,.5,'*20 no centered','len');
			
			mod_wiggle(316,5,4,200,4,'tipsy');
			mod_wiggle(317.5,4,2,150,3,'drunk');
			
			for i=320,374,2 do
				simple_m0d2(i-.05,-100,0.3,'tiny',2);--Converted strength to its' SM5 equivalent. -Kid
				simple_m0d2(i+1-.05,-100,0.3,'tiny',1);
			end
			
			--mod_springt(time,strength,dur,mod,pn)
			mod_springt(101.540,400,60/205,'drunk');
			mod_wiggle(349.5,3,4,200,4,'drunk');
			mod_wiggle(350.5,3,4,200,4,'tipsy');
			
			--[[
			simple_m0d2(352,-200,0.3,'tiny',2);
			simple_m0d2(353,-200,0.3,'tiny',1);
			simple_m0d2(354,-200,0.3,'tiny',2);
			simple_m0d2(355,-200,0.3,'tiny',1);
			]]
			
			mod_insert(363.5,1,'*10000 1000 dizzy','len');
			mod_insert(364,1,'*10000 no dizzy','len');
			
			mod_insert(372-.1,1,'*10 flip','len');
			mod_insert(372.5-.1,1,'*10 no flip','len');
			
			mod_insert(376.5-.05,1,'*3 -30 reverse','len');
			mod_insert(377-.05,1,'*3 no reverse','len');
			mod_insert(377.5-.05,1,'*3 -30 reverse','len');
			mod_insert(378-.05,1,'*3 no reverse','len');
			mod_insert(378.5-.05,1,'*3 -30 reverse','len');
			mod_insert(379-.05,1,'*3 no reverse','len');
			simple_m0d2(379.5-.1,100,0.5,'flip');
			
			--[[
			simple_m0d2(368,-200,0.3,'tiny',2);
			simple_m0d2(369,-200,0.3,'tiny',1);
			simple_m0d2(370,-200,0.3,'tiny',2);
			simple_m0d2(371,-200,0.3,'tiny',1);
			]]
			
			simple_m0d2(380,200,0.8,'tornado');
			
			function gat_onerot()
				gat_rotator:accelerate(60/205);
				gat_rotator:addx(90);
				gat_rotator:decelerate(180/205);
				gat_rotator:addx(90);
				gat_rotator:accelerate(60/205);
				gat_rotator:addx(-90);
				gat_rotator:decelerate(180/205);
				gat_rotator:addx(-90);
			end
			
			function gat_doskew(amt,dur)
				if not amt then amt = 0 end
				if not dur then dur = 1 end
				gat_g_skewer:linear(dur*0.125*60/205)
				gat_g_skewer:x(amt);
				gat_g_skewer:linear(dur*0.875*60/205)
				gat_g_skewer:x(0);
			end
			
			--crossup
			mod_message(320,function()
					gat_crossup:x(0);
					gat_crossup:z(0);
					gat_crossup:linear(60/205);
					gat_crossup:x(3);
					gat_crossup:z(6);
					gat_crossup:linear(60*60/205);
					gat_crossup:x(8);
					gat_crossup:z(16);
				end);
				
			--mod_message(344,function() gat_onerot() end);
			mod_message(328,function() gat_doskew(0.1,4) end);
			mod_message(332,function() gat_doskew(-0.2,4) end);
			mod_message(336,function() gat_doskew(0.3,4) end);
			mod_message(340,function() gat_doskew(-0.4,4) end);
			mod_message(344,function() gat_doskew(0.5,4) end);
			mod_message(348,function() gat_doskew(-0.6,4) end);
			mod_message(352,function() gat_doskew(0.7,4) end);
			mod_message(356,function() gat_doskew(-0.8,4) end);
			mod_message(360,function() gat_doskew(0.9,4) end);
			mod_message(364,function() gat_doskew(-1.0,4) end);
			mod_message(368,function() gat_doskew(1.0,4) end);
			mod_message(372,function() gat_doskew(-1.0,4) end);
			mod_message(376,function() gat_doskew(1.0,4) end);
			mod_message(380,function() gat_doskew(-1.0,4) end);
				
				--{384-.1,'Deow'},
			mod_message(380,function() for pn = 1, 2 do local a = _G['P'..pn] if a then
					--a:wag(); a:effectperiod(2); a:effectclock('bgm'); a:effectmagnitude(0,0,0);
					--a:linear(240/205); a:rotationx(10);
					a:vibrate();
					a:effectmagnitude(0,0,0);
				end end end);
			mod_message(380,function()
				gat_crossup:decelerate(240/205);
				gat_crossup:x(0);
				gat_crossup:z(0);
				gat_bg:vibrate();
				gat_bg:effectmagnitude(0,0,0);
			end);
			mod_message(384,function()
					gat_deow:x(30);
					gat_deow:linear(60*(60/205));
					gat_deow:x(90);
				end,true);
			mod_message(444,function()
				gat_bgvib:linear(120/205);
				gat_bgvib:x(30);
				gat_bgvib:y(30);
				gat_bgvib:decelerate(60/205);
				gat_bgvib:x(35);
				gat_bgvib:y(35);
				gat_bgvib:decelerate(60/205);
				gat_bgvib:x(0);
				gat_bgvib:y(0);
			end);
			
			mod_message(432,function() for pn = 1, 2 do local a = _G['P'..pn] if a then
					a:stopeffect();
				end end end);
			mod_message(448,function() gat_bg:stopeffect() end);
			
			gat_curscb = 1;
			gat_scb = {384,386.5,388,390.5,392,394.5,396,397.5,398.5,
			384+16,386.5+16,388+16,390.5+16,392+16,394.5+16,396+16,397.5+16,398.5+16,
			416,417.5,418.5,420,421.5,422.5,424,425.5,426.5,428,429.5,430.5,
			432,432.5,432.75,433,433.5,434.5,435,435.5,436,436.5,436.75,437,437.5,438.5,439,439.25,439.5,
			440,440.5,441,441.5,442,442.5,443};
			
			for i=444,446,0.25 do
				table.insert(gat_scb,i);
			end
			
			table.insert(gat_scb,447);
			
			
			
			
			
			
			
			
			-----------------------------------------------------
			------------ABANDON----------------------------------
			-----------------------------------------------------
			
			for i=456,583,2 do
				table.insert(mod_actions,{i-.1,'RollingFadeUp'});
				table.insert(mod_actions,{i+1-.1,'RollingFadeDown'});
			end	
			
			mod_message(456-.1,'SlamLeft1');
			mod_message(457-.1,'SlamRight2');
			--beat,num,div,amt,speed,mod,pn
			mod_wiggle(458-.1,3,2,60,2,'drunk');
			mod_wiggle(459-.1,17,8,60,100,'drunk');
			mod_message(460-.1,'SlamLeft1');
			mod_wiggle(460.4,5,4,100,2,'tipsy');
			mod_message(462-.1,'SlamLeft1');
			mod_message(463-.1,'SlamRight2');
			
			mod_message(464-.1,'SlamLeft1');
			mod_message(465-.1,'SlamRight2');
			mod_message(466-.1,'SlamLeft1');
			mod_message(467-.1,'SlamRight2');
			mod_message(468-.1,'SlamLeft1');
			
			mod_message(469,'Split8');
			
			mod_message(469,function() gat_slamdist = 30*gat_height_ratio end);--Scale slamdist. -Kid
			
			mod_insert(471.5,487.5,'*1000 300 beat','end',1);
			mod_insert(471.5,487.5,'*1000 300 beat','end',2);
			mod_insert(487.5,488,'*1000 no beat','end');
			
			mod_wiggle(473-.1,5,4,130,4,'tipsy',1);
			mod_wiggle(473-.1,5,4,100,4,'drunk',2);
			
			
			mod_wiggle(479-.1,3,2,60,2,'drunk');
			
			mod_insert(480-.1,3,'*10 alternate','len')
			mod_insert(480.5-.1,3,'*10 no alternate','len')
			mod_insert(480.5-.1,3,'*10 reverse','len',1)
			mod_insert(480.5-.1,3,'*10 200 reverse','len',2)
			
			mod_insert(482.5-.1,3,'*10 alternate','len')
			mod_insert(483-.1,3,'*10 no alternate','len')
			mod_insert(483-.1,3,'*10 no reverse','len',1)
			mod_insert(483-.1,3,'*10 reverse','len',2)
			
			mod_message(485,'Rejoin8');
			mod_message(485,function() gat_slamdist = 60*gat_height_ratio end);--Scale slamdist. -Kid
			
			mod_wiggle(487-.1,5,4,100,3,'drunk');
			
			mod_message(488-.1,'SlamLeft1');
			mod_message(489-.1,'SlamRight2');
			mod_message(490-.1,'SlamLeft1');
			mod_message(491-.1,'SlamRight2');
			mod_message(492-.1,'SlamLeft1');
			
			simple_m0d(493-.05,100,0.23,'tipsy');
			simple_m0d(493.5-.05,100,0.23,'tipsy');
			simple_m0d(494-.05,100,0.23,'tipsy');
			
			mod_insert(494.5-.1,1,'*10 stealth','len')
			mod_insert(495.5-.1,1,'*10 no stealth','len')
			
			simple_m0d(496-.05,50,0.23,'drunk');
			simple_m0d(496.5-.05,-50,0.23,'drunk');
			--simple_m0d(494-.05,50,0.4,'drunk');
			mod_message(497-.1,'SlamRight2');
			mod_message(498-.1,'SlamLeft1');
			mod_message(499-.1,'SlamRight2');
			mod_message(500-.1,'SlamLeft1');
			
			for i=497.75,500.75,1 do
				mod_insert(i-.05,1,'*20 invert','len');
				mod_insert(i+0.25-.05,1,'*20 no invert','len');
			end
			
			mod_message(501,'Split8');
			mod_message(501,function() gat_slamdist = 50*gat_height_ratio end);--Scale slamdist. -Kid
			
			mod_insert(503.5,510.5,'*10000 300 beat','end',1);
			mod_insert(503.5,510.5,'*10000 -300 beat','end',2);
			mod_insert(510.5,1,'*10000 no beat','len');
			
			mod_insert(511.5,516.5,'*10000 -300 beat','end',1);
			mod_insert(511.5,516.5,'*10000 300 beat','end',2);
			mod_insert(516.5,1,'*10000 no beat','len');
			
			mod_insert(508.5-.1,6,'*10 reverse','len',1)
			mod_insert(508.5-.1,6,'*10 200 reverse','len',2)
			
			mod_insert(513.75,2,'*6 no reverse','len',1)
			mod_insert(513.75,2,'*6 reverse','len',2)
			
			mod_wiggle(511-.1,5,4,130,4,'tipsy',1);
			mod_wiggle(511-.1,5,4,100,4,'drunk',2);
			
			mod_insert(515-.1,1,'*10 invert','len');
			mod_insert(515.5-.1,1,'*10 no invert','len');
			
			mod_message(517,'Rejoin8');
			mod_message(517,function() gat_slamdist = 90*gat_height_ratio end);--Scale slamdist. -Kid
			
			mod_message(520-.1,'SlamLeft1');
			mod_message(521-.1,'SlamRight2');
			mod_message(522-.1,'SlamLeft1');
			mod_message(523-.1,'SlamRight2');
			mod_message(524-.1,'SlamLeft1');
			mod_message(525-.1,'SlamRight2');
			mod_message(526-.1,'SlamLeft1');
			mod_insert(527-.1,1,'*10 stealth','len');
			mod_insert(527.5-.1,1,'*10 no stealth','len');
			mod_message(528-.1,'SlamLeft1');
			mod_message(529-.1,'SlamRight2');
			mod_message(530-.1,'SlamLeft1');
			mod_message(531-.1,'SlamRight2');
			mod_message(532-.1,'SlamLeft1');
			mod_message(533-.1,'SlamRight2');
			mod_wiggle(534-.1,5,4,100,4,'drunk');
			mod_insert(535-.1,1,'*10 flip','len');
			mod_insert(535.5-.1,1,'*10 no flip','len');
			
			mod_insert(535.5,16,'*1000 150 beat','len',1);
			mod_insert(535.5,16,'*1000 -150 beat','len',2);
			
			mod_message(551,function() gat_slamdist = 50*gat_height_ratio end);--Scale slamdist. -Kid
			mod_insert(551.5,1,'*1000 no beat','len');
			
			for i=552,562,2 do
				mod_message(i-.1,'SlamLeft1');
				mod_message(i+1-.1,'SlamRight2');
			end
			
			mod_wiggle(564-.1,9,4,100,3,'tipsy');
			mod_wiggle(566.5-.1,3,4,130,3,'drunk');
			simple_m0d2(567-.1,100,.4,'tornado');
			
			--[[
			mod_message(568-.1,'SlamLeft1');
			mod_message(569-.1,'SlamRight2');
			mod_message(570-.1,'SlamLeft1');
			mod_message(571-.1,'SlamRight2');
			mod_message(572-.1,'SlamLeft1');
			mod_message(573-.1,'SlamRight2');
			mod_message(574-.1,'SlamLeft1');
			
			mod_message(576-.1,'SlamLeft1');
			mod_message(577-.1,'SlamRight2');
			mod_message(578-.1,'SlamLeft1');
			mod_message(578.5-.1,'SlamRight2');
			mod_message(579-.1,'SlamLeft1');
			]]
			
			for i=569.5,571.5,1 do
				mod_insert(i,1,'*10000 1000 dizzy','len');
				mod_insert(i+.5,1,'*10000 no dizzy','len');
			end
			
			for i=568,579 do
				mod_insert(i-.05,0.2,'*50 50 hidden','len')
				mod_insert(i+.15,1,'*5 hidden','len')
			end
			
			mod_insert(575.5,4,'*1000 300 beat');
			mod_insert(579.5,4,'*1000 no beat');
			
			--simple_m0d2(580-.1,200,2,'tornado');
			
			mod_message(613,'Shuffle8');
			mod_message(616,'Shuffle8Quick',true);
			
			switcheroo_add(629-.05,'rudl',10000,1);
			switcheroo_add(629.5-.05,'dlru',10000,1);
			switcheroo_add(630-.05,'rdul',10000,1);
			switcheroo_add(630.5-.05,'ulrd',10000,1);
			mod_insert(631-.05,1,'*10000 no flip, *10000 no invert','len');
			mod_message(632,function() switcheroo_reset() end)
			
			local gat_abandon_stuff = {
				{584,'TargOff',true},
				{597,'Split8'},
				{600,'Split8Quick',true},
				
				{600,function()
					for i=1,8 do
						local b = gat_splitrot2[i]
						if b then
							b:finishtweening();
							b:x(0);
							b:y(0);
							b:z(0);
							b:decelerate(60/175);
							b:x(math.random(-30,30))
							b:y(math.random(-30,30))
							b:z(math.random(-30,30))
						end
					end
				end},
				
				{601.5,function()
					for i=1,8 do
						local b = gat_splitrot2[i]
						if b then
							b:finishtweening();
							b:x(0);
							b:y(0);
							b:z(0);
							b:decelerate(60/175);
							b:x(math.random(-30,30))
							b:y(math.random(-30,30))
							b:z(math.random(-30,30))
						end
					end
				end},
				
				{603,function()
					for i=1,8 do
						local b = gat_splitrot2[i]
						if b then
							b:finishtweening();
							b:x(0);
							b:y(0);
							b:z(0);
							b:decelerate(60/175);
							b:x(math.random(-30,30))
							b:y(math.random(-30,30))
							b:z(math.random(-30,30))
						end
					end
				end},
				
				{632,function()
					for i=1,8 do
						local b = gat_splitrot2[i]
						if b then
							b:finishtweening();
							b:x(0);
							b:y(0);
							b:z(0);
							b:decelerate(60/175);
							b:x(math.random(-30,30))
							b:y(math.random(-30,30))
							b:z(math.random(-30,30))
						end
					end
				end},
				
				{633.5,function()
					for i=1,8 do
						local b = gat_splitrot2[i]
						if b then
							b:finishtweening();
							b:x(0);
							b:y(0);
							b:z(0);
							b:decelerate(60/175);
							b:x(math.random(-30,30))
							b:y(math.random(-30,30))
							b:z(math.random(-30,30))
						end
					end
				end},
				
				{635,function()
					for i=1,8 do
						local b = gat_splitrot2[i]
						if b then
							b:finishtweening();
							b:x(0);
							b:y(0);
							b:z(0);
							b:decelerate(60/175);
							b:x(math.random(-30,30))
							b:y(math.random(-30,30))
							b:z(math.random(-30,30))
						end
					end
				end},
				
				{613,function()
					for i=1,8 do
						local b = gat_splitrot2[i]
						if b then
							b:finishtweening();
							b:x(0);
							b:y(0);
							b:z(0);
						end
					end
				end},
				{640,function()
					for i=1,8 do
						local b = gat_splitrot2[i]
						if b then
							b:finishtweening();
							b:x(0);
							b:y(0);
							b:z(0);
						end
					end
				end}
			}
			
			for i=1,table.getn(gat_abandon_stuff) do
				table.insert(mod_actions,gat_abandon_stuff[i]);
			end
			
			
			--mod_message(661,'ReReShuffle8')
			--mod_insert(663,712,'*6.2 210 invert','end');
			
			mod_message(661,'ReShuffle8');
			mod_insert(661,712,'*'..7*gat_sdwidth_ratio..' '..210*gat_sdwidth_ratio..' invert','end');--I might scale this. -Kid
			mod_insert(693,695,'*'..7*gat_sdwidth_ratio..' no invert','end');--And by 'I might', I mean 'I will'. -Kid
			
			--mod_shader(648,49,0)--We don't have this in SM5. -Kid
			--mod_shader(648,124,1)
			--mod_shader(664,217,0)
			--mod_shader(712,49,0)
			
			mod_insert(648,661,'*10 100 tornado, *10000 100 tornadoperiod','end');
			mod_insert(661,1,'*10 no tornado','len');
			
			mod_insert(648,712,'*0.2 -40 drunk','end',1);
			mod_insert(648,712,'*0.2 40 drunk','end',2);
			
			mod_insert(677,1,'*5 40 drunk','len',1);
			mod_insert(677.5,1,'*5 -40 drunk','len',1);
			mod_insert(678,1,'*5 40 drunk','len',1);
			mod_insert(678.5,1,'*5 -40 drunk','len',1);
			mod_insert(679,712,'*5 40 drunk','end',1);
			mod_insert(677,1,'*5 -40 drunk','len',2);
			mod_insert(677.5,1,'*5 40 drunk','len',2);
			mod_insert(678,1,'*5 -40 drunk','len',2);
			mod_insert(678.5,1,'*5 40 drunk','len',2);
			mod_insert(679,712,'*5 -40 drunk','end',2);
			
			mod_message(648,function()
				for i=1,8 do
					gat_splitvib[i]:x(6);
					gat_splitvib[i]:y(6);
					gat_splitvib[i]:z(6);
				end
			end)
			
			mod_message(693,function()
				MESSAGEMAN:Broadcast('ReReReShuffle8');
				for pn=1,2 do
					local d = 1; if pn == 2 then d = -1 end
					for i=pn,8,2 do
						gat_splitrot2[i]:decelerate(60/175);
						gat_splitrot2[i]:y(15*d)
						gat_splitrot2[i]:decelerate(60/175);
						gat_splitrot2[i]:y(-15*d)
						gat_splitrot2[i]:decelerate(60/175);
						gat_splitrot2[i]:y(15*d)
						--gat_splitrot2[i]:z(0)
					end
				end
			end)
			
			mod_message(709,function()
				for i=1,8 do
					local a = gat_splitvib[i]
					if a then
						a:linear(120/175);
						a:x(0);
						a:y(0);
						a:z(0);
					end
				end
			end,true)
			
			mod_insert(709,724,',*5 50 dark, *1.4 centered','end');
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			-----------------------------------------------------
			------------THE TERROR OF DEATH----------------------
			-----------------------------------------------------
			
			mod_message(712,function()
				for pn=1,4 do
					local a = Proxy(pn)
					local d = 0.25; if math.mod(pn,2) == 0 then d=0.75 end
					if a then
						a:decelerate(2.1)
						a:rotationy(0)
						a:zoom(gat_height_ratio);--Scale zoom. -Kid
						a:rotationz(360);
						a:x(SCREEN_WIDTH*d);
						a:y(SCREEN_CENTER_Y);
						a:sleep(0);
						a:rotationz(0);
					end
				end
			end)
			mod_message(712,function()
				for pn=1,4 do
					local a = Proxy(pn)
					if a then
						a:stopeffect();
					end
				end
			end,true)
			mod_message(720,function()
				for pn=1,4 do
					local a = Proxy(pn)
					local d = 0.25; if math.mod(pn,2) == 0 then d=0.75 end
					if a then
						a:visible(true);
						a:rotationy(0)
						a:zoom(gat_height_ratio);--Scale zoom. -Kid
						a:rotationz(360);
						a:x(SCREEN_WIDTH*d);
						a:y(SCREEN_CENTER_Y);
						a:sleep(0);
						a:rotationz(0);
						if pn > 2 then
							a:visible(false);
						end
					end
				end
			end,true)
			
			mod_insert(664,676,'*0.1 10 tandrunk','end');
			mod_insert(682,5,'*0.1 10 tandrunk','len');
			mod_insert(690,5,'*0.1 10 tandrunk','len');
			mod_insert(698,5,'*0.1 10 tandrunk','len');
			mod_insert(706,5,'*0.1 10 tandrunk','len');
			
			mod_insert(712,724,'*0.6 no centered','end');
			mod_insert(712,728,'*0.2 dark','end');
			
			mod_insert(712,720,'200 drunk, 200 tipsy','end');
			mod_insert(720,721,'*10 no drunk, *10 no tipsy','end');
			
			mod_message(724,'TargOnTop');
			mod_message(728,'TargOffTop');
			
			mod_insert(720,728,'*10 80 brake, *10 1.1x','end');
			
			mod_message(723,function()
				gat_wowinvert:decelerate(4*60/205);
				gat_wowinvert:x(100);
				gat_wowinvert:spring(1*60/205);
				gat_wowinvert:x(0);
			end);
			
			mod_insert(751.5,784,'*10000 200 beat','end');
			mod_insert(783.5,785,'*10000 no beat','end');
			mod_message(752,function()
				for pn=1,2 do
					local a = Proxy(pn)
					if a then
						a:decelerate(60/190);
						a:addy(100*gat_height_ratio);--Use ratios. -Kid
						a:bounce();
						a:effectclock('bgm');
						a:effectperiod(1);
						a:effectmagnitude(0,-100*gat_height_ratio,0);
					end
				end
			end);
			
			for i=754,778,4 do
				mod_insert(i,1,'*10000 1000 dizzy','len');
				mod_insert(i+1,1,'*10000 no dizzy','len');
			end
			
			for i=752,776,4 do
				mod_insert(i,1,'*0.95 30 reverse, *0.95 30 flip, *'..(19/3)..' 200 tiny1, *'..(19/3)..' 200 tiny2, *'..(19/3)..' 200 tiny3, *'..(19/3)..' 200 tiny4','len');--We need to convert both the strength and the rate of Tiny. Also, use the column specific version. -Kid
				mod_insert(i+1,3,'*0.3166 no reverse, *0.3166 no flip, *'..(19/9)..' no tiny1, *'..(19/9)..' no tiny2, *'..(19/9)..' no tiny3, *'..(19/9)..' no tiny4','len');
			end
			
			--beat,strength,dur,mod,pn
			mod_springt2(243.947,200,60/190,'drunk');
			simple_m0d2(783-.1,-500,0.6,'mini');
			
			mod_insert(814,1,'*10000 1000 dizzy','len');
			mod_insert(814+1,1,'*10000 no dizzy','len');
			mod_insert(814,1,'*10000 1000 dizzy','len');
			mod_insert(814+1,1,'*10000 no dizzy','len');
			
			mod_message(783,function()
				for pn=1,2 do
					local a = Proxy(pn)
					if a then
						a:accelerate(90/190);
						a:zoom(0);
						a:stopeffect();
					end
				end
			end);
			
			mod_message(784,function()
				for pn=1,2 do
					local a = Proxy(pn)
					if a then
						a:stopeffect();
						a:sleep(0)
						a:y(SCREEN_HEIGHT*1.5+100*gat_height_ratio);--Use ratio. -Kid
					end
				end
			end,true);
			
			mod_message(783.5,function()
				for pn=3,4 do
					local a = Proxy(pn)
					if a then
						a:visible(true)
					end
				end
				for pn=1,4 do
					local a = Proxy(pn)
					if a then
						a:sleep(0);
						a:zoom(0.75*gat_height_ratio)--Use ratios. -Kid
						gat_toss[pn].actor:y(SCREEN_HEIGHT+200*gat_height_ratio);
					end
				end
			end,true);
			
			mod_insert(783.5,847.5,'*10000 500 beat','end');
			mod_insert(847.5,1,'*10000 no beat','end');
			mod_insert(784,848,'*2 200 centered, *1000 1.33x, *10000 sudden, *10000 40 suddenoffset','end');
			for i=785,848 do
				mod_insert(i,.2,'*100000 no centered','len');
			end
			
			--[[
			mod_insert(790,1,'*3.166 invert')
			mod_insert(791,1,'*3.166 no invert')
			mod_insert(798,1,'*3.166 flip')
			mod_insert(799,1,'*3.166 no flip')
			mod_insert(806,1,'*3.166 invert')
			mod_insert(807,1,'*3.166 no invert')
			mod_insert(814,1,'*3.166 flip')
			mod_insert(815,1,'*3.166 no flip')
			mod_insert(822,1,'*3.166 invert')
			mod_insert(823,1,'*3.166 no invert')
			mod_insert(830,1,'*3.166 flip')
			mod_insert(831,1,'*3.166 no flip')
			mod_insert(838,1,'*3.166 invert')
			mod_insert(839,1,'*3.166 no invert')
			mod_insert(846,1,'*3.166 flip')
			mod_insert(847,1,'*3.166 no flip')
			]]
			
			mod_insert(790,1,'*1.583 none')
			mod_insert(791,1,'*1.583 no none')
			mod_insert(798,1,'*1.583 50 reverse')
			mod_insert(799,1,'*1.583 no reverse')
			mod_insert(806,1,'*1.583 none')
			mod_insert(807,1,'*1.583 no none')
			mod_insert(814,1,'*1.583 50 reverse')
			mod_insert(815,1,'*1.583 no reverse')
			mod_insert(822,1,'*1.583 none')
			mod_insert(823,1,'*1.583 no none')
			mod_insert(830,1,'*1.583 50 reverse')
			mod_insert(831,1,'*1.583 no reverse')
			mod_insert(838,1,'*1.583 none')
			mod_insert(839,1,'*1.583 no none')
			mod_insert(846,1,'*1.583 50 reverse')
			mod_insert(847,1,'*1.583 no reverse')
			
			gat_toss_fallspd = 1.4;
			gat_toss_maxfall = 20;
			gat_tossnum = 3;
			function gat_update_toss()
				for pn=1,4 do
					local a = Proxy(pn)
					if a then
						a:linear(0.02);
						a:x(gat_toss[pn].actor:GetX())
						a:y(gat_toss[pn].actor:GetY())
						
						--a:z(gat_toss[pn].actor:GetZ())
						
						--if pn ~= 1 then a:visible(false) end
						--[[
						if gat_toss[pn].xspd < 0 then
							a:rotationz(0.2*(-90-math.deg(math.atan2(gat_toss[pn].xspd,gat_toss[pn].yspd))))
						else
							a:rotationz(0.2*(90-math.deg(math.atan2(gat_toss[pn].xspd,gat_toss[pn].yspd))))
						end
						]]
						
						--[[
						if gat_toss[pn].yspd > 0 then
							--a:zoom(0.7*(math.max((30-gat_toss[pn].yspd)/30,0)))
							a:zoom(0.8*(math.max((20-gat_toss[pn].yspd)/20,0)))
						else
							a:zoom(0.8)
						end
						]]
						
						a:zoom(0.8*gat_height_ratio)
						
						a:rotationz((gat_toss[pn].xspd/5)*(gat_toss[pn].yspd))
						
						gat_toss[pn].rmult = gat_toss[pn].rmult+gat_toss[pn].zspd
						a:rotationx(gat_toss[pn].rmult)
						
						gat_toss[pn].actor:addx(gat_toss[pn].xspd*gat_height_ratio)
						gat_toss[pn].actor:addy(gat_toss[pn].yspd*gat_height_ratio)
						gat_toss[pn].actor:addz(gat_toss[pn].zspd*gat_height_ratio)
						if gat_toss[pn].yspd < gat_toss_maxfall then
							gat_toss[pn].yspd = gat_toss[pn].yspd+gat_toss_fallspd;
						end
					end
				end
			end
			
			gat_toss_alt = 1;
			function gat_toss_a_dude()
				local a = gat_toss[gat_tossnum]
				
				local beat = GAMESTATE:GetSongBeat()
				
				a.actor:visible(true);
				a.actor:finishtweening();
				
				--local rng = SCREEN_CENTER_X+(math.random(60,SCREEN_CENTER_X-60)*gat_toss_alt)
				local rng = (SCREEN_WIDTH/5)*gat_tossnum
				local arc = beat-800
				local rng2 = math.max(((math.random()*4)+2)*(arc/40),0)
				a.actor:x(rng)
				a.actor:z(0);
				a.actor:y(SCREEN_HEIGHT+100*gat_height_ratio)--Use ratios. -Kid
				if math.mod(gat_tossnum,2) == 0 then
					a.xspd = -rng2
				else
					a.xspd = rng2
				end
				
				a.actor:rotationx(0)
				
				a.rmult = 0;
				
				--a.yspd = ((math.random()*4)+32)*-1
				a.yspd = -34
				--a.zspd = (math.random()*20)-15;
				
				if beat > 813 and beat < 814 then
					--a.zspd = -30
					a.zspd = 0;
				else
					a.zspd = 0;
				end
				
				gat_toss_alt = gat_toss_alt*-1
				gat_tossnum = gat_tossnum+1
				if gat_tossnum > 4 then
					gat_tossnum = 1;
				end
			end
			
			for i=784,844,1 do
				mod_message(i-0,'Toss');
			end
			
			mod_message(844,function()
				for pn=5,6 do
					local d = 0.25; if pn == 6 then d = 0.75 end
					local a = Proxy(pn)
					if a then
						a:visible(true);
						a:x(SCREEN_WIDTH*d)
						a:y(SCREEN_HEIGHT*1.5);
						a:bounceend(240/190)
						a:y(SCREEN_CENTER_Y);
					end
				end
			end)
			
			mod_message(848.5,function()
				for pn=3,6 do
					local a = Proxy(pn)
					if a then
						a:visible(false)
					end
				end
				for pn=1,2 do
					local d = 0.25; if pn == 2 then d = 0.75 end
					local a = Proxy(pn)
					if a then
						a:finishtweening();
						a:visible(true);
						a:zoom(gat_height_ratio);--Scale zoom. -Kid
						a:rotationx(0);
						a:rotationy(0);
						a:rotationz(0);
						a:x(SCREEN_WIDTH*d)
						a:y(SCREEN_CENTER_Y);
					end
				end
			end,true)
			
			simple_m0d2(847,-100,0.4,'flip');
			
			mod_insert(848,900,'*10000 500 beat, *0.2 200 mini, *0.12 stealth, *0.12 dark','end');
			mod_insert(848.1,900,'*0.5 no beat,','end');
			
			mod_insert(900.8,3.5,'*30 2000 bumpy, *100000 -80 bumpyperiod','len');
			mod_insert(908,1,'*1000 no bumpy, *1000 no bumpyperiod','len');
			
			mod_message(900.8,function()
				char_shame:sleep(0)
				char_shame:basezoomx(.8)
				char_shame:basezoomy(.8)
				char_shame:x(SCREEN_CENTER_X);--Use SCREEN variables. -Kid
				char_shame:y(SCREEN_CENTER_Y);
				char_shame:queuecommand('Idle');
				char_shame:queuecommand('Spawn');
			end);
			
			mod_message(896,function()
				for pn=1,2 do
					local b = _G['jud'..pn..'p']
					if b then
						b:basezoomx(0);
						b:basezoomy(0);
					end
					local c = _G['com'..pn..'p']
					if c then
						c:basezoomx(0);
						c:basezoomy(0);
					end
				end
			end);
			mod_message(916,function()
				for pn=1,2 do
					local b = _G['jud'..pn..'p']
					if b then
						b:basezoomx(0.6);
						b:basezoomy(0.6);
					end
					local c = _G['com'..pn..'p']
					if c then
						c:basezoomx(0.6);
						c:basezoomy(0.6);
					end
				end
			end);
			
			mod_message(922,function()
				char_shame:playcommand('Hide');
			end);
			
			mod_message(896,function()
				MESSAGEMAN:Broadcast('ShowScores')
				for pn=1,2 do
					local a = Plr(pn)
					if a then
						a:zoom(gat_height_ratio);--Scale zoom. -Kid
					end
				end
			end)
			
			mod_message(851,'ResetScores');
			mod_message(912,'HideScores');
			mod_message(915,'HideScores2');
			
			mod_insert(872,24,'*0.2 no mini, -10 sudden, *1000 200 suddenoffset','len');
			mod_insert(892,4,'*3 -100 suddenoffset','len');
			mod_insert(896,4,'*20000 no mini, *1 no stealth, *1 no dark','len');
			
			
			function gat_terror_psyche()
				
				gat_terrorfuck_3:sleep(0/190);
				gat_terrorfuck_3:decelerate(60/190);--Don't use SCREEN_WIDTH. -Kid
				gat_terrorfuck_3:x((640*gat_sdwidth_ratio)*0.35);
				gat_terrorfuck_3:sleep(180/190);
				gat_terrorfuck_3:decelerate(60/190);
				gat_terrorfuck_3:x((640*gat_sdwidth_ratio)*-0.35);
				
				gat_terrorfuck_2:sleep(60/190);
				gat_terrorfuck_2:decelerate(60/190);
				gat_terrorfuck_2:x((640*gat_sdwidth_ratio)*0.35);
				gat_terrorfuck_2:sleep(180/190);
				gat_terrorfuck_2:decelerate(60/190);
				gat_terrorfuck_2:x((640*gat_sdwidth_ratio)*-0.35);
				
				gat_terrorfuck_1:sleep(120/190);
				gat_terrorfuck_1:decelerate(60/190);
				gat_terrorfuck_1:x((640*gat_sdwidth_ratio)*0.35);
				gat_terrorfuck_1:sleep(180/190);
				gat_terrorfuck_1:decelerate(60/190);
				gat_terrorfuck_1:x((640*gat_sdwidth_ratio)*-0.35);
				
				gat_terrorfuck_0:sleep(180/190);
				gat_terrorfuck_0:decelerate(60/190);
				gat_terrorfuck_0:x((640*gat_sdwidth_ratio)*0.35);
				gat_terrorfuck_0:sleep(180/190);
				gat_terrorfuck_0:decelerate(60/190);
				gat_terrorfuck_0:x((640*gat_sdwidth_ratio)*-0.35);
				
			end
			
			
			for i=0,7 do
				table.insert(mod_actions,{924+(8*i),function() gat_terror_psyche() end})
			end
			
			
			
			
			
			
			
				
			
			mod_message(917.5,function()
				local a = Proxy(1)
				if a then
					a:vibrate();
					a:linear(5*60/190)
					a:x(SCREEN_CENTER_X-(SCREEN_WIDTH*0.35));
					a:y(SCREEN_CENTER_Y-75*gat_height_ratio)--Scale position. -Kid
					a:rotationz(20)
				end
				local a = Proxy(2)
				if a then
					a:vibrate()
					a:linear(5*60/190)
					a:x(SCREEN_CENTER_X+(SCREEN_WIDTH*0.35));
					a:y(SCREEN_CENTER_Y-75*gat_height_ratio)
					a:rotationz(-20)
				end
				gat_screamvib:linear(0.2);
				gat_screamvib:x(100);
				gat_screamvib:linear(1.2);
				gat_screamvib:x(0);
				for i=0,3 do
					--_G['gat_terrorfuck_'..i]:linear(5*60/190)
					--_G['gat_terrorfuck_'..i]:x(SCREEN_WIDTH*-0.35);
				end
				
				char_shame:playcommand('Cast');
				
			end
			)
				
			mod_message(924,function()
				for pn=1,2 do
				local a = Proxy(1)
					if a then
						a:stopeffect();
					end
				end
			end
			)
			
			mod_message(954,function()
				local a = Proxy(1)
				if a then
					a:decelerate(120/190)
					a:rotationz(380);
					a:sleep(0);
					a:rotationz(20);
				end
				local a = Proxy(2)
				if a then
					a:decelerate(120/190)
					a:rotationz(-380);
					a:sleep(0);
					a:rotationz(-20);
				end
			end);
			
			
			mod_insert(916,924,'*10000 0 bumpyperiod, *10000 80 drunkperiod, *10000 -84 zigzagzperiod','end');
			mod_insert(924,925,'*10000 no bumpyperiod, *10000 no drunkperiod, *10000 no zigzagzperiod','end');
			mod_springt(286.500,500,2,'zigzagz');
			simple_m0d2(917.5,400,2,'drunk');
			simple_m0d2(917.5,600,2,'bumpy');
			
			gat_terror_mods = {
				{910,988,'*10000 sudden, *10000 80 suddenoffset, 1.7x','end'},
				{923.5,988,'*10000 200 beat','end'},
				{960,984,'*0.2 -30 dizzy','end',1},
				{960,984,'*0.2 30 dizzy','end',2},
				{924,988,'*30 200 bumpy','end'},
				{988,1015,'1.2x','end'},
				--{1004,1015.5,'blind','end'},
			}
			
			for i=1,table.getn(gat_terror_mods) do
				local m = gat_terror_mods[i]
				mod_insert(m[1],m[2],m[3],m[4],m[5]);
			end
			
			
			mod_message(984,function()
				for i=0,3 do
					_G['gat_terrorfuck_'..i]:stoptweening();
				end
				gat_terrorfuck_0:sleep(0);
				gat_terrorfuck_0:decelerate(40/190);
				gat_terrorfuck_0:x(0);
				gat_terrorfuck_1:sleep(40/190);
				gat_terrorfuck_1:decelerate(40/190);
				gat_terrorfuck_1:x(0);
				gat_terrorfuck_2:sleep(80/190);
				gat_terrorfuck_2:decelerate(40/190);
				gat_terrorfuck_2:x(0);
				gat_terrorfuck_3:sleep(120/190);
				gat_terrorfuck_3:decelerate(40/190);
				gat_terrorfuck_3:x(0);
				gat_confuserx:sleep(120/190);
				gat_confuserx:linear(1*60/190);
				gat_confuserx:x(360);
				gat_confuserx:sleep(0);
				gat_confuserx:x(0);
				for pn=1,2 do
					local d = 0.25; if pn == 2 then d = .75 end
					local a = Proxy(pn)
					if a then
						a:sleep(120/190);
						a:linear(1*60/190);
						a:rotationx(360);
						a:rotationz(0);
						a:x(SCREEN_WIDTH*d);
						a:y(SCREEN_CENTER_Y);
						a:sleep(0);
						a:zoomx(4*gat_height_ratio);--Scale zooms. -Kid
						a:rotationx(0);
						a:linear(60/190);
						a:zoomx(gat_height_ratio);
					end
				end
			end);
			
			simple_m0d(987,50,.8,'stealth');
			simple_m0d2(988,300,6.4,'drunk');
			simple_m0d2(988,300,6.4,'tipsy');
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			-----------------------------------------------------
			------------LOVE LOVE LOVE YOU, I LOVE YOU-----------
			-----------------------------------------------------
		
			
			mod_message(1000,'SetupFUCK',true);
			
			mod_message(1000,function()--For this, we'll need the player proxy proxies visible. -Kid
				proxP1p:visible(true)
				proxP2p:visible(true)
				screen:vibrate()
				screen:effectmagnitude(0,0,0);
			end,true)
			
			mod_message(1004,'BlindOn');--Last set of Blind. -Kid
			mod_message(1015.5,'BlindOff');--Debatable if needed, though. -Kid
			--I realize that we don't have grain...whoops. -Kid
			mod_insert(1016,1076,'*100000 50 grain, *10000 -97 zigzagperiod','end')
			mod_insert(1016,1076,'*10000 100 digitalsteps, *10000 100 digitalzsteps, *10000 47.3 digitalperiod, *10000 57.1 digitalzperiod, *10000 50 digitalzoffset','end')--Converted period values to equivalent SM5 values. -Kid
			
			mod_insert(1035-.1,1,'*10 invert','len');
			mod_insert(1035.5-.1,1,'*10 no invert','len');
			mod_insert(1043-.1,1,'*10 stealth','len');
			mod_insert(1043.5-.1,1,'*10 no stealth','len');
			
			mod_message(1072,function()
				for pn = 1,2 do
					local a = Proxy(pn)
					if a then
						a:wag()
						a:effectmagnitude(0,0,4)
						a:effectclock('bgm');
						a:effectperiod(2)
						a:rotationz(180);
						a:sleep(180/150);
						a:accelerate(60/150);
						a:rotationz(0)
					end
				end
			end)
			mod_message(1076,function()
				for pn = 1,2 do
					local a = Proxy(pn)
					if a then
						a:stopeffect();
					end
				end
			end)
			
			local fluct = 1
			local fluct2 = 1;
			local amt = 0
			for i=1016,1076,2 do
				if not mod_blacklist({1034,1046,1054,1074},i) then
					simple_m0d2(i-.1,30+amt,1.2,'zigzag');
					if i~=1076 then
						simple_m0d(i,(300+(amt*20))*fluct,1.2,'digital');
						simple_m0d(i,(600+(amt*40))*fluct2,1.2,'digitalz');
					end
				end
				fluct = fluct*-1
				if fluct == 1 then fluct2 = fluct2*-1 end
				amt = amt+0.5;
			end
			
			for i=1016,1076,4 do
				if not mod_blacklist({1034,1046,1054,1074},i) then
					mod_message(i-.1,function()
					
						MESSAGEMAN:Broadcast('CA');
					
						gat_tsvib:finishtweening()
						gat_tsvib:linear(10/150)
						gat_tsvib:x(100*0.7)
						gat_tsvib:y(20*0.7)
						gat_tsvib:linear(110/150);
						gat_tsvib:x(0);
						gat_tsvib:y(0);
					end)
				end
			end
			
			for i=1018,1075,4 do
				if not mod_blacklist({1034,1046,1054,1074},i) then
					mod_message(i-.1,function()
					
						MESSAGEMAN:Broadcast('CA');
					
						gat_tsvib:finishtweening()
						gat_tsvib:linear(10/150)
						gat_tsvib:x(20*0.7)
						gat_tsvib:y(80*0.7)
						gat_tsvib:linear(110/150);
						gat_tsvib:x(0);
						gat_tsvib:y(0);
					end)
				end
			end
			
			local function clamp(val,min,max)
				if val < min then val = min end
				if val > max then val = max end
				return val
			end
			
			function bambam(beat, mult)
				mod_message(beat-.1,function()
						
					MESSAGEMAN:Broadcast('CA');
				
					gat_tsvib:finishtweening()
					gat_tsvib:linear(10/150)
					gat_tsvib:x(100*mult)
					gat_tsvib:y(20*mult)
					gat_tsvib:linear(110/150);
					gat_tsvib:x(0);
					gat_tsvib:y(0);
				end)
				mod_message(beat+.75-.1,function()
						
					MESSAGEMAN:Broadcast('CA');
				
					gat_tsvib:finishtweening()
					gat_tsvib:linear(10/150)
					gat_tsvib:x(100*mult)
					gat_tsvib:y(20*mult)
					gat_tsvib:linear(110/150);
					gat_tsvib:x(0);
					gat_tsvib:y(0);
				end)
				mod_message(beat+1.5-.1,function()
						
					MESSAGEMAN:Broadcast('CA');
				
					gat_tsvib:finishtweening()
					gat_tsvib:linear(10/150)
					gat_tsvib:x(100*mult)
					gat_tsvib:y(20*mult)
					gat_tsvib:linear(110/150);
					gat_tsvib:x(0);
					gat_tsvib:y(0);
				end)
				mod_message(beat+2-.1,function()
						
					MESSAGEMAN:Broadcast('CA');
				
					gat_tsvib:finishtweening()
					gat_tsvib:linear(10/150)
					gat_tsvib:x(20*mult)
					gat_tsvib:y(80*mult)
					gat_tsvib:linear(110/150);
					gat_tsvib:x(0);
					gat_tsvib:y(0);
				end)
			end
			
			gat_FUCK_dir = 1
			gat_FUCK_dir_V = 1
			function gat_FUCK(spd,dir,hei,mul)
			
				local dirChosen = false
				
				if not mul then mul = 1 end
			
				if not dir then
					dir = gat_FUCK_dir
				else
					dirChosen = true;
				end
				
				if not hei then
					hei = 0
				end
			
				if math.abs(GAMESTATE:GetSongBeat()-1044)<0.5 then
					return false;
				end
			
				for i=1,24 do
					local rng = (math.random()*2)+1
					--local arng = math.random(0,23)
					local arng = clamp(((i-1)+math.random(0,1)),0,23)
					local drng = ((math.random()*0.3)+0.2)*SCREEN_WIDTH*mul + hei*dir*mul
					local rest = -SCREEN_WIDTH/2 + hei*dir*mul
					if dir == -1 then
						drng = SCREEN_WIDTH-(((math.random()*0.3)+0.2)*SCREEN_WIDTH*mul) + hei*dir*mul
						rest = SCREEN_WIDTH*1.5 + hei*dir*mul
					end
					
					local a = fuck_get('h')
					a:finishtweening();
					a:visible(true);
					a:setstate(arng)
					a:animate(0)
					a:diffusealpha(0.4);
					a:x(rest)
					a:y(SCREEN_HEIGHT*((i-0.5)/24))
					a:sleep(0);
					a:x(drng);
					a:linear(rng/spd);
					a:x(rest)
					a:queuecommand('Hide');
					local a = fuck_get('h')
					a:finishtweening();
					a:visible(true);
					a:setstate(arng)
					a:animate(0)
					a:diffusealpha(1);
					a:x(rest)
					a:y(SCREEN_HEIGHT*((i-0.5)/24))
					a:sleep(0)
					a:x(drng);
					a:decelerate(rng/(2*spd));
					a:x(rest)
					a:queuecommand('Hide');
				end
			
				if not dirChosen then
					gat_FUCK_dir = gat_FUCK_dir*-1;
				end
			end
			
			function gat_FUCK_up(spd,dir,hei,mul)
			
				if not mul then mul = 1 end
			
				local dirChosen = false
			
				if not dir then
					dir = gat_FUCK_dir_V
				else
					dirChosen = true;
				end
				
				if not hei then
					hei = 0
				end
			
				for i=1,32 do
					local rng = (math.random()*2)+1
					--local arng = math.random(0,23)
					local arng = clamp(((i-1)+math.random(0,1)),0,31)
					local drng = ((math.random()*0.3)+0.2)*SCREEN_HEIGHT*mul + hei*dir*mul
					local rest = -SCREEN_HEIGHT/2 + hei*dir*mul
					if dir == -1 then
						drng = SCREEN_HEIGHT-(((math.random()*0.3)+0.2)*SCREEN_HEIGHT) + hei*dir*mul
						rest = SCREEN_HEIGHT*1.5 + hei*dir*mul
					end
					
					local a = fuck_get('v')
					a:finishtweening();
					a:visible(true);
					a:setstate(arng)
					a:animate(0)
					a:diffusealpha(0.4);
					a:y(rest)
					a:x(SCREEN_WIDTH*((i-0.5)/32))
					a:sleep(0);
					a:y(drng);
					a:linear(rng/spd);
					a:y(rest)
					a:queuecommand('Hide');
					local a = fuck_get('v')
					a:finishtweening();
					a:visible(true);
					a:setstate(arng)
					a:animate(0)
					a:diffusealpha(1);
					a:y(rest)
					a:x(SCREEN_WIDTH*((i-0.5)/32))
					a:sleep(0)
					a:y(drng);
					a:decelerate(rng/(2*spd));
					a:y(rest)
					a:queuecommand('Hide');
				end
			
				if not dirChosen then
					gat_FUCK_dir_V = gat_FUCK_dir_V*-1;
				end
			end
			
			for i=1016,1075,4 do
				mod_message(i-.05,function() gat_FUCK(1) end)
			end
			
			
			
			mod_message(1044,function() gat_FUCK_up(1.1,-1,-150) end);
			mod_message(1045.5,function() gat_FUCK_up(1.2,-1,0) end);
			mod_message(1046.5,function() gat_FUCK_up(1.4,-1,150) end);
			
			mod_message(1045.5,'CA');
			mod_message(1046.5,'CA');
			
			mod_insert(1044-.1,1,'*10 0.7x','len');
			
			mod_message(1076-.05,function() gat_FUCK(2) end)
			
			mod_insert(1077.5,1109.5,'1x','end')
			
			mod_message(1080,'ShowAFT3')
			
			mod_message(1016,'ShowAFT2',true);
			mod_message(1054,'DelayFrame');
			mod_message(1062,'DelayFrame');
			mod_message(1070,'DelayFrame');
			
			mod_message(1093.5,'ShameTroll');
			
			local dfs = {1080,1081.5,1082.5,1085.5,1086.5,1089.5,1090.5,
						1080+16,1081.5+16,1082.5+16,1085.5+16,1086.5+16,1089.5+16,1090.5+16}
			
			for i=1,table.getn(dfs) do
				mod_message(dfs[i]-.1,'DelayFrame2R');
			end
			gat_cur_df = 1;
			
			--switcheroo_add(beat,which,speed,len,pn)
			switcheroo_add(1085,'flip',10000,1)
			switcheroo_add(1086,'normal',10000,1)
			switcheroo_add(1089,'invert',10000,1)
			switcheroo_add(1090,'normal',10000,1)
			
			switcheroo_add(1097,'invert',10000,1)
			switcheroo_add(1098,'flip',10000,1)
			switcheroo_add(1101,'rdul',10000,1)
			switcheroo_add(1102,'ludr',10000,1)
			switcheroo_add(1105,'ulrd',10000,1)
			switcheroo_add(1106,'flip',10000,1)
			
			mod_message(1108,function()
				gat_aft:visible(false);
			end)
			mod_insert(1109,4,'*1000 30 flip, *1000 30 reverse, *10000 -300 mini','len');
			mod_insert(1111,4,'*.75 no flip, *.75 no reverse, *7.5 no mini','len');
			mod_message(1109,function()
				gat_jud_bz:x(8);
				gat_jud_bz:y(SCREEN_HEIGHT*1.2);
				gat_jud_bz:sleep(120/150);
				gat_jud_bz:linear(60/150);
				gat_jud_bz:x(0.6);
				gat_jud_bz:y(SCREEN_CENTER_Y);
			end)
			mod_message(1109.5,function()
				gat_aft:visible(true);
				MESSAGEMAN:Broadcast('DelayFrame2Away');
			end,true)
			
			mod_insert(1112,1,'*5 1x','len');
			
			mod_message(1112,function() gat_FUCK(2,1,-200,.7) end)
			mod_message(1112.75,function() gat_FUCK_up(2,1,0,.7) end)
			mod_message(1113.5,function() gat_FUCK(2,-1,-200,.7) end)
			mod_message(1114,function() gat_FUCK_up(1,-1,-100,.7) end)
			
			mod_insert(1116,1,'*5 1x','len');
			
			mod_message(1116,function() gat_FUCK(2,-1,-200,.7) end)
			mod_message(1116.75,function() gat_FUCK_up(2,1,0,.7) end)
			mod_message(1117.5,function() gat_FUCK(2,1,-200,.7) end)
			mod_message(1118,function() gat_FUCK_up(1,-1,-100,.7) end)
			
			bambam(1112,0.4)
			bambam(1116,0.4)
			
			mod_message(1118.5,function()
				gat_distant:accelerate(30/150);
				gat_distant:x(100)
				gat_distant:decelerate(60/150 - .1);
				gat_distant:x(200)
				gat_distant:linear(.1)
				gat_distant:x(0)
				gat_tpos:z(0);
				gat_tpos:sleep(90/150);
				gat_tpos:z(160);
				gat_tpos:decelerate(120/150);
				gat_tpos:z(0);
				for pn=1,2 do
					local a = _G['gat_vib'..pn]
					if a then
						a:sleep(90/150);
						a:x(30);
						a:y(30);
						--a:z(500);
						a:decelerate(90/150);
						a:x(0);
						a:y(0);
						a:z(0);
					end
				end
			end)
			
			mod_message(1128,'ShowAFT')
			mod_message(1144,'HideAFT')
			
			mod_message(1130-.1,function()
				gat_aft_target:linear(0.1)
				gat_aft_target:zoom(0.9);
				gat_aft_target:addx(-60*gat_height_ratio);
				gat_aft_target:addy(-40*gat_height_ratio);
				gat_aft_target:rotationz(10*-1);--All the rotations get *-1 because of how things in ITG work. -Kid
			end)
			mod_message(1130.75-.1,function()
				gat_aft_target:linear(0.1)
				gat_aft_target:zoom(0.8);
				gat_aft_target:addx(150*gat_height_ratio);
				gat_aft_target:addy(-20*gat_height_ratio);
				gat_aft_target:rotationz(-15*-1);
			end)
			mod_message(1131.5-.1,function()
				gat_aft_target:linear(0.1)
				gat_aft_target:zoom(0.9);
				gat_aft_target:addx(-90*gat_height_ratio);
				gat_aft_target:addy(100*gat_height_ratio);
				gat_aft_target:rotationz(10*-1);
			end)
			mod_message(1134-.1,function()
				gat_aft_target:linear(0.1)
				gat_aft_target:zoom(0.9);
				gat_aft_target:addx(60*gat_height_ratio);
				gat_aft_target:addy(-40*gat_height_ratio);
				gat_aft_target:rotationz(-10*-1);
			end)
			mod_message(1134.75-.1,function()
				gat_aft_target:linear(0.1)
				gat_aft_target:zoom(0.8);
				gat_aft_target:addx(-150*gat_height_ratio);
				gat_aft_target:rotationz(15*-1);
			end)
			mod_message(1135.5-.1,function()
				gat_aft_target:linear(0.1)
				gat_aft_target:zoom(1);
				gat_aft_target:x(SCREEN_CENTER_X);
				gat_aft_target:y(SCREEN_CENTER_Y);
				gat_aft_target:rotationz(-10*-1);
			end)
			mod_message(1136,function()
				gat_aft_target:bounceend(120/150);
				gat_aft_target:rotationx(360*-1);
				gat_aft_target:rotationz(0);
				gat_aft_target:sleep(0);
				gat_aft_target:rotationx(0);
			end)
			
			bambam(1128,0.2)
			bambam(1132,0.2)
			bambam(1160,0.2)
			bambam(1164,0.2)
			
			mod_message(1120,function() gat_FUCK_up(1,-1,-100,.7) end)
			
			for i=1112,1171,4 do
				if not mod_blacklist({1112,1116,1136,1140,1154,1156,1158,1160,1164},i) then
					mod_message(i-.1,function()
					
						--MESSAGEMAN:Broadcast('CA');
					
						gat_tsvib:finishtweening()
						gat_tsvib:linear(10/150)
						gat_tsvib:x(100)
						gat_tsvib:y(20)
						gat_tsvib:linear(110/150);
						gat_tsvib:x(0);
						gat_tsvib:y(0);
					end)
				end
			end
			
			for i=1114,1171,4 do
				if not mod_blacklist({1114,1118,1138,1142,1154,1156,1158,1162,1166},i) then
					mod_message(i-.1,function()
					
						MESSAGEMAN:Broadcast('CA');
					
						gat_tsvib:finishtweening()
						gat_tsvib:linear(10/150)
						gat_tsvib:x(20)
						gat_tsvib:y(80)
						gat_tsvib:linear(110/150);
						gat_tsvib:x(0);
						gat_tsvib:y(0);
					end)
				end
			end
			
			mod_insert(1112,1172,'*100000 50 grain, *10000 -97 zigzagperiod','end')
			mod_insert(1172,3,'*1.2 no grain, *1.2 no zigzagperiod','end')
			mod_insert(1112,1172,'*10000 100 digitalsteps, *10000 100 digitalzsteps, *10000 -41.1 digitalperiod, *10000 528.3 digitalzperiod, *10000 50 digitalzoffset','end')--Converted period values to equivalent SM5 values. -Kid
			
			local fluct = 1
			local fluct2 = 1;
			local amt = 0
			for i=1112,1172,2 do
				if not mod_blacklist({1140,1142,1154},i) then
					if i~=1172 then
						simple_m0d2(i-.1,30+amt,1.2,'zigzag');
						simple_m0d(i,(200+(amt*15))*fluct,1.2,'digital');
						simple_m0d(i,(500+(amt*30))*fluct2,1.2,'digitalz');
					else
						simple_m0d2(i-.1,30+amt,.8,'zigzag');
					end
				end
				
				if i==1156 then
					simple_m0d2(1157.5-.1,30+20,1.2,'zigzag');
					simple_m0d(1157.5,(200+(20*20))*-1,1.2,'digital');
					simple_m0d(1157.5,(800+(20*40))*-1,1.2,'digitalz');
					simple_m0d2(1158.5-.1,30+20,1.2,'zigzag');
					simple_m0d(1158.5,(-200-(20*20))*-1,1.2,'digital');
					simple_m0d(1158.5,(-800-(20*40))*1,1.2,'digitalz');
					mod_insert(1158.5,1.5,'*10000 17.8 digitalperiod','len');--Converted period value to equivalent SM5 value. -Kid
				end
				
				fluct = fluct*-1
				if fluct == 1 then fluct2 = fluct2*-1 end
				amt = amt+0.5;
			end
			
			mod_message(1138-.1,function()
					
				MESSAGEMAN:Broadcast('CA');
			
				gat_tsvib:finishtweening()
				gat_tsvib:linear(10/150)
				gat_tsvib:x(10)
				gat_tsvib:y(50)
				gat_tsvib:linear(110/150);
				gat_tsvib:x(0);
				gat_tsvib:y(0);
			end)
			
			mod_message(1140,function()
				gat_aft_target:vibrate();
				gat_afty:decelerate(45/150)
				gat_afty:addy(-200)
				gat_afty:accelerate(45/150)
				gat_afty:addy(200)
				gat_afty:decelerate(45/150)
				gat_afty:addy(-150)
				gat_afty:accelerate(45/150)
				gat_afty:addy(150)
				gat_afty:decelerate(30/150)
				gat_afty:addy(-50)
				gat_afty:accelerate(30/150)
				gat_afty:addy(50)
				gat_aftzoom:decelerate(3.5*60/150)
				gat_aftzoom:x(0.3)
				gat_aftzoom:accelerate(30/150)
				gat_aftzoom:x(1);
				gat_afty2:linear(3.5*60/150)
				gat_afty2:y(-100)
				gat_afty2:accelerate(30/150)
				gat_afty2:y(0);
				gat_aftrz:linear(3*60/150);
				gat_aftrz:x(90);
				gat_aftrz:decelerate(0.5*60/150);
				gat_aftrz:x(100);
				gat_aftrz:accelerate(0.5*60/150);
				gat_aftrz:x(0);
				gat_aftx:linear(90/150);
				gat_aftx:addx(-130);
				gat_aftx:linear(90/150);
				gat_aftx:addx(-80);
				gat_aftx:accelerate(30/150);
				gat_aftx:addx(105);
				gat_aftx:decelerate(60/150);
				gat_aftx:x(0);
				gat_aftvib:x(20);
				gat_aftvib:linear(40/150);
				gat_aftvib:x(0);
				gat_aftvib:sleep(0);
				gat_aftvib:x(20);
				gat_aftvib:linear(40/150);
				gat_aftvib:x(0);
				gat_aftvib:sleep(0);
			end)
			
			mod_insert(1144,1,'*5 1x','len');
			
			mod_message(1144,function() gat_FUCK(2,1,-200,.7) end)
			mod_message(1144.75,function() gat_FUCK_up(2,1,0,.7) end)
			mod_message(1145.5,function() gat_FUCK(2,-1,-200,.7) end)
			mod_message(1146,function() gat_FUCK_up(1,-1,-100,.7) end)
			
			mod_insert(1148,1,'*5 1x','len');
			
			mod_message(1148,function() gat_FUCK(2,-1,-200,.7) end)
			mod_message(1148.75,function() gat_FUCK_up(2,1,0,.7) end)
			mod_message(1149.5,function() gat_FUCK(2,1,-200,.7) end)
			mod_message(1150,function() gat_FUCK_up(1,-1,-100,.7) end)
			
			
			
			mod_insert(1160,1,'*5 1x','len');
			
			mod_message(1160,function() gat_FUCK(2,1,-200,.7) end)
			mod_message(1160.75,function() gat_FUCK_up(2,1,0,.7) end)
			mod_message(1161.5,function() gat_FUCK(2,-1,-200,.7) end)
			mod_message(1162,function() gat_FUCK_up(1,-1,-100,.7) end)
			
			mod_insert(1164,1,'*5 1x','len');
			
			mod_message(1164,function() gat_FUCK(2,-1,-200,.7) end)
			mod_message(1164.75,function() gat_FUCK_up(2,1,0,.7) end)
			mod_message(1165.5,function() gat_FUCK(2,1,-200,.7) end)
			mod_message(1166,function() gat_FUCK_up(1,-1,-100,.7) end)
			
			
			mod_message(1174,'DelayFrame');
			
			mod_message(1174.1,function()
				for pn=1,2 do
					local a = Proxy(pn)
					if a then
						a:x(SCREEN_CENTER_X);
						a:y(SCREEN_CENTER_Y);
						if pn == 1 then
							a:rotationz(90);
						end
					end
				end
				
				char_shame:playcommand('SpawnQ');
				char_shame:playcommand('Idle');
				char_shame:x(SCREEN_CENTER_X);--Use SCREEN variables. -Kid
				char_shame:y(SCREEN_CENTER_Y);
				char_shame:basezoomx(.6);
				char_shame:basezoomy(.6);
				
				
			end)
			
			mod_message(1236,function()
				char_shame:playcommand('Cast');
			end);
			
			mod_message(1240,function()
				char_shame:playcommand('Hide');
			end);
			
			mod_insert(1176,1236,'1.3x','end')
			
			--mod_rollingfade(beat,dur,top,bottom,speed,gapsize)
			--[[
			mod_insert(1176,4,'*5 hidden, *5 sudden','len');
			mod_insert(1176,4,'*1000 1000 suddenoffset, *1000 -100 hiddenoffset','len');
			mod_insert(1176+.1,4,'*5 1000 hiddenoffset','len');
			mod_insert(1177.5,4,'*1000 -100 suddenoffset, *1000 -100 hiddenoffset','len');
			mod_insert(1177.5+.1,4,'*5 1000 suddenoffset','len');
			mod_insert(1179,4,'*1000 100 suddenoffset, *1000 -100 hiddenoffset','len');
			mod_insert(1179+.1,4,'*1 no hiddenoffset, *1 no suddenoffset','len');
			]]
			
			
			mod_message(1176,function()
				gat_dpadrot1:decelerate(90/150)
				gat_dpadrot1:x(60);
				gat_dpadrot2:decelerate(90/150)
				gat_dpadrot2:x(60);
-- 				gat_bg:decelerate(90/150)
-- 				gat_bg:rotationx(60);
-- 				gat_bg:decelerate(90/150)
-- 				gat_bg:rotationx(-60);
-- 				gat_bg:decelerate(90/150)
-- 				gat_bg:rotationx(0);
-- 				gat_bg:rotationz(-45);
				MESSAGEMAN:Broadcast('BGROT1')--Guess what isn't working right. -Kid
			end)
			mod_message(1177.5,function()
				gat_dpadrot2:decelerate(90/150)
				gat_dpadrot2:x(-60);
				gat_dpadrot1:decelerate(90/150)
				gat_dpadrot1:x(-60);
			end)
			mod_message(1179,function()
				gat_dpadrot2:decelerate(90/150)
				gat_dpadrot2:x(0);
				gat_dpadrot1:decelerate(90/150)
				gat_dpadrot1:x(0);
				gat_dpadrot:decelerate(90/150)
				gat_dpadrot:x(-45);
				
			end)
			
			mod_message(1182,function()
				gat_dpadrot:accelerate(120/150)
				gat_dpadrot:x(22.5);
-- 				gat_bg:accelerate(120/150)
-- 				gat_bg:rotationz(22.5);
-- 				gat_bg:decelerate(90/150)
-- 				gat_bg:rotationz(90);
				MESSAGEMAN:Broadcast('BGROT2')--This is the same thing that we had to do when forcing the bg to change. -Kid
			end)
			
			mod_message(1184,function()
				gat_dpadrot:decelerate(90/150)
				gat_dpadrot:x(90);
			end)
			mod_message(1190,function()
				gat_dpadrot:decelerate(90/150)
				gat_dpadrot:x(45);
-- 				gat_bg:decelerate(90/150)
-- 				gat_bg:rotationz(45);
				MESSAGEMAN:Broadcast('BGROT3')--Though, I'm not sure why it isn't working. -Kid
			end)
			
			
			
			mod_message(1176+16,function()
				gat_dpadrot1:decelerate(90/150)
				gat_dpadrot1:x(60);
				gat_dpadrot2:decelerate(90/150)
				gat_dpadrot2:x(-60);
				
-- 				gat_bg:decelerate(90/150)
-- 				gat_bg:rotationx(-60);
-- 				gat_bg:decelerate(90/150)
-- 				gat_bg:rotationx(60);
-- 				gat_bg:decelerate(90/150)
-- 				gat_bg:rotationx(0);
				MESSAGEMAN:Broadcast('BGROT4')--We can probably chalk this up to SM5 being 'silly'. -Kid
				
			end)
			mod_message(1177.5+16,function()
				gat_dpadrot2:decelerate(90/150)
				gat_dpadrot2:x(60);
				gat_dpadrot1:decelerate(90/150)
				gat_dpadrot1:x(-60);
			end)
			mod_message(1179+16,function()
				gat_dpadrot2:decelerate(90/150)
				gat_dpadrot2:x(0);
				gat_dpadrot1:decelerate(90/150)
				gat_dpadrot1:x(0);
				gat_dpadrot:decelerate(90/150)
				gat_dpadrot:x(0);
			end)
			
			mod_message(1182+16,function()
				gat_dpadrot:accelerate(120/150)
				gat_dpadrot:x(-45);
				
-- 				gat_bg:accelerate(120/150)
-- 				gat_bg:rotationz(-45);
-- 				gat_bg:decelerate(90/150)
-- 				gat_bg:rotationz(-90);
				MESSAGEMAN:Broadcast('BGROT5')--Luckily, it's easy to 'fix'. -Kid
				
			end)
			mod_message(1184+16,function()
				gat_dpadrot:decelerate(90/150)
				gat_dpadrot:x(-90);
			end)
			mod_message(1190+16,function()
				gat_dpadrot:decelerate(90/150)
				gat_dpadrot:x(-45);
-- 				gat_bg:decelerate(90/150)
-- 				gat_bg:rotationz(-45);
				MESSAGEMAN:Broadcast('BGROT6')--By broadcasting messages. -Kid
			end)
			
			mod_message(1236,function()
-- 				gat_bg:decelerate(120/150)
-- 				gat_bg:rotationz(0);
				MESSAGEMAN:Broadcast('BGROT7')--So, that's what I did. -Kid
			end)
			
			mod_message(1236,function()
				for pn=1,2 do
					local a = Proxy(pn)
					if a then
						a:linear(120/150);
						a:rotationz(0);
					end
				end
			end)
			
			--[[
			mod_message(1182,function()
				gat_dpadrot:accelerate(120/150);
				gat_dpadrot:x(180)
				gat_dpadrot:decelerate(120/150);
				gat_dpadrot:x(360)
			end)
			mod_message(1198,function()
				gat_dpadrot:accelerate(120/150);
				gat_dpadrot:x(180)
				gat_dpadrot:decelerate(120/150);
				gat_dpadrot:x(0)
			end)
			]]
			
			mod_insert(1174.1,1236+4,'*10000 centered, *10000 50 flip, *10000 split, *10000 dizzyholds, *10000 -100 drawsizeback','end')--MoveY mods start at 1. -Kid
			mod_insert(1174.1,1236+4,'*10000 80 movey1, *10000 -112 movey4, *10000 -157.08 confusionoffset, *1000000 -20000 movey2, *1000000 -20000 movey3','end',1)
			mod_insert(1174.1,1236+4,'*10000 80 movey2, *10000 -112 movey3, *10000 0 confusionoffset, *1000000 -20000 movey1, *1000000 -20000 movey4','end',2)
			
			mod_insert(1207.5,1235.5,'*10000 150 beat, zigzag','end');
			mod_insert(1235.5,1237.5,'*10000 no beat','end');
			
			simple_m0d2(1208,40,0.8,'brake');
			simple_m0d2(1209.5,40,0.8,'brake');
			simple_m0d2(1211,40,1.2,'brake');
			
			simple_m0d2(1220,70,1.2,'brake');
			
			simple_m0d2(1208+16,40,0.8,'brake');
			simple_m0d2(1209.5+16,40,0.8,'brake');
			simple_m0d2(1211+16,40,1.2,'brake');
			simple_m0d2(1208+16,50,0.8,'stealth');
			simple_m0d2(1209.5+16,50,0.8,'stealth');
			simple_m0d2(1211+16,50,1.2,'stealth');
			
			simple_m0d2(1232,151.5,1,'tiny1');--Converted strength to its'SM5 equivalent. -Kid
			simple_m0d2(1232,151.5,1,'tiny2');--And use the column-specific version. -Kid
			simple_m0d2(1232,151.5,1,'tiny3');
			simple_m0d2(1232,151.5,1,'tiny4');
			
			mod_insert(1236,8,'*0.625 no flip, *1.25 no split, *1.963 no confusionoffset, *1.25 no centered','len');--MoveY mods start at 1. -Kid
			mod_insert(1236,8,'*1.4 no movey3, *1.4 no movey4, *1 no movey1, *1 no movey2','len');
			
			mod_insert(1238,8,'*1000 no movey3, *1000 no movey4, *1000 no movey1, *1000 no movey2, *1000 no split','len');
			mod_insert(1238,8,'*1000 no confusionoffset, *1000 no centered','len');
			
			--[[
			for i=1240,1271,2 do
				simple_m0d2(i-.05,60,.6,'brake',1)
				if i<1270 then
					simple_m0d2(i+1-.05,60,.6,'brake',2)
				end
			end
			]]
			
			--[[
			mod_message(1432,function()
				for pn=1,2 do
					local a = Proxy(pn)
					if a then
						a:linear(64*60/150)
						a:zoomz(50)
					end
				end
			end)
			]]
			
			--mod_insert(1432,64,'*0.014 50 stealth, *0.2 -50 longboy','len');
			mod_insert(1432,64,'*0.0196 -50 mini, *0.0196 -50 flip','len');
			
			--mod_shader(1188,55)--Again, we don't have this in SM5. -Kid
			--mod_shader(1204,55)
			
			mod_message(1238,'SetupEnding',true)
			
			mod_insert(1238,1368,'*10000 250 invert','end')
			mod_insert(1368,1369,'*10000 no invert','end')
			
			for i=1240,1299,2 do
				table.insert(mods,{i,1,'*3.168 350 invert','len'});
				table.insert(mods,{i+1,1,'*3.168 250 invert','len'});
			end
			
			mod_message(1238,'WhiteFlash');
			
			mod_message(1238,function() gat_scrollspd = -3 gat_walkerdir = 1 end,true)
			mod_message(1256,function() gat_scrollspd = 3 gat_walkerdir = -1 end)
			mod_message(1272,function() gat_scrollspd = -3 gat_walkerdir = 1 end)
			
			mod_message(1366,function() gat_scrollspd = 0 end)
			
			for i=1240,1255,2 do
				simple_m0d2(i-.05,60,.6,'brake',2)
				if i<1254 then
					simple_m0d2(i+1-.05,60,.6,'brake',1)
				end
			end
			for i=1256,1271,2 do
				simple_m0d2(i-.05,60,.6,'brake',1)
				if i<1270 then
					simple_m0d2(i+1-.05,60,.6,'brake',2)
				end
			end
			
			mod_message(1279,function() gat_scrollspd = 3 gat_walkerdir = -1 end)
			mod_message(1280,function() gat_scrollspd = -3 gat_walkerdir = 1 end)
			
			mod_insert(1264,8,'*0.3125 tiny','len',1)
			mod_insert(1264,8,'*0.1828 -58.5 tiny','len',2)--Converted strength and rate to their SM5 forms. -Kid
			
			mod_insert(1264,8,'*0.15625 50 stealth','len')
			mod_insert(1272,8,'*3 no stealth','len')
			--Convert Tiny values to their SM5 forms. -Kid
			mod_message(1271,function() gat_tiny1:x(100); gat_tiny2:x(-58.5)
				gat_confuserx:x(0) gat_confuserx:y(0) gat_confuserx:z(0)
				gat_confuserx1:x(0) gat_confuserx1:y(0) gat_confuserx1:z(0)
				gat_confuserx2:x(0) gat_confuserx2:y(0) gat_confuserx2:z(0)
			end)
			
			mod_message(1285,function() gat_scrollspd = 3 gat_walkerdir = -1 end)
			mod_message(1286,function() gat_scrollspd = -3 gat_walkerdir = 1 end)
			mod_message(1287,function() gat_scrollspd = 3 gat_walkerdir = -1 end)
			mod_message(1288,function() gat_scrollspd = -3 gat_walkerdir = 1 end)
			
			mod_message(1294,function() gat_scrollspd = 3 gat_walkerdir = -1 end)
			mod_message(1295,function() gat_scrollspd = -3 gat_walkerdir = 1 end)
			mod_message(1296,function() gat_scrollspd = 3 gat_walkerdir = -1 end)
			
			function gat_pulser1(beat,mult)
				local t1 = 45/150
				local t2 = 15/150
				local i = beat --FUCKING DIES
				--I have to do some logarithm math. Again. -Kid
				mod_message(i-.25,function()
					gat_tiny1:stoptweening();
					gat_tiny1:linear(t2)
					gat_tiny1:x(100*(math.log(1-(-1*mult*0.5))/gat_logden))-- -100*mult
					gat_tiny1:linear(t2)
					gat_tiny1:x(100*(math.log(1-(1*mult*0.5))/gat_logden))-- 100*mult
					gat_tiny1:linear(t2)
					gat_tiny1:x(100*(math.log(1-(-1*mult*0.5))/gat_logden))-- -100*mult
					gat_tiny1:linear(t2)
					gat_tiny1:x(100*(math.log(1-(1*mult*0.5))/gat_logden))-- 100*mult
					gat_tiny1:linear(t2)
					gat_tiny1:x(100*(math.log(1-(-1*mult*0.5))/gat_logden))-- -100*mult
					
					gat_tiny2:stoptweening();
					gat_tiny2:linear(t2)
					gat_tiny2:x(100*(math.log(1-(1*mult*0.5))/gat_logden))-- 100*mult
					gat_tiny2:linear(t2)
					gat_tiny2:x(100*(math.log(1-(-1*mult*0.5))/gat_logden))-- -100*mult
					gat_tiny2:linear(t2)
					gat_tiny2:x(100*(math.log(1-(1*mult*0.5))/gat_logden))-- 100*mult
					gat_tiny2:linear(t2)
					gat_tiny2:x(100*(math.log(1-(-1*mult*0.5))/gat_logden))-- -100*mult
					gat_tiny2:linear(t2)
					gat_tiny2:x(100*(math.log(1-(1*mult*0.5))/gat_logden))-- 100*mult
				end)
			end
			
			function gat_pulser2(from,to,mult)
				local t1 = 45/150
				local t2 = 15/150
				for i=from,to-1 do
					mod_message(i,function()
						gat_tiny1:decelerate(t1)
						gat_tiny1:x(100*(math.log(1-(-1*mult*0.5))/gat_logden))-- -100*mult
						gat_tiny1:linear(t2)
						gat_tiny1:x(100*(math.log(1-(1*mult*0.5))/gat_logden))-- 100*mult
						gat_tiny2:decelerate(t1)
						gat_tiny2:x(100*(math.log(1-(1*mult*0.5))/gat_logden))-- 100*mult
						gat_tiny2:linear(t2)
						gat_tiny2:x(100*(math.log(1-(-1*mult*0.5))/gat_logden))-- -100*mult
					end)
				end
			end
			
			gat_pulser2(1272,1279,1)
			gat_pulser1(1279,1)
			gat_pulser2(1280,1285,-1)
			gat_pulser1(1285,-1)
			gat_pulser2(1286,1287,1)
			gat_pulser1(1287,1)
			gat_pulser2(1288,1294,-1)
			gat_pulser1(1294,-1)
			gat_pulser1(1295,-1)
			gat_pulser2(1296,1301,1)
			
			mod_insert(1300,6,'*1000 -50 sawtoothperiod','len');
			simple_m0d(1301,200,1,'sawtooth');
			
			mod_insert(1365,6,'*1000 -65 sawtoothperiod, *1000 -65 sawtoothzperiod','len');
			--simple_m0d(1366,600,.70,'sawtooth');
			simple_m0d(1366,1000,.70,'sawtoothz');
			
			mod_message(1303,function()
				gat_tiny1:stoptweening();
				gat_tiny1:decelerate(50/150)
				gat_tiny1:x(0)
				gat_tiny2:stoptweening();
				gat_tiny2:decelerate(50/150)
				gat_tiny2:x(0)
			end)
			
			function mod_glitche(beat,amt)
				local fluct = 1
				mod_insert(beat-.2,4.4,'*10000 -41.1 squareperiod','len');--Converted period value to equivalent SM5 value. -Kid
				for pn=1,2 do
					local d = 1; if pn == 2 then d = -1 end
					for i=0,4,0.25 do
						local e = math.pow(math.sin(i*math.pi*(1/4)),1)
						mod_insert(beat+i-.05,.5,'*'..(20*math.abs(amt)/100)..' '..(e*d*amt*fluct)..' square','len')
						fluct = fluct*-1
					end
				end
			end
			
			mod_insert(1368,1,'*10000 no sawtooth, *10000 no square','len');
			
			mod_glitche(1338,90)
			mod_glitche(1342,90)
			mod_glitche(1354,90)
			mod_glitche(1362,90)
			
			--simple_m0d3(beat,strength,duration,bpm,mod,pn)
			mod_insert(1347,6,'*10000 200 bumpyperiod','len');
			simple_m0d3(1350,400,2,150,'bumpy');
			
			mod_message(1368,function()
				gat_zoomz:x(0.7*60)
				gat_zoomz:linear(90/150)
				gat_zoomz:x(0.7*1)
			end)
			
			mod_glitche(13,100)
			
			mod_message(1301,function()
				gat_confuserx:decelerate(170/150)
				gat_confuserx:y(360)
				gat_confuserx:sleep(0)
				gat_confuserx:y(0)
				
				--[[
				gat_tiny1:stoptweening();
				gat_tiny1:decelerate(170/150)
				gat_tiny1:x(0)
				gat_tiny2:stoptweening();
				gat_tiny2:decelerate(170/150)
				gat_tiny2:x(0)
				]]
			end)
			
			for i=0,3 do
				simple_m0d(1342+8*i,50,1,'stealth');
			end
			
			for i=0,3 do
				local p = i
				local d = 1
				if math.mod(p,2) == 0 then d = -1 end
				local m = 1.3+(p/3)
				
				simple_m0d(1304+8*i,600,1,'bumpy');
				simple_m0d(1305.5+8*i,-600,1,'bumpy');
				
				if math.mod(p,2) == 0 then
					simple_m0d(1308+8*i,600,1,'bumpy');
					simple_m0d(1308.75+8*i,-600,1,'bumpy');
					simple_m0d(1309.5+8*i,600,1,'bumpy');
				else
					simple_m0d(1308+8*i,600,1,'bumpy');
					simple_m0d(1309.5+8*i,-600,1,'bumpy');
				end
				
				simple_m0d(1310+8*i,50,1,'stealth');
				
				mod_message(1304+8*i,function()
					
					gat_confuserx:linear(90/150)
					gat_confuserx:z(20*d*m)
					gat_confuserx:linear(150/150)
					gat_confuserx:z(-20*d*m)
					
					if math.mod(p,2)== 0 then
						gat_confuserx:linear(45/150)
						gat_confuserx:z(14*d*m)
						gat_confuserx:linear(45/150)
						gat_confuserx:z(-14*d*m)
						gat_confuserx:decelerate(150/150)
						gat_confuserx:z(0)
						gat_confuserx:sleep(0);
					else
						gat_confuserx:linear(90/150)
						gat_confuserx:z(20*d*m)
						gat_confuserx:decelerate(150/150)
						gat_confuserx:z(0)
						gat_confuserx:sleep(0);
					end
					--[[
					gat_confuserx:decelerate(120/150)
					gat_confuserx:x(360*d)
					gat_confuserx:sleep(0)
					gat_confuserx:x(0)
					]]
					
					--[[
					gat_zoomz:x(0.7*60)
					gat_zoomz:linear(90/150)
					gat_zoomz:x(0.7*1)
					gat_zoomz:sleep(0)
					gat_zoomz:x(0.7*60)
					gat_zoomz:linear(150/150)
					gat_zoomz:x(0.7*1)
					gat_zoomz:sleep(0)
					
					if math.mod(p,2)== 0 then
						gat_zoomz:x(0.7*30)
						gat_zoomz:linear(45/150)
						gat_zoomz:x(1)
						gat_zoomz:sleep(0)
						gat_zoomz:x(0.7*30)
						gat_zoomz:linear(45/150)
						gat_zoomz:x(1)
						gat_zoomz:sleep(0)
						gat_zoomz:x(0.7*60)
						gat_zoomz:decelerate(150/150)
						gat_zoomz:x(1)
						gat_zoomz:sleep(0)
					else
						gat_zoomz:x(0.7*60)
						gat_zoomz:linear(90/150)
						gat_zoomz:x(1)
						gat_zoomz:sleep(0)
						gat_zoomz:x(0.7*60)
						gat_zoomz:decelerate(150/150)
						gat_zoomz:x(1)
						gat_zoomz:sleep(0)
					end
					]]
					
				end)
			end
			
			mod_message(1336,function()
				gat_confuserx:y(0)
				gat_confuserx:linear(16*60/150)
				gat_confuserx:x(360*4)
				gat_confuserx:linear(14*60/150)
				gat_confuserx:x(0)
			end)
			
			mod_message(1301,function() gat_scrollspd = 0 gat_walkerdir = 0 end)
			mod_message(1336,function() gat_scrollspd = 3 gat_walkerdir = -1 end)
			mod_message(1352,function() gat_scrollspd = -3 gat_walkerdir = 1 end)
			
			--[[
			local fluct = 1;
			for i=1336,1368,0.125 do
				local pos = i*math.pi*0.5
				for pn = 1,2 do
					local spd = 1.5+fluct*0.5*math.sin(pos)
					if pn == 2 then spd = 1.5+fluct*0.5*math.sin(pos+math.pi) end
					mod_insert(i-.1,0.5,'*2 '..spd..'x','len',pn)
				end
				fluct = fluct*-1;
			end
			]]
			
			--[[
			mod_insert(1336,1368,'*1000 -99.9 waveperiod, *0.04 100 wave, *0.04 100 drunk, *1000 -60 drunkperiod','end',1)
			mod_insert(1336,1368,'*1000 -99.9 waveperiod, *0.04 100 wave, *0.04 -100 drunk, *1000 -60 drunkperiod','end',2)
			]]
			
			mod_insert(1336,1368,'*0.1 100 drunk, *1000 -30 drunkperiod, *0.5 20 wave, *1000 -50 waveperiod','end',1)
			mod_insert(1336,1368,'*0.1 -100 drunk, *1000 -30 drunkperiod, *0.5 -20 wave, *1000 -50 waveperiod','end',2)
			
			mod_insert(1336,2,'*1.5 1.5x','len',1)
			mod_insert(1336,2,'*1.5 3x','len',2)
			for i=1338,1362,4 do
				mod_insert(i,2,'*3 3x','len',1)
				mod_insert(i,2,'*3 1.5x','len',2)
				mod_insert(i+2,2,'*3 1.5x','len',1)
				mod_insert(i+2,2,'*3 3x','len',2)
			end
			
			mod_message(1368,function()
				for pn=1,4 do
					local a = Proxy(pn)
					if a then
						local d = .25; if pn==2 then d=.75 end
						a:x(sw/2)
						a:y(sh*.5)
						a:zoom(gat_height_ratio);--Scale zoom. -Kid
						a:vibrate();
						a:rotationx(0);
						a:rotationy(0);
						a:rotationz(0);
						if pn>2 then
							a:visible(false)
						end
					end
				end
				gat_bg:diffuse(0,0,0,0.5);
			end,true)
			
			mod_insert(1368,1,'*1000 no drunk, *1000 no wave, *10000 no confusionxoffet, *10000 no confusionyoffset','len')
			
			mod_message(1368,function()
				gat_screamvib:x(100);
				gat_screamvib:decelerate(3);
				gat_screamvib:x(0);
			end)
			
			
			mod_message(1368,'ShowAFT');
			
			--mod_shader(1368,48,0)--This isn't a thing in SM5. -Kid
			
			local m_bl = 60/150
			
			mod_message(1368,function()
			
				gat_aft_target2a:linear(6);
				gat_aft_target2a:x(0.99*gat_alphamult);
				
				gat_aft_target2p:x(0.1);
				gat_aft_target2p:y(0);
				gat_aft_target2p:linear(m_bl*32)
				gat_aft_target2p:x(0.3);
				gat_aft_target2p:y(0.4);
				
				gat_aft_target2s:x(0);
				gat_aft_target2s:linear(m_bl*64)
				gat_aft_target2s:x(-0.5);
				
				gat_aft_target2r:x(0);
				gat_aft_target2r:sleep(m_bl*32)
				gat_aft_target2r:linear(m_bl*32)
				gat_aft_target2r:x(0.4);
				gat_aft_target2r:y(0.6);
			end);
			
			mod_message(1432,function()
				gat_aft_target3a:sleep(0);
				gat_aft_target3a:linear(6);
                if gat_nvidia then
                    gat_aft_target2a:x(0.99*0.65*gat_alphamult);
                    gat_aft_target3a:x(0.99*0.6*gat_alphamult);
                else
                    gat_aft_target3a:x(0.99);
                end
				
				gat_aft_target3p:x(0.1);
				gat_aft_target3p:y(0);
				gat_aft_target3p:linear(m_bl*32)
				gat_aft_target3p:x(0.4);
				gat_aft_target3p:y(0.6);
				
				gat_aft_target3s:x(0);
				gat_aft_target3s:linear(m_bl*64)
				gat_aft_target3s:x(0.6);
				
				gat_aft_target3r:x(0);
				gat_aft_target3r:sleep(m_bl*32)
				gat_aft_target3r:linear(m_bl*32)
				gat_aft_target3r:x(0.4);
				gat_aft_target3r:y(0.6);
			end);
			
			mod_message(1492,'FadeBlack');
			
			simple_m0d2(1384,150,3,'drunk');
			simple_m0d2(1403,60,3,'tornado');
			simple_m0d2(1416.5,300,3,'bumpy');
			simple_m0d2(1416.5,-150,3,'drunk');
			simple_m0d2(1424,120,2,'brake');
			
			mod_insert(1432,1500,'1 bumpy','end');
			
			--[[
			switcheroo_add(1432,'invert',.3125,16)
			switcheroo_add(1440,'flip',.625,8)
			switcheroo_add(1444,'normal',.625,4)
			switcheroo_add(1448,'normal',.3125,16)
			switcheroo_add(1456,'invert',.625,8)
			switcheroo_add(1460,'normal',.625,4)
			]]
			
			simple_m0d(1448,100,2,'wave');
			
			--[[
			mod_message(1452-.1,function()
				for pn=1,2 do
					local a = Proxy(pn)
					if a then
						a:rotationy(30)
						a:sleep(45/150)
						a:rotationy(0)
						a:sleep(15/150)
						a:rotationy(-30)
						a:sleep(30/150)
						a:rotationy(0)
						a:sleep(30/150)
						a:rotationy(30)
						a:sleep(30/150)
						a:rotationy(0)
						a:sleep(30/150)
					end
				end
			end)
			]]
			
			--[[
			switcheroo_add(32+1432,'invert',.3125,16)
			switcheroo_add(32+1440,'flip',.625,8)
			switcheroo_add(32+1444,'normal',.625,4)
			switcheroo_add(32+1448,'flip',.3125,16)
			switcheroo_add(32+1456,'invert',.625,8)
			switcheroo_add(32+1460,'normal',.625,4)
			]]
			
			local gat_end_ticks = {{1432.000,0,1},{1432.500,0,1},{1432.750,0,1},{1433.000,0,1},{1433.500,0,1},{1434.000,0,1},{1435.000,0,1},{1436.000,0,1},{1436.750,0,1},{1437.000,0,1},{1437.500,0,1},{1438.000,0,1},{1438.500,0,1},{1439.000,0,1},{1439.250,0,1},{1439.500,0,1},{1439.750,0,1},{1440.000,0,1},{1440.250,0,1},{1440.750,0,1},{1441.000,0,1},{1441.750,0,1},{1442.750,0,1},{1443.000,0,1},{1443.500,0,1},{1443.750,0,1},{1444.000,0,1},{1444.500,0,1},{1445.000,0,1},{1446.500,0,1},{1447.000,0,1},{1447.250,0,1},{1447.500,0,1},{1447.750,0,1},{1448.000,0,1},{1448.500,0,1},{1448.750,0,1},{1449.000,0,1},{1449.500,0,1},{1451.000,0,1},{1452.000,0,1},{1452.750,0,1},{1453.000,0,1},{1453.500,0,1},{1454.000,0,1},{1454.500,0,1},{1455.000,0,1},{1455.250,0,1},{1455.500,0,1},{1455.750,0,1},{1456.000,0,1},{1456.250,0,1},{1456.750,0,1},{1457.000,0,1},{1457.750,0,1},{1458.750,0,1},{1459.000,0,1},{1459.500,0,1},{1459.750,0,1},{1460.000,0,1},{1460.500,0,1},{1461.000,0,1},{1461.500,0,1},{1462.500,0,1},{1463.000,0,1},{1463.250,0,1},{1463.500,0,1},{1463.750,0,1},{1464.000,0,1},{1464.500,0,1},{1464.750,0,1},{1465.000,0,1},{1465.500,0,1},{1466.000,0,1},{1467.000,0,1},{1468.000,0,1},{1468.750,0,1},{1469.000,0,1},{1469.500,0,1},{1470.000,0,1},{1470.500,0,1},{1471.000,0,1},{1471.250,0,1},{1471.500,0,1},{1471.750,0,1},{1472.000,0,1},{1472.250,0,1},{1472.750,0,1},{1473.000,0,1},{1473.750,0,1},{1474.750,0,1},{1475.000,0,1},{1475.500,0,1},{1475.750,0,1},{1476.000,0,1},{1476.500,0,1},{1477.000,0,1},{1478.500,0,1},{1479.000,0,1},{1479.250,0,1},{1479.500,0,1},{1479.750,0,1},{1480.000,0,1},{1480.500,0,1},{1480.750,0,1},{1481.000,0,1},{1481.500,0,1},{1483.000,0,1},{1484.000,0,1},{1484.750,0,1},{1485.000,0,1},{1485.500,0,1},{1486.000,0,1},{1486.500,0,1},{1487.000,0,1},{1487.250,0,1},{1487.500,0,1},{1487.750,0,1},{1488.000,0,1},{1488.250,0,1},{1488.750,0,1},{1489.000,0,1},{1489.750,0,1},{1490.750,0,1},{1491.000,0,1},{1491.500,0,1},{1491.750,0,1},{1492.000,0,1},{1492.500,0,1},{1493.000,0,1},{1493.500,0,1},{1494.500,0,1},{1495.000,0,1},{1495.250,0,1},{1495.500,0,1},{1495.750,0,1},{9999,0,1}}
			
			local fluct = 1
			for i=1,table.getn(gat_end_ticks)-1 do
				local a = gat_end_ticks[i]
				local nxt = gat_end_ticks[i+1][1]-gat_end_ticks[i][1]
				local smods = '*1000 -3 reverse, *1000 6 alternate'
				if fluct == 1 then
					smods = '*1000 3 reverse, *1000 -6 alternate'
				end
				mod_insert(a[1]-.05,nxt+.1,smods,'len')
				fluct = fluct*-1
			end
			
			for i=1,table.getn(gat_end_ticks)-1 do
				local a = gat_end_ticks[i]
				local nxt = gat_end_ticks[i+1][1]-gat_end_ticks[i][1]
				local smods = '*1000 -2 reverse, *1000 4 alternate'
				if fluct == 1 then
					smods = '*1000 2 reverse, *1000 -4 alternate'
				end
				mod_insert(a[1]-.05-64,nxt+.1,smods,'len')
				fluct = fluct*-1
			end
			
			--These are the BG changes. We use broadcasts due to the switch to MessageCommands. -Kid
			mod_message(453,function()
				MESSAGEMAN:Broadcast('BG2')
			end);
			
			mod_message(584,function()
				MESSAGEMAN:Broadcast('BG2QOff')
			end);
			mod_message(648,function()
				MESSAGEMAN:Broadcast('BG2Q')
			end);
			
			mod_message(712,function()
				MESSAGEMAN:Broadcast('BG2QOff')
				MESSAGEMAN:Broadcast('BG3Q')
			end);
			
			mod_message(848,function()
				MESSAGEMAN:Broadcast('BG3SlowOff')
			end);
			mod_message(896,function()
				MESSAGEMAN:Broadcast('BG3')
			end);
			mod_message(1016,function()
				MESSAGEMAN:Broadcast('BG4Q')
			end);
			
			-----------------------------------------------------
			------------HURT BOSS--------------------------------
			-----------------------------------------------------
			mod_message(252,'RedFlash')
			mod_message(316,'RedFlashQ')
			mod_message(380,'RedFlashQ')
			mod_message(454,'RedFlashQ')
			mod_message(584,'RedFlash')
			mod_message(712,'RedFlash')
			mod_message(847,'RedFlash')
			mod_message(988,'RedFlash')
			
			mod_message(1368,'RedFlashLong')
			
			
			
			mod_message(8,function()
				gat_shame_spindist:accelerate(60/205);
				gat_shame_spindist:x(80)
				gat_shame_spindist:decelerate(60/205);
				gat_shame_spindist:x(160)
				gat_shame_spindist:accelerate(60/205);
				gat_shame_spindist:x(0)
				gat_shame_spindist:decelerate(60/205);
				gat_shame_spindist:x(-160)
				gat_shame_spindist:accelerate(60/205);
				gat_shame_spindist:x(0)
			end);
			
			mod_message(13,function()
				gat_shame_splitter:accelerate(60/205);
				gat_shame_splitter:y(300);
				gat_shame_splitter:sleep(0);
				gat_shame_splitter:y(0);
				gat_shame_splitter:x(400);
				gat_shame_splitter:decelerate(60/205);
				gat_shame_splitter:x(0);
			end);
			
			mod_message(15,function()
				gat_shame_splitter:accelerate(60/205);
				gat_shame_splitter:x(400);
				gat_shame_splitter:sleep(0);
				gat_shame_splitter:x(0);
				gat_shame_splitter:y(300);
				gat_shame_splitter:decelerate(60/205);
				gat_shame_splitter:y(0);
			end);
			
			mod_message(17,function()
				gat_shame_skewer:x(1);
				gat_shame_skewer:sleep(.1);
				gat_shame_skewer:x(0);
				gat_shame_skewer:sleep(.1);
				gat_shame_skewer:x(1);
				gat_shame_skewer:sleep(.2);
				gat_shame_skewer:x(0);
			end);
			
			mod_message(20.25,function()
				gat_shame_splitter:linear(.1);
				gat_shame_splitter:x(240)
				gat_shame_splitter:y(200)
				gat_shame_splitter:linear(1.4);
				gat_shame_splitter:x(0)
				gat_shame_splitter:y(0)
				gat_shame_spindist:linear(.1)
				gat_shame_spindist:x(100);
				gat_shame_spindist:linear(1.4);
				gat_shame_spindist:x(0)
			end);
			
			mod_message(24,function()
				gat_shame_skewer:x(.3)
				gat_shame_skewer:sleep(30/205)
				gat_shame_skewer:x(0)
				gat_shame_skewer:sleep(30/205)
				gat_shame_skewer:x(.3)
				gat_shame_skewer:sleep(60/205)
				gat_shame_skewer:x(0)
				gat_shame_skewer:sleep(60/205)
				gat_shame_skewer:x(.3)
				gat_shame_skewer:sleep(30/205)
				gat_shame_skewer:x(0)
			end);
			
			mod_message(27.5,function()
				char_shame:playcommand('Hide');
			end);
			--480 -> SCREEN_HEIGHT. -Kid
			--640 -> SCREEN_WIDTH. -Kid
			mod_message(31.5,function()
				char_shame:queuecommand('SpawnQ');
				char_shame:skewx(0);
				char_shame:zoom(1.2*gat_height_ratio);--Scale zoom & position. -Kid
				char_shame:rotationz(30);
				char_shame:x(-100*gat_height_ratio);
				char_shame:y(SCREEN_HEIGHT+80*gat_height_ratio);
				char_shame:linear(30/205)
				char_shame:x(80*gat_height_ratio);
				char_shame:y(SCREEN_HEIGHT-60*gat_height_ratio);
				char_shame:sleep(180/205)
				char_shame:linear(30/205)
				char_shame:x(-100*gat_height_ratio);
				char_shame:y(SCREEN_HEIGHT+80*gat_height_ratio);
			end);
			
			mod_message(35.5,function()
				char_shame:skewx(0);
				char_shame:rotationz(210);
				char_shame:x(SCREEN_WIDTH+100*gat_height_ratio);
				char_shame:y(-80*gat_height_ratio);
				char_shame:linear(30/205)
				char_shame:x(SCREEN_WIDTH-80*gat_height_ratio);
				char_shame:y(60*gat_height_ratio);
				char_shame:sleep(180/205)
				char_shame:linear(30/205)
				char_shame:x(SCREEN_WIDTH+100*gat_height_ratio);
				char_shame:y(-80*gat_height_ratio);
			end);
			
			mod_message(39.5,function()
				char_shame:skewx(0);
				char_shame:rotationz(-30);
				char_shame:x(SCREEN_WIDTH+100*gat_height_ratio);
				char_shame:y(SCREEN_HEIGHT+80*gat_height_ratio);
				char_shame:linear(30/205)
				char_shame:x(SCREEN_WIDTH-80*gat_height_ratio);
				char_shame:y(SCREEN_HEIGHT-60*gat_height_ratio);
				char_shame:sleep(180/205)
				char_shame:linear(30/205)
				char_shame:x(SCREEN_WIDTH+100*gat_height_ratio);
				char_shame:y(SCREEN_HEIGHT+80*gat_height_ratio);
			end);
			
			mod_message(43.5,function()
				char_shame:queuecommand('SpawnQ');
				char_shame:skewx(0);
				char_shame:rotationz(150);
				char_shame:x(-100*gat_height_ratio);
				char_shame:y(-80*gat_height_ratio);
				char_shame:linear(30/205)
				char_shame:x(80*gat_height_ratio);
				char_shame:y(60*gat_height_ratio);
				char_shame:sleep(180/205)
				char_shame:linear(30/205)
				char_shame:x(-100*gat_height_ratio);
				char_shame:y(-80*gat_height_ratio);
			end);
			
			mod_message(48,function()
				char_shame:zoom(2*gat_height_ratio);
				char_shame:rotationz(0)
				char_shame:x(SCREEN_CENTER_X);--Scale positions. -Kid
				char_shame:y(680*gat_height_ratio);
				char_shame:linear(7*60/205)
				char_shame:y(470*gat_height_ratio);
				char_shame:accelerate(60/205)
				char_shame:y(720*gat_height_ratio);
			end);
			
			mod_message(471,function()
				gat_shame_splitter:x(80);
				gat_shame_splitter:linear(60/175);
				gat_shame_splitter:x(0);
				gat_shame_alpha:linear(60/175);
				gat_shame_alpha:x(1);
			end)
			mod_message(485,function()
				gat_shame_splitter:x(0);
				gat_shame_splitter:linear(120/175);
				gat_shame_splitter:x(80);
				gat_shame_alpha:linear(120/175);
				gat_shame_alpha:x(0);
			end)
			
			mod_message(503,function()
				gat_shame_splitter:x(80);
				gat_shame_splitter:linear(60/175);
				gat_shame_splitter:x(0);
				gat_shame_alpha:linear(60/175);
				gat_shame_alpha:x(1);
			end)
			mod_message(517,function()
				gat_shame_splitter:x(0);
				gat_shame_splitter:linear(120/175);
				gat_shame_splitter:x(80);
				gat_shame_alpha:linear(120/175);
				gat_shame_alpha:x(0);
			end)
			
			gat_frame = 0;
			
---------------------------------------------------------------------------------------
----------------------DON'T TOUCH IT KIDDO---------------------------------------------
---------------------------------------------------------------------------------------
			
			function message_compare(a,b)
				return a[1] < b[1]
			end
			
			if table.getn(mod_actions) > 1 then
				table.sort(mod_actions, message_compare)
			end
			
			self:queuecommand('Update');
			
---------------------------------------------------------------------------------------
----------------------END DON'T TOUCH IT KIDDO-----------------------------------------
---------------------------------------------------------------------------------------
			
		end,
      OnCommand= cmd(visible,false),
      UpdateCommand= function(self)

			if GAMESTATE:GetSongBeat()>=0 and not checked then
				
				----------------------
				-- grab everything? --
				----------------------
				if SCREENMAN:GetTopScreen():GetChild('LifeP1') then LifeP1 = SCREENMAN:GetTopScreen():GetChild('LifeP1') end
				if SCREENMAN:GetTopScreen():GetChild('LifeP2') then LifeP2 = SCREENMAN:GetTopScreen():GetChild('LifeP2') end
				if SCREENMAN:GetTopScreen():GetChild('ScoreP1') then ScoreP1 = SCREENMAN:GetTopScreen():GetChild('ScoreP1') end
				if SCREENMAN:GetTopScreen():GetChild('ScoreP2') then ScoreP2 = SCREENMAN:GetTopScreen():GetChild('ScoreP2') end
				if SCREENMAN:GetTopScreen():GetChild('BPMDisplay') then BPMDisplay = SCREENMAN:GetTopScreen():GetChild('BPMDisplay') end
				if SCREENMAN:GetTopScreen():GetChild('LifeFrame') then LifeFrame = SCREENMAN:GetTopScreen():GetChild('LifeFrame') end
				if SCREENMAN:GetTopScreen():GetChild('ScoreFrame') then ScoreFrame = SCREENMAN:GetTopScreen():GetChild('ScoreFrame') end
				if SCREENMAN:GetTopScreen():GetChild('Lyrics') then Lyrics = SCREENMAN:GetTopScreen():GetChild('Lyrics') end
				if SCREENMAN:GetTopScreen():GetChild('SongForeground') then SongForeground = SCREENMAN:GetTopScreen():GetChild('SongForeground') end
				if SCREENMAN:GetTopScreen():GetChild('SongBackground') then SongBackground = SCREENMAN:GetTopScreen():GetChild('SongBackground') end
				if SCREENMAN:GetTopScreen():GetChild('Overlay') then Overlay = SCREENMAN:GetTopScreen():GetChild('Overlay') end
				if SCREENMAN:GetTopScreen():GetChild('Underlay') then Underlay = SCREENMAN:GetTopScreen():GetChild('Underlay') end
				
				--------------------------
				-- hide everything? y/n --
				--------------------------
				mod_hideall = true;
				if mod_hideall == true then
					if LifeFrame then LifeFrame:visible(false) end
					if LifeP1 then LifeP1:visible(false) end
					if LifeP2 then LifeP2:visible(false) end
					if ScoreP1 then ScoreP1:visible(false) end
					if ScoreP2 then ScoreP2:visible(false) end
					if SCREENMAN:GetTopScreen():GetChild('BPMDisplay') then BPMDisplay:visible(false) end
					if Overlay then Overlay:visible(false) end
					if Underlay then Underlay:visible(false) end
					if SCREENMAN:GetTopScreen():GetChild('ScoreFrame') then ScoreFrame:visible(false) end
					--Hide more things. -Kid
					if SCREENMAN:GetTopScreen():GetChild('StageDisplay') then SCREENMAN:GetTopScreen():GetChild('StageDisplay'):visible(false) end
					if SCREENMAN:GetTopScreen():GetChild('SongTitle') then SCREENMAN:GetTopScreen():GetChild('SongTitle'):visible(false) end
					if SCREENMAN:GetTopScreen():GetChild("SongMeterDisplayP1") then SCREENMAN:GetTopScreen():GetChild("SongMeterDisplayP1"):visible(false) end
					if SCREENMAN:GetTopScreen():GetChild("StepsDisplayP1") then SCREENMAN:GetTopScreen():GetChild("StepsDisplayP1"):visible(false) end
					if SCREENMAN:GetTopScreen():GetChild("SongMeterDisplayP2") then SCREENMAN:GetTopScreen():GetChild("SongMeterDisplayP2"):visible(false) end
					if SCREENMAN:GetTopScreen():GetChild("StepsDisplayP2") then SCREENMAN:GetTopScreen():GetChild("StepsDisplayP2"):visible(false) end
					--Lambda-specific things. -Kid
					if SCREENMAN:GetTopScreen():GetChild('LifeMeterBarP1') then SCREENMAN:GetTopScreen():GetChild('LifeMeterBarP1'):visible(false) end
					if SCREENMAN:GetTopScreen():GetChild('LifeMeterBarP2') then SCREENMAN:GetTopScreen():GetChild('LifeMeterBarP2'):visible(false) end
				end
				
				mod_plr[1] = SCREENMAN:GetTopScreen():GetChild('PlayerP1');
				mod_plr[2] = SCREENMAN:GetTopScreen():GetChild('PlayerP2');
				
				for i,v in pairs(mod_plr) do
					if SCREENMAN:GetTopScreen():GetChild('PlayerOptionsP'..i) then
						--_G['init_modsp'..i] = SCREENMAN:GetTopScreen():GetChild('PlayerOptionsP'..i):GetText();
					end
				end
				
				P1 = SCREENMAN:GetTopScreen():GetChild('PlayerP1');
				P2 = SCREENMAN:GetTopScreen():GetChild('PlayerP2');
				if P1 then
					jud1 = P1:GetChild('Judgment');
					com1 = P1:GetChild('Combo');
				end
				if P2 then
					jud2 = P2:GetChild('Judgment');
					com2 = P2:GetChild('Combo');
				end
				--aliases for old times sake
				
				screen = SCREENMAN:GetTopScreen();
				checked = true;
			end
			
---------------------------------------------------------------------------------------
----------------------TOUCH THIS-------------------------------------------------------
---------------------------------------------------------------------------------------


			
			local beat = GAMESTATE:GetSongBeat()
			
			
			
			
			if beat > mod_firstSeenBeat+1 then
				for pn=1,6 do
					local a = Proxy(pn)
					if a then--SetVanishPoint -> vanishpoint. -Kid
						a:GetWrapperState(1):vanishpoint(a:GetX(),a:GetY());
					end
				end
			end
			
			if perframe(256,444) then
				if P1 then
					P1:rotationz(gat_wagger:GetX()*2);
				end
				if P2 then
					P2:rotationz(-gat_wagger:GetX()*2);
				end
			end
			
			if perframe(1093.5,1100) then
				local b = beat-1093.5
				gat_FUCKTHISGAME:visible(true)
				gat_FUCKTHISGAME:diffusealpha(0.5*(1-(b/3)))
			end
			
			if perframe(456,712) then
				--Trace(tostring(gat_splitrot2[1]));
				gat_splitm = gat_splitm*-1
				if gat_splitset == 0 then
					gat_splitset = 4
				else
					gat_splitset = 0
				end
				for pn=1,4 do
					local d = 1; if math.mod(pn,2) == 0 then d = -1 end
					local d2 = 1; if pn < 3 then d2 = -1 end
					local a = Proxy(pn)
					local b = gat_splitrot2[pn+gat_splitset]
					if not b then
						b = gat_test;
					end
					local c = gat_splitvib[pn+gat_splitset]
					if not c then
						c = gat_test;
					end
					local e = gat_splitposnew[pn+gat_splitset]
					if not e then
						e = gat_test;
					end
					if a then--Scale things like z position and zoom. -Kid
						a:x(SCREEN_CENTER_X+(gat_splitdist:GetX()*gat_splitm*d)+(gat_splitdist3:GetX()*d*d2)+e:GetX())
						a:y(SCREEN_CENTER_Y+(gat_splitdist2:GetX()*d2)+e:GetY())
						a:z(e:GetZ()*gat_height_ratio);
						a:zoomx(gat_splitzoom:GetX()*gat_height_ratio);
						a:zoomy(gat_splitzoom:GetY()*gat_height_ratio);
						a:rotationz(gat_splitrot:GetX()+b:GetZ());
						a:rotationy(b:GetY());
						a:rotationx(b:GetX());
						a:effectmagnitude(c:GetX(),c:GetY(),c:GetZ());
						--a:effectm
					end
				end
			end
			
			
			
			if perframe(128,252) then
				gat_updateproxies()
			end
			
---------------------------------------------------------------------------------------
----------------------DON'T TOUCH IT KIDDO---------------------------------------------
---------------------------------------------------------------------------------------
			
			disable = false;
			if disable ~= true then
				
				-----------------------
				-- Player mod resets --
				-----------------------
				if beat > mod_firstSeenBeat+0.1 then -- performance coding!! --
					for i=1,2 do
						poptions[i]:FromString('clearall')
						if _G['init_modsp'..i] then 
							poptions[i]:FromString(_G['init_modsp'..i])
						end
					end
				end
				
				------------------------------------------------------------------------------
				-- custom mod reader by TaroNuke edited by WinDEU and re-stolen by TaroNuke --
				------------------------------------------------------------------------------
				if beat > mod_firstSeenBeat+0.1 then -- performance coding!! --
					for i,v in pairs(mods) do
						if v and table.getn(v) > 3 and v[1] and v[2] and v[3] and v[4] and (v[4] == 'len' or v[4] == 'end' or v[4] == 'error') then
							if beat >=v[1] then
								if (v[4] == 'len' and beat <=v[1]+v[2]) or (v[4] == 'end' and beat <=v[2]) then
									if table.getn(v) == 5 then
										poptions[v[5]]:FromString(v[3])
									else
										for i=1,2 do
											poptions[i]:FromString(v[3])
										end
									end
								end
							end
						else
							str = ''
							for j=1,5 do
								if j == 1 then
									str = tostring(v[j])
								else
									str = str..','..tostring(v[j])
								end
							end
							SCREENMAN:SystemMessage('Bad mod in beat-based table ('..str..')');
							v[1] = 0;
							v[2] = 0;
							v[3] = 'error';
							v[4] = 'error';
						end
					end
				end
				
				-----------------------------------------------------------------------------------------------------
				-- WinDEU's time-based len/end version of the #swag custom mod reader #teamproofofconcept (c) 2015 --
				-----------------------------------------------------------------------------------------------------
				if beat > mod_firstSeenBeat+0.1 then -- performance coding!! --
					for i,v in pairs(mods2) do
						if v and table.getn(v) > 3 and v[1] and v[2] and v[3] and v[4] and (v[4] == 'len' or v[4] == 'end' or v[4] == 'error') then
							if mod_time >=v[1] then
								if (v[4] == 'len' and mod_time <=v[1]+v[2]) or (v[4] == 'end' and mod_time <=v[2]) then
									if table.getn(v) == 5 then
										poptions[v[5]]:FromString(v[3])
									else
										for i=1,2 do
											poptions[i]:FromString(v[3])
										end
									end
								end
							end
						else
							str = ''
							for j=1,5 do
								if j == 1 then
									str = tostring(v[j])
								else
									str = str..','..tostring(v[j])
								end
							end
							SCREENMAN:SystemMessage('Bad mod in time-based table ('..str..')');
							v[1] = 0;
							v[2] = 0;
							v[3] = 'error';
							v[4] = 'error';
						end
					end
				end
				
				--[[
				if perframe(4,60) then
					for pn = 1,2 do
						for col = 0,3 do
							local t = (0.125*beat*math.pi) + (math.pi*(((pn-1)*4)+col)*0.125)
							
							--figure 8
							--x(t) = a sin(t)
							--y(t) = a sin(t) cos(t)
							
							GAMESTATE:ApplyGameCommand('mod,*10000 '..(gat_fig8:GetX()*math.sin(t))..' movex'..col,pn);
							GAMESTATE:ApplyGameCommand('mod,*10000 '..(gat_fig8:GetY()*math.sin(t)*math.cos(t))..' movey'..col,pn);
						end
					end
				end
				]]
				
				--#1: tumblr
				--[[
				if perframe(60,128) then
					local m = 0.5;
					local d2 = 0;
					if gat_tumblr == 1 then
						d2 = (math.pi);
						gat_tumblr = 0
					else
						gat_tumblr = 1
					end
					for pn=1,2 do
						local a = _G['P'..pn]
						local d = 0
						if pn == 2 then d = math.pi/2 end
						if a then
							a:rotationx(math.deg((beat*0.5*m*math.pi)+d+d2))
							a:rotationz(_G['gat_prottilt'..pn]:GetX());
							a:y(SCREEN_CENTER_Y+(1.5*_G['gat_mallet'..pn]:GetX()*gat_pradius:GetY()*math.sin((beat*0.5*m*math.pi)+d+d2)))
							a:x(SCREEN_CENTER_X+(1.5*_G['gat_prottilt'..pn]:GetX()*math.sin((beat*0.5*m*math.pi)+d+d2)))
							a:addx((50*math.sin((beat*1*math.pi)+(d*2))))
							a:z(-100+(gat_pradius:GetZ()*1.3*math.cos((beat*0.5*m*math.pi)+d+d2)))
							a:zoomy(1/_G['gat_mallet'..pn]:GetX())
							a:zoomx(_G['gat_mallet'..pn]:GetX())
						end
					end
				end
				]]
				
				--#2: the other thing
				--[[
				if perframe(60,128) then
					local m = 0.3;
					local d2 = 0;
					if gat_tumblr == 1 then
						d2 = (math.pi);
						gat_tumblr = 0
					else
						gat_tumblr = 1
					end
					for pn=1,2 do
						local a = _G['P'..pn]
						local d = 0
						local r = 1;
						if pn == 2 then r = -1 end
						if pn == 2 then d = math.pi/2 end
						if a then
							local rot = r*math.deg((beat*0.5*m*math.pi)+d+d2)
							a:rotationz(rot)
							GAMESTATE:ApplyGameCommand('mod, *100000 '..(-100*math.rad(rot))..' confusionoffset',pn);
							--GAMESTATE:ApplyGameCommand('mod, *100000 100 confusionoffset',pn);
						end
					end
				end
				]]
				
				--[[
				if perframe(4,60) then
					for col = 0,3 do
						local t = (0.125*beat*math.pi) + (math.pi*col*0.5)
						
						--figure 8
						--x(t) = a sin(t)
						--y(t) = a sin(t) cos(t)
						
						GAMESTATE:ApplyGameCommand('mod,*10000 '..(gat_fig8:GetX()*math.sin(t))..' movex'..col,pn);
						GAMESTATE:ApplyGameCommand('mod,*10000 '..(gat_fig8:GetY()*math.sin(t)*math.cos(t))..' movey'..col,pn);
					end
				end
				]]
				
				if beat > mod_firstSeenBeat+1 then
					gat_frame = gat_frame+1
				end
				
				if perframe(0,27.5) then
					
					--Use SCREEN variables. -Kid
					local finalx = SCREEN_CENTER_X+gat_shame_spindist:GetX()*math.sin(beat*math.pi*1 + math.pi*math.mod(gat_frame,2)*1)*gat_height_ratio
					local finaly = SCREEN_CENTER_Y+gat_shame_spindist:GetX()*math.cos(beat*math.pi*1 + math.pi*math.mod(gat_frame,2)*1)*gat_height_ratio
					
					local skew = gat_shame_skewer:GetX()
					
					if math.mod(gat_frame,2) == 1 then
						finaly = finaly+gat_shame_splitter:GetY()*gat_height_ratio
						finalx = finalx+gat_shame_splitter:GetX()*gat_height_ratio
						skew = skew*-1
					else
						finaly = finaly-gat_shame_splitter:GetY()*gat_height_ratio
						finalx = finalx-gat_shame_splitter:GetX()*gat_height_ratio
					end
					
					
					
					char_shame:x(finalx)
					char_shame:y(finaly)
					char_shame:skewx(skew)
				end
				
				if perframe(0,128) then
					if gat_isk == -1 then
						gat_isk = 1
					else
						gat_isk = -1;
					end
					for pn=1,2 do
						local a = Plr(pn)
						local d = 1; if pn==2 then d = 1 end
						if a then
							a:skewx(gat_g_skewer_intro:GetX()*d*gat_isk)
							a:rotationx(gat_g_rot_intro:GetX()*d*gat_isk)
							a:rotationy(gat_g_rot_intro:GetY()*d*gat_isk)
							a:rotationz(gat_g_rot_intro:GetZ()*d*gat_isk)
						end
					end
					
					
				end
				
				if perframe(96,124) and not perframe(108,112) then
					poptions[1]:Hallway((150*math.sin(beat*math.pi*0.25))/100,10000);
					poptions[2]:Hallway((-150*math.sin(beat*math.pi*0.25))/100,10000);
				end
				
				if perframe(128,160) then
					poptions[1]:ConfusionOffset(gat_confuser:GetX()/100,10000);
					poptions[2]:ConfusionOffset(gat_confuser:GetX()/100,10000);
				end
				
				if perframe(192,256) then
					for pn=1,2 do
						--GAMESTATE:ApplyGameCommand('mod,*100000 '..(-100*math.rad(_G['gat_shitproxy_rot'..pn]:GetX()))..' confusionoffset',pn);
						poptions[pn]:ConfusionOffset(-1*math.rad(_G['gat_shitproxy_rot'..pn]:GetX()),100000)
					end
				end
				
				if perframe(256,444) then
					for i=1,2 do--Why was this from 0 to 3? -Kid
						--GAMESTATE:ApplyGameCommand('mod,*100000 '..(-100*math.rad(gat_rotator:GetX()))..' confusionyoffset');
						poptions[i]:ConfusionYOffset(-1*math.rad(gat_rotator:GetX()),10000)
					end
					for pn=1,2 do
						local a = Plr(pn)
						local d = 1; if pn == 2 then d = -1 end
						if a then
							local adder = 0;
							if perframe(320,338) or perframe(344,384) then
								a:rotationz(gat_crossup:GetX()*math.sin(beat*math.pi));
								if perframe (320.5,337.5) or perframe(344.5,383.5) then
									adder = (gat_crossup:GetZ()*math.cos(beat*math.pi));
								end
							end
							a:skewx(gat_g_skewer:GetX()*d);
							a:rotationy(gat_rotator:GetX()+adder)
						end
					end
				end
				
				if perframe(443,447) then
					for pn=1,2 do--Removed the for i=0,3 because it's not needed. -Kid
						--GAMESTATE:ApplyGameCommand('mod,*100000 '..(-100*math.rad(_G['gat_confuserx'..pn]:GetX()))..' confusionxoffset',pn);
						poptions[pn]:ConfusionXOffset(-1*math.rad(_G['gat_confuserx'..pn]:GetX()),100000)
					end
				end
				
				if perframe(455,584) then
					--[[
					local wave = (beat/2-math.floor(beat/2))
					GAMESTATE:ApplyGameCommand('mod,*10000 '..(-25+75*math.cos(wave*math.pi*2))..' suddenoffset',1);
					GAMESTATE:ApplyGameCommand('mod,*10000 '..(-25-75*math.cos(wave*math.pi*2))..' suddenoffset',2);
					]]
					--GAMESTATE:ApplyGameCommand('mod,*10000 '..(-25+75*gat_updown:GetY())..' suddenoffset',1);
					poptions[1]:SuddenOffset(-0.25+0.75*gat_updown:GetY(),10000)
					--GAMESTATE:ApplyGameCommand('mod,*10000 '..(-25-75*gat_updown:GetY())..' suddenoffset',2);
					poptions[2]:SuddenOffset(-0.25-0.75*gat_updown:GetY(),10000)
				end
				
				--Here's some notes about Tiny and the differences between nITG and SM5. -Kid
				--SM5 has Tiny be 0.5 to the power of percentage Tiny. -Kid
				--nITG uses Mini's calculations. This causes problems here. -Kid
				--As a result, I have to do some logarithm math. -Kid
				if perframe(384,450) then
					if gat_curscb<table.getn(gat_scb) and beat > gat_scb[gat_curscb]-.05 then
						local nextbeat = gat_scb[gat_curscb+1]-gat_scb[gat_curscb]
						gat_logtiny1 = math.log((1 - (gat_tinyamnt*-1)*0.5))--gat_bigsmallamt*-1. -Kid
						gat_logtiny2 = math.log((1 - (gat_tinyamnt)*0.5))--gat_bigsmallamt. -Kid
						if gat_tinyfluct == 1 then
							gat_tiny1:finishtweening();
							gat_tiny2:finishtweening();
							gat_tiny1:decelerate(nextbeat*60/205);
							gat_tiny1:x(100*(gat_logtiny1/gat_logden));
							gat_tiny2:decelerate(nextbeat*60/205);
							gat_tiny2:x(100*(gat_logtiny2/gat_logden));
							gat_tinyfluct = 2;
							
							local bs1 = (gat_bigsmallamt*0.002)+1.2
							local bs2 = (gat_bigsmallamt*-0.002)+1.0
							
							local v1 = 40;
							
							if beat > 416 then
								bs1 = (gat_bigsmallamt*0.0015)+1.1
								bs2 = (gat_bigsmallamt*-0.0015)+1.0
								v1 = 20;
							end
							
							if beat > 432 then
								bs1 = (gat_bigsmallamt*0.001)+1.05
								bs2 = (gat_bigsmallamt*-0.001)+1.0
								v1 = 10;
							end
							
							gat_zoomy1:finishtweening();
							gat_zoomy2:finishtweening();
							gat_zoomy1:decelerate(nextbeat*60/205);
							gat_zoomy1:x(bs2);
							gat_zoomy2:decelerate(nextbeat*60/205);
							gat_zoomy2:x(bs1);
							
							gat_vib1:finishtweening();
							gat_vib1:linear(nextbeat*10/205);
							gat_vib1:x(v1);
							gat_vib1:y(v1);
							gat_vib1:linear(nextbeat*50/205);
							gat_vib1:x(0);
							gat_vib1:y(0);
							
							if beat < 446 then
								char_shame:stoptweening();
								char_shame:basezoomx(-1)
								char_shame:queuecommand('Attack');
								char_shame:y(SCREEN_CENTER_Y)--Use SCREEN variables and ratios. -Kid
								char_shame:linear(nextbeat*15/205)
								char_shame:x(-100*gat_height_ratio)
								char_shame:sleep(0);
								char_shame:x(SCREEN_WIDTH+100*gat_height_ratio);
								char_shame:decelerate(nextbeat*45/205)
								char_shame:x(SCREEN_WIDTH-100*gat_width_ratio)
							end
							
						else
							gat_tiny1:finishtweening();
							gat_tiny2:finishtweening();
							gat_tiny1:decelerate(nextbeat*60/205);
							gat_tiny1:x(100*(gat_logtiny2/gat_logden));
							gat_tiny2:decelerate(nextbeat*60/205);
							gat_tiny2:x(100*(gat_logtiny1/gat_logden));
							gat_tinyfluct = 1;
							
							local bs1 = (gat_bigsmallamt*0.002)+1.2
							local bs2 = (gat_bigsmallamt*-0.002)+1.0
							local v1 = 40;
							
							if beat > 416 then
								bs1 = (gat_bigsmallamt*0.0015)+1.1
								bs2 = (gat_bigsmallamt*-0.0015)+1.0
								v1 = 20
							end
							
							if beat > 432 then
								bs1 = (gat_bigsmallamt*0.001)+1.05
								bs2 = (gat_bigsmallamt*-0.001)+1.0
								v1 = 10
							end
							
							gat_zoomy1:finishtweening();
							gat_zoomy2:finishtweening();
							gat_zoomy1:decelerate(nextbeat*60/205);
							gat_zoomy1:x(bs1);
							gat_zoomy2:decelerate(nextbeat*60/205);
							gat_zoomy2:x(bs2);
							
							gat_vib2:finishtweening();
							gat_vib2:linear(nextbeat*10/205);
							gat_vib2:x(v1);
							gat_vib2:y(v1);
							gat_vib2:linear(nextbeat*50/205);
							gat_vib2:x(0);
							gat_vib2:y(0);
							
							if beat < 446 then
								char_shame:stoptweening();
								char_shame:basezoomx(1)
								char_shame:queuecommand('Attack');
								char_shame:y(SCREEN_CENTER_Y)--Use SCREEN varibles and ratios. -Kid
								char_shame:linear(nextbeat*15/205)
								char_shame:x(SCREEN_WIDTH+100*gat_height_ratio)
								char_shame:sleep(0);
								char_shame:x(-100*gat_height_ratio)
								char_shame:decelerate(nextbeat*45/205)
								char_shame:x(100*gat_width_ratio)
							end
							
						end
						gat_bigsmallamt = gat_bigsmallamt+1.5;
						gat_tinyamnt = gat_bigsmallamt/100;
						gat_curscb = gat_curscb+1;
					elseif gat_curscb == table.getn(gat_scb) then
						gat_tiny1:finishtweening();
						gat_tiny2:finishtweening();
						gat_tiny1:decelerate(60/205);
						gat_tiny1:x(0);
						gat_tiny2:decelerate(60/205);
						gat_tiny2:x(0);
						gat_curscb = gat_curscb+1;
						
						gat_zoomy1:finishtweening();
						gat_zoomy2:finishtweening();
						gat_zoomy1:decelerate(60/205);
						gat_zoomy1:x(1);
						gat_zoomy2:decelerate(60/205);
						gat_zoomy2:x(1);
					end
					
					for pn=1,2 do
						--Tiny in nITG pushes columns away in > 0 percentages. SM5's tiny doesn't. -Kid
						--Compensate for this by using the column-specific versions. -Kid
						poptions[pn]:Tiny1((_G['gat_tiny'..pn]:GetX())/100,10000,true):Tiny2((_G['gat_tiny'..pn]:GetX())/100,10000,true):Tiny3((_G['gat_tiny'..pn]:GetX())/100,10000,true):Tiny4((_G['gat_tiny'..pn]:GetX())/100,10000)
						local a = _G['P'..pn]
						local b = _G['gat_vib'..pn]
						if a then
							a:effectmagnitude(b:GetX(),b:GetY(),0);
						end
					end
				end
				
				if perframe(384,432) then
					gat_bg:effectmagnitude((gat_vib1:GetX()+gat_vib2:GetX())/2,0,0)
				end
				if perframe(432,444) then
					gat_bg:effectmagnitude((gat_vib1:GetX()+gat_vib2:GetX()),0,0)
				end
				if perframe(444,448) then
					gat_bg:effectmagnitude(gat_bgvib:GetX(),gat_bgvib:GetY(),0)
				end
				
				if perframe(469,489) then
					local d = 1
					if math.mod(gat_frame,2) == 1 then
						d = -1
					end
					for s = 1,2 do--Scaled zoom. -Kid
						_G['char_shame_dark'..s]:x(gat_shame_posx[gat_shame_rng[s] ])
						_G['char_shame_dark'..s]:y(gat_shame_posy[gat_shame_rng[s] ])
						_G['char_shame_dark'..s]:zoom(0.8*gat_height_ratio+gat_shame_alpha:GetX()*0.3*gat_height_ratio);
						_G['char_shame_dark'..s]:zoom(gat_height_ratio+gat_shame_alpha:GetX()*0.3*gat_height_ratio);
						_G['char_shame_dark'..s]:diffusealpha(gat_shame_alpha:GetX());
						_G['char_shame_clone'..s]:x(gat_shame_posx[gat_shame_rng[s] ]+gat_shame_splitter:GetX()*d)
						_G['char_shame_clone'..s]:y(gat_shame_posy[gat_shame_rng[s] ])
						_G['char_shame_clone'..s]:diffusealpha(gat_shame_alpha:GetX())
					end
				end
				
				if perframe(502,521) then
					local d = 1
					if math.mod(gat_frame,2) == 1 then
						d = -1
					end
					for s = 1,4 do--Scaled zoom. -Kid
						_G['char_shame_dark'..s]:x(gat_shame_posx[gat_shame_rng2[s] ])
						_G['char_shame_dark'..s]:y(gat_shame_posy[gat_shame_rng2[s] ])
						_G['char_shame_dark'..s]:zoom(0.8*gat_height_ratio+gat_shame_alpha:GetX()*0.3*gat_height_ratio);
						_G['char_shame_dark'..s]:zoom(gat_height_ratio+gat_shame_alpha:GetX()*0.3*gat_height_ratio);
						_G['char_shame_dark'..s]:diffusealpha(gat_shame_alpha:GetX());
						_G['char_shame_clone'..s]:x(gat_shame_posx[gat_shame_rng2[s] ]+gat_shame_splitter:GetX()*d)
						_G['char_shame_clone'..s]:y(gat_shame_posy[gat_shame_rng2[s] ])
						_G['char_shame_clone'..s]:diffusealpha(gat_shame_alpha:GetX())
					end
				end
				
				--deow
				if perframe(384,444) then
					for pn=1,2 do
						local a = _G['P'..pn]
						local d = 1
						local d2 = math.pi;
						if pn == 2 then d2 = d2+math.pi/2; d = -1 end
						--if pn == 2 then d = -1 end
						if a and (perframe(384.5,443.5) and pn==1 or pn==2) then
							a:rotationx(0+(gat_deow:GetX()*math.cos((beat*1*math.pi)+d2)))
						end
						if a then
							a:zoomx(_G['gat_zoomy'..pn]:GetX()*gat_height_ratio)--Scale zoom. -Kid
						end
					end
				end
				
				if perframe(720,732) then
					--GAMESTATE:ApplyGameCommand('mod,*10000 '..(gat_wowinvert:GetX())..' invert');
					--GAMESTATE:ApplyGameCommand('mod,*10000 '..(100*math.rad(gat_wowinvert:GetX()*0.9))..' confusionoffset');
					poptions[1]:Invert(gat_wowinvert:GetX()/100,10000)
					poptions[1]:ConfusionOffset(math.rad(gat_wowinvert:GetX()*0.9),10000)
					poptions[2]:Invert(gat_wowinvert:GetX()/100,10000)
					poptions[2]:ConfusionOffset(math.rad(gat_wowinvert:GetX()*0.9),10000)
				end
				
				if perframe(784,848) then
					gat_update_toss();
				end
				
				if perframe(916,925) then
					for pn=1,2 do
						local a = Proxy(pn)
						if a then
							a:effectmagnitude(gat_screamvib:GetX(),gat_screamvib:GetX(),0);
						end
					end
				end
				
				if perframe(1368,1503) then
					for pn=1,2 do
						local a = Proxy(pn)
						if a then
							a:effectmagnitude(gat_screamvib:GetX(),gat_screamvib:GetX(),0);
						end
					end
				end
				
				if perframe(912,996) then
					for i=0,3 do
						--GAMESTATE:ApplyGameCommand('mod,*10000 '..(_G['gat_terrorfuck_'..i]:GetX()*(100/64))..' movex'..i);
						--I'm amazed that this works. -Kid
						poptions[1]['MoveX'..(i+1)](poptions[1],(_G['gat_terrorfuck_'..i]:GetX()*(100/64))/100,10000)
						poptions[2]['MoveX'..(i+1)](poptions[2],(_G['gat_terrorfuck_'..i]:GetX()*(100/64))/100,10000)
					end
				end
				
				if perframe(984,992) then--Why was this in a for i=0,3 loop? -Kid
					for i=1,2 do
						--GAMESTATE:ApplyGameCommand('mod,*100000 '..(-100*math.rad(gat_confuserx:GetX()))..' confusionxoffset');
						poptions[i]:ConfusionXOffset(-1*math.rad(gat_confuserx:GetX()),10000)
					end
				end
				
				if perframe(1016,1176) then
					screen:effectmagnitude(gat_tsvib:GetX(),gat_tsvib:GetY(),0)
				end
				
				if perframe(1109,1113) then
					for pn=1,2 do
						local b = _G['jud'..pn..'p']
						if b then
							b:basezoomx(gat_jud_bz:GetX());
							b:basezoomy(gat_jud_bz:GetX());
						end
						local c = _G['com'..pn..'p']
						if c then
							c:basezoomx(gat_jud_bz:GetX());
							c:basezoomy(gat_jud_bz:GetX());
						end
					end
					judc:y(gat_jud_bz:GetY()-SCREEN_HEIGHT*0.55);
					comc:y(gat_jud_bz:GetY()-SCREEN_HEIGHT*0.5);
				end
				
				if perframe(1118,1124) then
					for pn = 1,2 do
						local a = Proxy(pn)
						if a then
							a:vibrate();
							local b = _G['gat_vib'..pn]
							a:effectmagnitude(b:GetX(),b:GetY(),b:GetZ());
							a:zoomz(1+(gat_distant:GetX()/50))
							a:rotationx(-20*math.rad(gat_distant:GetX()))
							a:z(gat_tpos:GetZ()*3);
						end
					end
				end
				
				if perframe(1272,1304) then
					for pn=1,2 do
						--Tiny in nITG pushes columns away in > 0 percentages. SM5's tiny doesn't. -Kid
						--Compensate for this by using the column-specific versions. -Kid
						poptions[pn]:Tiny1((_G['gat_tiny'..pn]:GetX())/100,10000,true):Tiny2((_G['gat_tiny'..pn]:GetX())/100,10000,true):Tiny3((_G['gat_tiny'..pn]:GetX())/100,10000,true):Tiny4((_G['gat_tiny'..pn]:GetX())/100,10000)
					end
				end
				
				if perframe(1140,1146) then
					gat_aft_target:zoom(gat_aftzoom:GetX())
					gat_aft_target:effectmagnitude(gat_aftvib:GetX(),gat_aftvib:GetY(),gat_aftvib:GetZ())
					gat_aft_target:y(SCREEN_CENTER_Y+gat_afty:GetY()*gat_height_ratio+gat_afty2:GetY()*gat_height_ratio);
					gat_aft_target:x(SCREEN_CENTER_X+gat_aftx:GetX()*gat_height_ratio);
					gat_aft_target:rotationz(gat_aftrz:GetX()*-1)--Rotate correctly, please. -Kid
				end
				
				if perframe(1175,1236) then
					for pn=1,2 do
						local d = 0; if pn==1 then d = 90 end
						--GAMESTATE:ApplyGameCommand('mod,*10000 '..(-100*math.rad(d+gat_dpadrot:GetX()))..' confusionoffset',pn)
						poptions[pn]:ConfusionOffset(-1*math.rad(d+gat_dpadrot:GetX()),10000)
						local a = Proxy(pn)
						if a then
							a:rotationz(d+gat_dpadrot:GetX())
							a:rotationx(_G['gat_dpadrot'..pn]:GetX())
						end
					end
				end
				
				--[[
				if perframe(960,961) then
					for i=0,3 do
						GAMESTATE:ApplyGameCommand('mod,*10000 no movex'..i);
						GAMESTATE:ApplyGameCommand('mod,*10000 no movey'..i);
					end 
				end 
				]]
				
				if perframe(1368,1600) then--Did *-1 to rotationz and skewx. -Kid
					gat_aft_target2:diffusealpha(gat_aft_target2a:GetX())
					gat_aft_target3:diffusealpha(gat_aft_target3a:GetX())
					gat_aft_target2prox:diffusealpha(gat_aft_target2a:GetX())
					gat_aft_target3prox:diffusealpha(gat_aft_target3a:GetX())
					
					gat_aft_target:zoomx(1+(gat_aft_target2p:GetX()*0.9*math.sin(beat*0.25*math.pi)));
					gat_aft_target:zoomy(1+(gat_aft_target2p:GetY()*0.9*math.cos(beat*0.25*math.pi)));
					gat_aft_target:skewx(-1*gat_aft_target2s:GetX()*0.7*math.sin(beat*0.25*math.pi))
					gat_aft_target:rotationz(-1*gat_aft_target2r:GetX()*0.8*math.sin(beat*0.25*math.pi))
					
					beat = beat+0.2;
					
					--gat_aft_target2wrap:zoomx(1+(gat_aft_target3p:GetX()*0.9*math.sin(beat*0.25*math.pi)));
					--gat_aft_target2wrap:zoomy(1+(gat_aft_target3p:GetY()*0.9*math.cos(beat*0.25*math.pi)));
					--gat_aft_target2:skewx(gat_aft_target3s:GetX()*0.7*math.sin(beat*0.25*math.pi))
					--gat_aft_target2:rotationz(gat_aft_target3r:GetX()*0.8*math.sin(beat*0.25*math.pi))
					--The one in our AFT. -Kid
					gat_aft_target2proxwrap:zoomx(1+(gat_aft_target3p:GetX()*0.9*math.sin(beat*0.25*math.pi)));
					gat_aft_target2proxwrap:zoomy(1+(gat_aft_target3p:GetY()*0.9*math.cos(beat*0.25*math.pi)));
					gat_aft_target2prox:skewx(-1*gat_aft_target3s:GetX()*0.7*math.sin(beat*0.25*math.pi))
					gat_aft_target2prox:rotationz(-1*gat_aft_target3r:GetX()*0.8*math.sin(beat*0.25*math.pi))
					
					beat = beat-0.2;
					
					
				end
				
				if perframe(1240,1240+128) then
					
					local pos = beat*1*gat_walkerdir
					
					if beat<1336 then
						for i=0,3,2 do
							--GAMESTATE:ApplyGameCommand('mod,*10000 '..(math.min(-100*math.sin(pos*math.pi),0))..' movey'..i);
							poptions[1]['MoveY'..(i+1)](poptions[1],math.min(-100*math.sin(pos*math.pi),0)/100,10000)
							poptions[2]['MoveY'..(i+1)](poptions[2],math.min(-100*math.sin(pos*math.pi),0)/100,10000)
						end
						for i=1,3,2 do
							--GAMESTATE:ApplyGameCommand('mod,*10000 '..(math.min(100*math.sin(pos*math.pi),0))..' movey'..i);
							poptions[1]['MoveY'..(i+1)](poptions[1],math.min(100*math.sin(pos*math.pi),0)/100,10000)
							poptions[2]['MoveY'..(i+1)](poptions[2],math.min(100*math.sin(pos*math.pi),0)/100,10000)
						end
					else
						
					end
					
					if true then
						for pn=1,2 do
							local d = 1; if pn == 2 then d = -1 end
							--GAMESTATE:ApplyGameCommand('mod,*100000 '..(d*-100*math.rad(_G['gat_confuserx']:GetX()))..' confusionyoffset',pn);
							--GAMESTATE:ApplyGameCommand('mod,*100000 '..(d*-100*math.rad(_G['gat_confuserx']:GetY()))..' confusionxoffset',pn);
							--GAMESTATE:ApplyGameCommand('mod,*100000 '..(d*-100*math.rad(_G['gat_confuserx']:GetZ()))..' confusionoffset',pn);
							poptions[pn]:ConfusionYOffset(d*-1*math.rad(_G['gat_confuserx']:GetX()),10000)
							poptions[pn]:ConfusionXOffset(d*-1*math.rad(_G['gat_confuserx']:GetY()),10000)
							poptions[pn]:ConfusionOffset(d*-1*math.rad(_G['gat_confuserx']:GetZ()),10000)
						end
					end
					
					--gat_scrollspd = -3;
					
					for i=1,4 do
						_G['gat_pos'..i]:addx(-gat_scrollspd*gat_height_ratio);
						
						_G['gat_pos'..i]:diffusealpha(0);
						
						--_G['gat_pos'..i]:x(-160+(240*i));
						
						if _G['gat_pos'..i]:GetX() < SCREEN_CENTER_X-480*gat_height_ratio then
							_G['gat_pos'..i]:addx(960*gat_height_ratio);
						elseif _G['gat_pos'..i]:GetX() > SCREEN_CENTER_X+480*gat_height_ratio then
							_G['gat_pos'..i]:addx(-960*gat_height_ratio);
						end
						
					end
					
					for pn=1,4 do
						local a = Proxy(pn)
						if a then
							a:visible(true);
							a:x(_G['gat_pos'..pn]:GetX())
							if true then
								local d = 1
								e = 1
								if math.mod(pn,2) == 0 then
									d = -1
									e = 2;
								end
								a:rotationy(d*_G['gat_confuserx']:GetX()+_G['gat_confuserx'..e]:GetX());
								a:rotationx(d*_G['gat_confuserx']:GetY()+_G['gat_confuserx'..e]:GetY());
								a:rotationz(d*_G['gat_confuserx']:GetZ()+_G['gat_confuserx'..e]:GetZ());
								
								a:zoomz(gat_zoomz:GetX());
								--a:skewx(-d*(gat_zoomz:GetX()-1)*(1/60));
							end
						end
					end
					
					--[[
					if gat_endfluct == 1 then
						for pn=1,4 do
							local a = Proxy(pn)
							if a then
								a:
							end
						end
						if P1 then P1:x(gat_pos1:GetX()); end
						if P2 then P2:x(gat_pos2:GetX()); end
						gat_endfluct = 2
					else
						if P1 then P1:x(gat_pos3:GetX()); end
						if P2 then P2:x(gat_pos4:GetX()); end
						gat_endfluct = 1
					end
					]]
					
				end
				
				---------------------------------------
				-- ACTION RPGS AINT GOT SHIT ON THIS --
				---------------------------------------
				if beat > mod_firstSeenBeat+0.1 then -- performance coding!! --
					while curaction<=table.getn(mod_actions) and GAMESTATE:GetSongBeat()>=mod_actions[curaction][1] do
						if mod_actions[curaction][3] or GAMESTATE:GetSongBeat() < mod_actions[curaction][1]+2 then
							if type(mod_actions[curaction][2]) == 'function' then
								mod_actions[curaction][2]()
							elseif type(mod_actions[curaction][2]) == 'string' then
								MESSAGEMAN:Broadcast(mod_actions[curaction][2]);
							end
						end
						curaction = curaction+1;
					end
				end
				
			end
			
			self:sleep(0.02);
			self:queuecommand('Update');

---------------------------------------------------------------------------------------
----------------------END DON'T TOUCH IT KIDDO-----------------------------------------
---------------------------------------------------------------------------------------
			
		end,
    },--gat_allproxies moved to be inside aft. -Kid
    Def.Quad{
      Name= "actor_cC",
      --This MessageCommand is for emulating Blind. -Kid
      BlindOnMessageCommand= function(self)
			for pn=1,2 do
				if _G['P'..pn] then
					_G['jud'..pn]:visible(false)
					_G['com'..pn]:visible(false)
					--Because Simply Love. -Kid
					if _G['com'..pn]:GetChild('Number') then
					    _G['com'..pn]:GetChild('Number'):visible(false) end
				end
			end
		end,
      --This MessageCommand turns off the emulated Blind. -Kid
      BlindOffMessageCommand= function(self)
			for pn=1,2 do
				if _G['P'..pn] then
					_G['jud'..pn]:visible(true)
					_G['com'..pn]:visible(true)
					--Because Simply Love. -Kid
					if _G['com'..pn]:GetChild('Number') then
					    _G['com'..pn]:GetChild('Number'):visible(true) end
				end
			end
		end,
      GotoSidesFastMessageCommand= function(self)
			if P1 then
				P1:finishtweening();
				P1:x(SCREEN_CENTER_X)
				P1:y(SCREEN_CENTER_Y)
				P1:sleep(0)--These positions get scaled to height. -Kid
				P1:x(SCREEN_CENTER_X-160*gat_height_ratio-96*gat_height_ratio);
				P1:rotationz(0);
			end
			if P2 then
				P2:finishtweening();
				P2:x(SCREEN_CENTER_X)
				P2:y(SCREEN_CENTER_Y)
				P2:sleep(0)
				P2:x(SCREEN_CENTER_X+160*gat_height_ratio+96*gat_height_ratio);
				P2:rotationz(0);
			end
		end,
      GotoSidesMessageCommand= function(self)
			if P1 then
				P1:finishtweening();
				P1:x(SCREEN_CENTER_X)
				P1:y(SCREEN_CENTER_Y)
				P1:bounceend(240/205)
				P1:x(SCREEN_CENTER_X-160*gat_height_ratio-96*gat_height_ratio);
				P1:rotationz(360);
			end
			if P2 then
				P2:finishtweening();
				P2:x(SCREEN_CENTER_X)
				P2:y(SCREEN_CENTER_Y)
				P2:bounceend(240/205)
				P2:x(SCREEN_CENTER_X+160*gat_height_ratio+96*gat_height_ratio);
				P2:rotationz(360);
			end
		end,
      InitCommand= cmd(visible,false),
      MenuDownP2LiftMessageCommand= function (self)
			gat_holdingdown = false;
		end,
      MenuDownP2PressMessageCommand= function (self)
			gat_holdingdown = true;
		end,
      MenuUpP2PressMessageCommand= function (self)
			gat_screen_zoom = 1;
		end,
      OnCommand= function(self)
		
			--For this, I had to scale all position related checks and scroll movements. -Kid
			--Also, positions were scaled to be based on width because it's easier than redoing all the calculations to shift them over (and I'm not too fond of letterboxing). -Kid
			local mx = 480*gat_width_ratio
			local my = 100*gat_height_ratio
			
			local lb = (0-140)*gat_width_ratio
			local rb = (640+180)*gat_width_ratio
			local tb = (0-1000+300)*gat_height_ratio
			local bb = (480+250+300)*gat_height_ratio
		
			function gat_updateproxies()
				
				SCREENMAN:GetTopScreen():zoom(gat_screen_zoom)
				SCREENMAN:GetTopScreen():x((1-gat_screen_zoom)*320)
				SCREENMAN:GetTopScreen():y((1-gat_screen_zoom)*240)
				
				if gat_holdingdown then gat_screen_zoom = gat_screen_zoom/1.02 end
				
				gat_allproxies:addx(gat_scroller:GetX()*gat_height_ratio+gat_scroller2:GetX()*gat_height_ratio)--This should be scaled by height. -Kid
				gat_allproxies:addy(gat_scroller:GetY()*gat_height_ratio+gat_scroller2:GetY()*gat_height_ratio)
				
				--if beat>192 then my = 300 end
				
				if gat_allproxies:GetX()>mx+500*gat_width_ratio then
					gat_allproxies:addx(-500*gat_width_ratio)
				end
				if gat_allproxies:GetX()<mx then
					gat_allproxies:addx(500*gat_width_ratio)
				end
				
				if gat_allproxies:GetY()>my+350*gat_height_ratio then
					gat_allproxies:addy(-350*gat_height_ratio)
				end
				if gat_allproxies:GetY()<my then
					gat_allproxies:addy(350*gat_height_ratio)
				end
				
				for pn=1,2 do
					for i=1,9 do
						local x = gat_proxies[pn][i]:GetX()+gat_allproxies:GetX()-gat_shitprox_offset:GetX()
						local y = gat_proxies[pn][i]:GetY()+gat_allproxies:GetY()-gat_shitprox_offset:GetY()
						if x<lb or x>rb or y<tb or y>bb then
							gat_proxies[pn][i]:visible(false)
						else
							gat_proxies[pn][i]:visible(true)
						end
						gat_proxies[pn][i]:rotationz(_G['gat_shitproxy_rot'..pn]:GetX());
					end
				end
				
			end
			
			gat_screen_zoom = 1;
		end,
      StartShit2MessageCommand= function(self)
			if P1 then P1:x(SCREEN_CENTER_X); P1:y(SCREEN_CENTER_Y); P1:visible(false) end
			if P2 then P2:x(SCREEN_CENTER_X); P2:y(SCREEN_CENTER_Y); P2:visible(false) end
			
			gat_allproxies:visible(true)
			
			gat_allproxies:x(512*gat_width_ratio);--We scale the position of the container and the proxies themselves. -Kid
			gat_allproxies:y(100*gat_height_ratio);
			gat_allproxiesc:zoom(1);
			
			for pn=1,2 do
				for i=1,9 do
					gat_proxiesc[pn][i]:zoom(0.8)
					gat_proxies[pn][i]:visible(true)
				end
			end
			
			local yspacing = 350
			local d = 0;
			for pn=1,2 do
				for i=0,2 do
					if pn == 2 then d = 1 end
					gat_proxies[pn][(i*3)+1]:x(-250*gat_width_ratio-500*gat_width_ratio+250*d*gat_width_ratio)
					gat_proxies[pn][(i*3)+1]:y(-yspacing*gat_height_ratio+yspacing*(i)*gat_height_ratio+(yspacing/2)*d*gat_height_ratio)
					gat_proxies[pn][(i*3)+2]:x(-250*gat_width_ratio+250*d*gat_width_ratio)
					gat_proxies[pn][(i*3)+2]:y(-yspacing*gat_height_ratio+yspacing*(i)*gat_height_ratio+(yspacing/2)*d*gat_height_ratio)
					gat_proxies[pn][(i*3)+3]:x(-250*gat_width_ratio+500*gat_width_ratio+250*d*gat_width_ratio)
					gat_proxies[pn][(i*3)+3]:y(-yspacing*gat_height_ratio+yspacing*(i)*gat_height_ratio+(yspacing/2)*d*gat_height_ratio)
				end
			end
		end,
      StopShitMessageCommand= function(self)
			gat_allproxies:visible(false)
			if P1 then P1:finishtweening() P1:x(SCREEN_CENTER_X-160*gat_width_ratio); P1:y(SCREEN_CENTER_Y); P1:visible(true) end
			if P2 then P2:finishtweening() P2:x(SCREEN_CENTER_X+160*gat_width_ratio); P2:y(SCREEN_CENTER_Y); P2:visible(true) end
		end,
    },
    Def.Quad{
      Name= "actor_eC",
      InitCommand= cmd(visible,false),
      OnCommand= function(self)
			gat_hds_done = 0
			gat_hds_dir = 1;
			gat_hds_ang = 0;
		end,
      SplitResetMessageCommand= function(self)
			local d = 1
			for pn = 1,2 do
				if pn==2 then d=-1 end
				local a = _G['P'..pn]
				if a then
					a:finishtweening();
					a:linear(120/205)
					a:x(SCREEN_CENTER_X-160*d*gat_width_ratio)--Scale position adn zoom. -Kid
					a:rotationx(360*d)
					a:addy(80*gat_height_ratio);
					a:zoomx(1.2*gat_height_ratio);
					a:zoomy(1.6*gat_height_ratio);
					a:sleep(0);
					a:rotationx(0);
					a:decelerate(60/205);
					a:addy(30*gat_height_ratio);
					a:zoomx(1.4*gat_height_ratio);
					a:zoomy(2.2*gat_height_ratio);
					a:spring(60/205);
					a:zoom(gat_height_ratio);
					a:y(SCREEN_CENTER_Y);
					a:rotationz(-40);
				end
			end
			gat_confuserx1:linear(120/205);
			gat_confuserx1:x(360);
			gat_confuserx1:sleep(0);
			gat_confuserx1:x(0);
			gat_confuserx2:linear(120/205);
			gat_confuserx2:x(-360);
			gat_confuserx2:sleep(0);
			gat_confuserx2:x(0);
		end,
    },
    --For all controller quads, Unconverted x & y pos. -Kid
    Def.Quad{
      Name= "actor_fC",
      InitCommand= function(self) self:visible(false); gat_wagger = self; end,
      TerrorBobMessageCommand= cmd(linear,240/190;x,64;linear,(7*240)/190;x,96;linear,480/190;x,0),
    },
    Def.Quad{
      Name= "actor_gC",
      InitCommand= function(self) self:visible(false); gat_updown = self; end,
      OnCommand= cmd(y,SCREEN_CENTER_Y + -239),
      RollingFadeDownMessageCommand= cmd(bounceend,60/175;y,1),
      RollingFadeUpMessageCommand= cmd(bounceend,60/175;y,-1),
    },
    Def.Quad{
      Name= "actor_hC",
      InitCommand= function(self) self:visible(false); gat_confuser = self; end,
      StartShit2MessageCommand= cmd(x,10000;decelerate,16*60/205;x,0),
    },
    Def.Quad{
      Name= "actor_iC",
      InitCommand= function(self) self:visible(false); gat_scroller = self; end,
      StartShit2MessageCommand= cmd(x,3;y,4.5),
    },
    Def.Quad{
      Name= "actor_jC",
      InitCommand= function(self) self:visible(false); gat_scroller2 = self; end,
    },
    Def.Quad{
      Name= "actor_kC",
      InitCommand= function(self) self:visible(false); gat_pradius = self; end,
      OnCommand= cmd(y,120;z,240),
    },
    Def.Quad{
      Name= "actor_lC",
      InitCommand= function(self) self:visible(false); gat_shame_alpha = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_mC",
      InitCommand= function(self) self:visible(false); gat_tpos = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_nC",
      InitCommand= function(self) self:visible(false); gat_shame_splitter = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_oC",
      InitCommand= function(self) self:visible(false); gat_shame_skewer = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_pC",
      InitCommand= function(self) self:visible(false); gat_shame_spindist = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_qC",
      InitCommand= function(self) self:visible(false); gat_prottilt1 = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_rC",
      InitCommand= function(self) self:visible(false); gat_prottilt2 = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_sC",
      InitCommand= function(self) self:visible(false); gat_aft_target2a = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_tC",
      InitCommand= function(self) self:visible(false); gat_aft_target3a = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_uC",
      InitCommand= function(self) self:visible(false); gat_aft_target2s = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_vC",
      InitCommand= function(self) self:visible(false); gat_aft_target3s = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_wC",
      InitCommand= function(self) self:visible(false); gat_aft_target2p = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_xC",
      InitCommand= function(self) self:visible(false); gat_aft_target3p = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_yC",
      InitCommand= function(self) self:visible(false); gat_aft_target2r = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_zC",
      InitCommand= function(self) self:visible(false); gat_aft_target3r = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_AC",
      InitCommand= function(self) self:visible(false); gat_mallet1 = self; end,
      OnCommand= cmd(x,1),
    },
    Def.Quad{
      Name= "actor_BC",
      InitCommand= function(self) self:visible(false); gat_mallet2 = self; end,
      OnCommand= cmd(x,1),
    },
    Def.Quad{
      Name= "actor_CC",
      InitCommand= function(self) self:visible(false); gat_deow = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_DC",
      InitCommand= function(self) self:visible(false); gat_tiny1 = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_EC",
      InitCommand= function(self) self:visible(false); gat_tiny2 = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_FC",
      InitCommand= function(self) self:visible(false); gat_vib1 = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_aD",
      InitCommand= function(self) self:visible(false); gat_vib2 = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_bD",
      InitCommand= function(self) self:visible(false); gat_bgvib = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_cD",
      InitCommand= function(self) self:visible(false); gat_tsvib = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_dD",
      InitCommand= function(self) self:visible(false); gat_zoomy1 = self; end,
      OnCommand= cmd(x,1),
    },
    Def.Quad{
      Name= "actor_eD",
      InitCommand= function(self) self:visible(false); gat_zoomy2 = self; end,
      OnCommand= cmd(x,1),
    },
    Def.Quad{
      Name= "actor_fD",
      InitCommand= function(self) self:visible(false); gat_zoomz = self; end,
      OnCommand= cmd(x,1),
    },
    Def.Quad{
      Name= "actor_gD",
      InitCommand= function(self) self:visible(false); gat_jud_bz = self; end,
      OnCommand= cmd(x,1),
    },
    Def.Quad{
      Name= "actor_hD",
      InitCommand= function(self) self:visible(false); gat_g_skewer_intro = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_iD",
      InitCommand= function(self) self:visible(false); gat_g_rot_intro = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_jD",
      InitCommand= function(self) self:visible(false); gat_g_skewer = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_kD",
      InitCommand= function(self) self:visible(false); gat_crossup = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_lD",
      InitCommand= function(self) self:visible(false); gat_splitdist = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_mD",
      InitCommand= function(self) self:visible(false); gat_splitdist2 = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_nD",
      InitCommand= function(self) self:visible(false); gat_splitdist3 = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_oD",
      InitCommand= function(self) self:visible(false); gat_splitrot = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_pD",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitrot2,self) end,
    },
    Def.Quad{
      Name= "actor_qD",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitrot2,self) end,
    },
    Def.Quad{
      Name= "actor_rD",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitrot2,self) end,
    },
    Def.Quad{
      Name= "actor_sD",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitrot2,self) end,
    },
    Def.Quad{
      Name= "actor_tD",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitrot2,self) end,
    },
    Def.Quad{
      Name= "actor_uD",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitrot2,self) end,
    },
    Def.Quad{
      Name= "actor_vD",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitrot2,self) end,
    },
    Def.Quad{
      Name= "actor_wD",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitrot2,self) end,
    },
    Def.Quad{
      Name= "actor_xD",
      InitCommand= function(self) self:visible(false); gat_splitzoom = self; end,
      OnCommand= cmd(x,1;y,1),
    },
    Def.Quad{
      Name= "actor_yD",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitvib,self) end,
    },
    Def.Quad{
      Name= "actor_zD",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitvib,self) end,
    },
    Def.Quad{
      Name= "actor_AD",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitvib,self) end,
    },
    Def.Quad{
      Name= "actor_BD",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitvib,self) end,
    },
    Def.Quad{
      Name= "actor_CD",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitvib,self) end,
    },
    Def.Quad{
      Name= "actor_DD",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitvib,self) end,
    },
    Def.Quad{
      Name= "actor_ED",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitvib,self) end,
    },
    Def.Quad{
      Name= "actor_FD",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitvib,self) end,
    },
    Def.Quad{
      Name= "actor_aE",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitposnew,self) end,
    },
    Def.Quad{
      Name= "actor_bE",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitposnew,self) end,
    },
    Def.Quad{
      Name= "actor_cE",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitposnew,self) end,
    },
    Def.Quad{
      Name= "actor_dE",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitposnew,self) end,
    },
    Def.Quad{
      Name= "actor_eE",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitposnew,self) end,
    },
    Def.Quad{
      Name= "actor_fE",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitposnew,self) end,
    },
    Def.Quad{
      Name= "actor_gE",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitposnew,self) end,
    },
    Def.Quad{
      Name= "actor_hE",
      OnCommand= cmd(visible,false),
      SetUpSMessageCommand= function(self) table.insert(gat_splitposnew,self) end,
    },
    Def.Quad{
      Name= "actor_iE",
      InitCommand= function(self) self:visible(false); gat_wowinvert = self; end,
      OnCommand= cmd(x,0;y,0),
    },
    Def.Quad{
      Name= "actor_jE",
      InitCommand= function(self) self:visible(false); gat_confuserx1 = self; end,
      OnCommand= cmd(x,0;y,0),
    },
    Def.Quad{
      Name= "actor_kE",
      InitCommand= function(self) self:visible(false); gat_confuserx2 = self; end,
      OnCommand= cmd(x,0;y,0),
    },
    Def.Quad{
      Name= "actor_lE",
      InitCommand= function(self) self:visible(false); gat_confuserx = self; end,
      OnCommand= cmd(x,0;y,0),
    },
    Def.Quad{
      Name= "actor_mE",
      InitCommand= function(self) self:visible(false); gat_screamvib = self; end,
      OnCommand= cmd(x,0;y,0),
    },
    Def.Quad{
      Name= "actor_nE",
      InitCommand= function(self) self:visible(false); gat_fig8 = self; end,
      OnCommand= cmd(x,0;y,0),
    },
    Def.Quad{
      Name= "actor_oE",
      InitCommand= function(self) self:visible(false); gat_shitproxy_rot1 = self; end,
      OnCommand= cmd(x,0;y,0),
    },
    Def.Quad{
      Name= "actor_pE",
      InitCommand= function(self) self:visible(false); gat_shitproxy_rot2 = self; end,
      OnCommand= cmd(x,0;y,0),
    },
    Def.Quad{
      Name= "actor_qE",
      InitCommand= function(self) self:visible(false); gat_shitprox_offset = self; end,
      OnCommand= cmd(x,0;y,0),
    },
    Def.Quad{
      Name= "actor_rE",
      InitCommand= function(self) self:visible(false); gat_test = self; end,
      OnCommand= cmd(x,0;y,0),
    },
    Def.Quad{
      Name= "actor_sE",
      InitCommand= function(self) self:visible(false); gat_distant = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_tE",
      InitCommand= function(self) self:visible(false); gat_aftvib = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_uE",
      InitCommand= function(self) self:visible(false); gat_aftzoom = self; end,
      OnCommand= cmd(x,1),
    },
    Def.Quad{
      Name= "actor_vE",
      InitCommand= function(self) self:visible(false); gat_aftx = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_wE",
      InitCommand= function(self) self:visible(false); gat_afty = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_xE",
      InitCommand= function(self) self:visible(false); gat_afty2 = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_yE",
      InitCommand= function(self) self:visible(false); gat_aftrz = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_zE",
      InitCommand= function(self) self:visible(false); gat_dpadrot = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_AE",
      InitCommand= function(self) self:visible(false); gat_dpadrot1 = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_BE",
      InitCommand= function(self) self:visible(false); gat_dpadrot2 = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_CE",
      InitCommand= function(self) self:visible(false); gat_dpadcenter = self; end,
      OnCommand= cmd(x,0),
    },
    Def.Quad{
      Name= "actor_DE",
      InitCommand= function(self) self:visible(false); gat_rotator = self; end,
      Rotator5Command= cmd(accelerate,60/205;addx,90;decelerate,180/205;addx,90;accelerate,60/205;addx,-90;decelerate,180/205;addx,-90;
	accelerate,60/205;addx,90;decelerate,180/205;addx,90;accelerate,60/205;addx,-90;decelerate,180/205;addx,-90;
	accelerate,60/205;addx,90;decelerate,180/205;addx,90;accelerate,60/205;addx,-90;decelerate,180/205;addx,-90;
	accelerate,60/205;addx,90;decelerate,180/205;addx,90;accelerate,60/205;addx,-90;decelerate,180/205;addx,-90;queuecommand,"Rotator6"),
      Rotator6Command= cmd(accelerate,60/205;addx,90;decelerate,180/205;addx,90;accelerate,60/205;addx,-90;decelerate,180/205;addx,-90;
	accelerate,60/205;addx,90;decelerate,180/205;addx,90;accelerate,60/205;addx,-90;decelerate,180/205;addx,-90;
	accelerate,60/205;addx,90;decelerate,180/205;addx,90;accelerate,60/205;addx,-90;decelerate,180/205;addx,-90;
	accelerate,60/205;addx,90;decelerate,180/205;addx,90;accelerate,60/205;addx,-90;decelerate,180/205;addx,-90;queuecommand,"RotatorCheck"),
      Rotator7Command= cmd(linear,240/205;addx,360;linear,240/205;addx,360;linear,240/205;addx,360;linear,240/205;addx,360;queuecommand,"Rotator8"),
      Rotator8Command= cmd(linear,240/205;addx,360;linear,240/205;addx,360;linear,240/205;addx,360;linear,240/205;addx,360;queuecommand,"Rotator5"),
      RotatorCheckCommand= function(self) if GAMESTATE:GetSongBeat() < 319 then self:queuecommand('Rotator5') end end,
      RotatorMessageCommand= cmd(queuecommand,"Rotator5"),
    },
    Def.Quad{
      Name= "actor_EE",
      CenterJoinFastMessageCommand= function(self)
		for pn=1,2 do
			local a = Plr(pn)
			if a then
				a:x(SCREEN_WIDTH/2);
				a:y(SCREEN_HEIGHT/2);
			end
		end
	end,
      Hide34MessageCommand= function(self)
		for pn=3,4 do
			local a = Proxy(pn)
			if a then
				a:visible(false);
			end
		end
	end,
      OnCommand= cmd(visible,false),
      ReReReShuffle8MessageCommand= function(self)
		--[[
		gat_splitdist2:decelerate(.9*60/175);
		gat_splitdist2:x(SCREEN_HEIGHT*-0.2);
		gat_splitdist3:sleep(.9*60/175);
		gat_splitdist3:decelerate(.9*60/175);
		gat_splitdist3:x(SCREEN_WIDTH*0.125);
		gat_splitdist2:sleep(.9*60/175);
		gat_splitdist2:decelerate(.9*60/175);
		gat_splitdist2:x(SCREEN_HEIGHT*0.2);
		]]
		
		gat_splitdist2:sleep(60/175);
		gat_splitdist2:decelerate(60/175);
		gat_splitdist2:x(SCREEN_HEIGHT*-0.2);
		
	end,
      ReReShuffle8MessageCommand= function(self)
		gat_splitdist3:decelerate(60/175);
		gat_splitdist3:x(SCREEN_WIDTH*-0.125);
		gat_splitdist2:sleep(60/175);
		gat_splitdist2:decelerate(60/175);
		gat_splitdist2:x(SCREEN_HEIGHT*0.2);
		gat_splitdist3:sleep(60/175);
		gat_splitdist3:decelerate(60/175);
		--gat_splitdist3:x(SCREEN_WIDTH*-0.125);
		
		for pn=1,2 do
			local d = 1; if pn == 2 then d = -1 end
			for i=pn,8,2 do
				gat_splitrot2[i]:sleep(120/175);
				gat_splitrot2[i]:decelerate(60/175);
				gat_splitrot2[i]:z(10*d)
			end
		end
		
	end,
      ReShuffle8MessageCommand= function(self)
		gat_splitdist3:decelerate(.9*60/175);
		--gat_splitdist3:x(SCREEN_WIDTH*-0.125);
		gat_splitdist2:sleep(.9*60/175);
		gat_splitdist2:decelerate(.9*60/175);
		gat_splitdist2:x(SCREEN_HEIGHT*0.2);
		gat_splitdist3:sleep(.9*60/175);
		gat_splitdist3:decelerate(.9*60/175);
		gat_splitdist3:x(SCREEN_WIDTH*-0.125);
		
		for pn=1,2 do
			local d = 1; if pn == 2 then d = -1 end
			for i=pn,8,2 do
				gat_splitrot2[i]:sleep(120/175);
				gat_splitrot2[i]:decelerate(60/175);
				gat_splitrot2[i]:z(10*d)
			end
		end
		
	end,
      Rejoin8MessageCommand= function(self)
		if GAMESTATE:GetSongBeat()<580 then
			MESSAGEMAN:Broadcast('TargOn');
		end
		gat_splitdist:decelerate(120/175);
		gat_splitdist:x(0);
		gat_splitdist2:decelerate(120/175);
		gat_splitdist2:x(0);
		gat_splitdist3:decelerate(120/175);
		gat_splitdist3:x(0);
		gat_splitzoom:decelerate(120/175);
		gat_splitzoom:y(1)
		gat_splitzoom:x(1.5)
		gat_splitzoom:decelerate(120/175);
		gat_splitzoom:x(1);
		gat_splitrot:accelerate(60/175);
		gat_splitrot:x(180);
		gat_splitrot:decelerate(60/175);
		gat_splitrot:x(360);
		gat_splitrot:sleep(0);
		gat_splitrot:queuemessage('Hide34');
		gat_splitrot:x(0);
		for pn=1,4 do
			local a = Proxy(pn)
			if a then
				a:visible(true);
			end
		end
	end,
      Shuffle8MessageCommand= function(self)
		gat_splitdist3:decelerate(60/175);
		gat_splitdist3:x(SCREEN_WIDTH*-0.125);
		gat_splitdist2:sleep(60/175);
		gat_splitdist2:decelerate(60/175);
		gat_splitdist2:x(SCREEN_HEIGHT*-0.2);
		gat_splitdist3:sleep(60/175);
		gat_splitdist3:decelerate(60/175);
		gat_splitdist3:x(SCREEN_WIDTH*0.125);
	end,
      Shuffle8QuickMessageCommand= function(self)
		gat_splitdist3:x(SCREEN_WIDTH*-0.125);
		gat_splitdist2:x(SCREEN_HEIGHT*-0.2);
		gat_splitdist3:x(SCREEN_WIDTH*0.125);
	end,
      Split8MessageCommand= function(self)
		if GAMESTATE:GetSongBeat()<580 then
			MESSAGEMAN:Broadcast('TargOff');
		end
		gat_splitdist:decelerate(60/175);
		gat_splitdist:x(SCREEN_WIDTH*0.25);
		gat_splitdist2:sleep(60/175);
		gat_splitdist2:decelerate(60/175);
		gat_splitdist2:x(SCREEN_HEIGHT*0.2);
		gat_splitdist3:sleep(120/175);
		gat_splitdist3:decelerate(60/175);
		gat_splitdist3:x(SCREEN_WIDTH*0.125);
		gat_splitzoom:decelerate(60/175);
		gat_splitzoom:x(0.85);
		gat_splitzoom:y(0.85-.1);
		gat_splitzoom:decelerate(60/175);
		gat_splitzoom:x(0.72);
		gat_splitzoom:y(0.72-.1);
		gat_splitzoom:decelerate(60/175);
		gat_splitzoom:x(0.6);
		gat_splitzoom:y(0.6-.1);
		for pn=1,4 do
			local a = Proxy(pn)
			if a then
				a:visible(true);
			end
		end
	end,
      Split8QuickMessageCommand= function(self)
		if GAMESTATE:GetSongBeat()<580 then
			MESSAGEMAN:Broadcast('TargOff');
		end
		gat_splitdist:x(SCREEN_WIDTH*0.25);
		gat_splitdist2:x(SCREEN_HEIGHT*0.2);
		gat_splitdist3:x(SCREEN_WIDTH*0.125);
		gat_splitzoom:x(0.6);
		gat_splitzoom:y(0.6-.1);
		for pn=1,4 do
			local a = Proxy(pn)
			if a then
				a:visible(true);
			end
		end
	end,
    },
    Def.Quad{
      Name= "actor_FE",
      OnCommand= cmd(visible,false),
      OneRotMessageCommand= function(self)
		gat_onerot();
	end,
      SlamDown1MessageCommand= function(self)
		for pn=2,8,2 do
			local a = gat_splitvib[pn]
			if a then
				a:finishtweening();
				a:linear(0.1);
				a:y(gat_slamdist);
				a:linear(60/175);
				a:y(0);
			end
			local b = gat_splitposnew[pn]
			if b then
				b:finishtweening();
				b:linear(0.1);
				b:y(gat_slamdist/2);
				b:linear(60/175);
				b:y(0);
			end
		end
	end,
      SlamDown2MessageCommand= function(self)
		for pn=1,8,2 do
			local a = gat_splitvib[pn]
			if a then
				a:finishtweening();
				a:linear(0.1);
				a:y(gat_slamdist);
				a:linear(60/175);
				a:y(0);
			end
			local b = gat_splitposnew[pn]
			if b then
				b:finishtweening();
				b:linear(0.1);
				b:y(gat_slamdist/2);
				b:linear(60/175);
				b:y(0);
			end
		end
	end,
      SlamLeft1MessageCommand= function(self)
		for pn=2,8,2 do
			local a = gat_splitvib[pn]
			if a then
				a:finishtweening();
				a:linear(0.1);
				a:x(gat_slamdist);
				a:linear(60/175);
				a:x(0);
			end
			local b = gat_splitposnew[pn]
			if b then
				b:finishtweening();
				b:linear(0.1);
				b:x(-gat_slamdist/2);
				b:linear(60/175);
				b:x(0);
			end
		end
	end,
      SlamLeft2MessageCommand= function(self)
		for pn=1,8,2 do
			local a = gat_splitvib[pn]
			if a then
				a:finishtweening();
				a:linear(0.1);
				a:x(gat_slamdist);
				a:linear(60/175);
				a:x(0);
			end
			local b = gat_splitposnew[pn]
			if b then
				b:finishtweening();
				b:linear(0.1);
				b:x(-gat_slamdist/2);
				b:linear(60/175);
				b:x(0);
			end
		end
	end,
      SlamRight1MessageCommand= function(self)
		for pn=2,8,2 do
			local a = gat_splitvib[pn]
			if a then
				a:finishtweening();
				a:linear(0.1);
				a:x(gat_slamdist);
				a:linear(60/175);
				a:x(0);
			end
			local b = gat_splitposnew[pn]
			if b then
				b:finishtweening();
				b:linear(0.1);
				b:x(gat_slamdist/2);
				b:linear(60/175);
				b:x(0);
			end
		end
	end,
      SlamRight2MessageCommand= function(self)
		for pn=1,8,2 do
			local a = gat_splitvib[pn]
			if a then
				a:finishtweening();
				a:linear(0.1);
				a:x(gat_slamdist);
				a:linear(60/175);
				a:x(0);
			end
			local b = gat_splitposnew[pn]
			if b then
				b:finishtweening();
				b:linear(0.1);
				b:x(gat_slamdist/2);
				b:linear(60/175);
				b:x(0);
			end
		end
	end,
      SlamUp1MessageCommand= function(self)
		for pn=2,8,2 do
			local a = gat_splitvib[pn]
			if a then
				a:finishtweening();
				a:linear(0.1);
				a:y(gat_slamdist);
				a:linear(60/175);
				a:y(0);
			end
			local b = gat_splitposnew[pn]
			if b then
				b:finishtweening();
				b:linear(0.1);
				b:y(-gat_slamdist/2);
				b:linear(60/175);
				b:y(0);
			end
		end
	end,
      SlamUp2MessageCommand= function(self)
		for pn=1,8,2 do
			local a = gat_splitvib[pn]
			if a then
				a:finishtweening();
				a:linear(0.1);
				a:y(gat_slamdist);
				a:linear(60/175);
				a:y(0);
			end
			local b = gat_splitposnew[pn]
			if b then
				b:finishtweening();
				b:linear(0.1);
				b:y(-gat_slamdist/2);
				b:linear(60/175);
				b:y(0);
			end
		end
	end,
      TossMessageCommand= function(self)
		gat_toss_a_dude();
	end,
    },
    Def.Quad{
      Name= "actor_aF",
      OnCommand= cmd(zoomto,128*0.6,240*0.6;diffuse,color('1,0,0,.0')),
      SetUpSMessageCommand= function(self) table.insert(gat_toss,{actor = self, xspd = 0, yspd = 0, zspd = 0, rmult = 0}) end,
    },
    Def.Quad{
      Name= "actor_bF",
      OnCommand= cmd(zoomto,128*0.6,240*0.6;diffuse,color('1,0,0,.0')),
      SetUpSMessageCommand= function(self) table.insert(gat_toss,{actor = self, xspd = 0, yspd = 0, zspd = 0, rmult = 0}) end,
    },
    Def.Quad{
      Name= "actor_cF",
      OnCommand= cmd(zoomto,128*0.6,240*0.6;diffuse,color('1,0,0,.0')),
      SetUpSMessageCommand= function(self) table.insert(gat_toss,{actor = self, xspd = 0, yspd = 0, zspd = 0, rmult = 0}) end,
    },
    Def.Quad{
      Name= "actor_dF",
      OnCommand= cmd(zoomto,128*0.6,240*0.6;diffuse,color('1,0,0,.0')),
      SetUpSMessageCommand= function(self) table.insert(gat_toss,{actor = self, xspd = 0, yspd = 0, zspd = 0, rmult = 0}) end,
    },
    Def.ActorFrame{
      Name= "actor_eF",
      InitCommand= function(self) P1p = self; self:AddWrapperState() end,
      OnCommand= cmd(fov,45;visible,false),
      Def.ActorProxy{
        Name= "actor_fF",
        GetProxyMessageCommand= function(self) if P1 then self:SetTarget(P1:GetChild('NoteField')) end end,
      },
    },
    Def.ActorFrame{
      Name= "actor_gF",
      InitCommand= function(self) P2p = self; self:AddWrapperState() end,
      OnCommand= cmd(fov,45;visible,false),
      Def.ActorProxy{
        Name= "actor_hF",
        GetProxyMessageCommand= function(self) if P2 then self:SetTarget(P2:GetChild('NoteField')) end end,
      },
    },
    Def.ActorFrame{
      Name= "actor_iF",
      InitCommand= function(self) P3p = self; self:AddWrapperState() end,
      OnCommand= cmd(fov,45;visible,false),
      Def.ActorProxy{
        Name= "actor_jF",
        GetProxyMessageCommand= function(self) if P1 then self:SetTarget(P1:GetChild('NoteField')) end end,
      },
    },
    Def.ActorFrame{
      Name= "actor_kF",
      InitCommand= function(self) P4p = self; self:AddWrapperState() end,
      OnCommand= cmd(fov,45;visible,false),
      Def.ActorProxy{
        Name= "actor_lF",
        GetProxyMessageCommand= function(self) if P2 then self:SetTarget(P2:GetChild('NoteField')) end end,
      },
    },
    Def.ActorFrame{
      Name= "actor_mF",
      InitCommand= function(self) P5p = self; self:AddWrapperState() end,
      OnCommand= cmd(fov,45;visible,false),
      Def.ActorProxy{
        Name= "actor_nF",
        GetProxyMessageCommand= function(self) if P1 then self:SetTarget(P1:GetChild('NoteField')) end end,
      },
    },
    Def.ActorFrame{
      Name= "actor_oF",
      InitCommand= function(self) P6p = self; self:AddWrapperState() end,
      OnCommand= cmd(fov,45;visible,false),
      Def.ActorProxy{
        Name= "actor_pF",
        GetProxyMessageCommand= function(self) if P2 then self:SetTarget(P2:GetChild('NoteField')) end end,
      },
    },
  Def.Quad{
    Name= "LETTERBOXQUADL",
    WhiteFlashMessageCommand= cmd(visible,true),--It's needed for the section. -Kid
    OnCommand= cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;horizalign,right;x,SCREEN_CENTER_X-320*gat_height_ratio;y,SCREEN_CENTER_Y;diffuse,color('0,0,0,1');visible,false;faderight,0.05),
  },
  Def.Quad{
    Name= "LETTERBOXQUADR",
    WhiteFlashMessageCommand= cmd(visible,true),
    OnCommand= cmd(zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;horizalign,left;x,SCREEN_CENTER_X+320*gat_height_ratio;y,SCREEN_CENTER_Y;diffuse,color('0,0,0,1');visible,false;fadeleft,0.05),
  },
    --For the jud+com proxies, I scaled their zooms, too. -Kid
    Def.ActorFrame{
      Name= "actor_qF",
      InitCommand= function(self) judc = self end,
      Def.ActorProxy{
        Name= "actor_rF",
        GetProxyMessageCommand= function(self) if P1 then self:SetTarget(P1:GetChild('Judgment')):zoom(gat_height_ratio) end end,
        InitCommand= function(self) jud1p = self end,
      },
      Def.ActorProxy{
        Name= "actor_sF",
        GetProxyMessageCommand= function(self) if P2 then self:SetTarget(P2:GetChild('Judgment')):zoom(gat_height_ratio) end end,
        InitCommand= function(self) jud2p = self end,
      },
    },
    Def.ActorFrame{
      Name= "actor_tF",
      InitCommand= function(self) comc = self end,
      Def.ActorProxy{
        Name= "actor_uF",
        GetProxyMessageCommand= function(self) if P1 then self:SetTarget(P1:GetChild('Combo')):zoom(gat_height_ratio) end end,
        InitCommand= function(self) com1p = self end,
      },
      Def.ActorProxy{
        Name= "actor_vF",
        GetProxyMessageCommand= function(self) if P2 then self:SetTarget(P2:GetChild('Combo')):zoom(gat_height_ratio) end end,
        InitCommand= function(self) com2p = self end,
      },
    },
    Def.Quad{
      Name= "actor_wF",--Fixed position and scaled y zoom. -Kid
      OnCommand= cmd(diffuse,color('1,0,0,0');x,SCREEN_CENTER_X;y,112*(SCREEN_HEIGHT/480);zoomto,SCREEN_WIDTH,4*gat_height_ratio;blend,"BlendMode_Add"),
      TargOffFastMessageCommand= cmd(diffusealpha,0),
      TargOffMessageCommand= cmd(linear,0.5;diffusealpha,0),
      TargOnFastMessageCommand= cmd(diffusealpha,1),
      TargOnMessageCommand= cmd(linear,0.5;diffusealpha,1),
    },
    Def.Quad{
      Name= "actor_xF",--Fixed position and scaled y zoom. -Kid
      OnCommand= cmd(diffuse,color('1,0,0,0');x,SCREEN_CENTER_X;y,112*(SCREEN_HEIGHT/480);zoomto,SCREEN_WIDTH,4*gat_height_ratio;blend,"BlendMode_Add"),
      TargOffTopFastMessageCommand= cmd(diffusealpha,0),
      TargOffTopMessageCommand= cmd(linear,0.5;diffusealpha,0),
      TargOnTopFastMessageCommand= cmd(diffusealpha,1),
      TargOnTopMessageCommand= cmd(linear,0.5;diffusealpha,1),
    },
    Def.Quad{
      Name= "actor_yF",--Fixed position and scaled y zoom. -Kid
      OnCommand= cmd(diffuse,color('1,0,0,0');x,SCREEN_CENTER_X;y,384*(SCREEN_HEIGHT/480);zoomto,SCREEN_WIDTH,4*gat_height_ratio;blend,"BlendMode_Add"),
      TargOffFastMessageCommand= cmd(diffusealpha,0),
      TargOffMessageCommand= cmd(linear,0.5;diffusealpha,0),
      TargOnFastMessageCommand= cmd(diffusealpha,1),
      TargOnMessageCommand= cmd(linear,0.5;diffusealpha,1),
    },
    Def.Quad{
      Name= "actor_zF",
      OnCommand= cmd(visible,false),
      ResetScoresMessageCommand= function(self)
			for pn=1,2 do
				for i=1,6 do--Reset the scores better. -Kid
					gat_judgecount[pn][i] = 0;
				end
			end
		end,
      JudgmentMessageCommand= function(self, params)--I put it together with reference from TaroNuke's Louder Louder file. -Kid
		--W1 is fantastic while W6 is miss. -Kid
		for i=1,2 do
			if params.Player == 'PlayerNumber_P'..i and perframe(851.5,895.5) then
				if params.TapNoteScore == 'TapNoteScore_W1' then
					gat_judgecount[i][1] = gat_judgecount[i][1]+1
				elseif params.TapNoteScore == 'TapNoteScore_W2' then
					gat_judgecount[i][2] = gat_judgecount[i][2]+1
				elseif params.TapNoteScore == 'TapNoteScore_W3' then
					gat_judgecount[i][3] = gat_judgecount[i][3]+1
				elseif params.TapNoteScore == 'TapNoteScore_W4' then
					gat_judgecount[i][4] = gat_judgecount[i][4]+1
				elseif params.TapNoteScore == 'TapNoteScore_W5' then
					gat_judgecount[i][5] = gat_judgecount[i][5]+1
				elseif params.TapNoteScore == 'TapNoteScore_Miss' then
					gat_judgecount[i][6] = gat_judgecount[i][6]+1
				end
				MESSAGEMAN:Broadcast('UpdateScoresP'..i)
			end
		end
    end,
    },
    optional_actor(cond_vA_result,
    Def.ActorFrame{
      Name= "actor_AF",
      HideScores2MessageCommand= cmd(visible,false),--Added a zoom. -Kid
      OnCommand= cmd(x,SCREEN_WIDTH*0.25;y,SCREEN_HEIGHT*0.5;zoom,gat_height_ratio;visible,false),
      ShowScoresMessageCommand= cmd(visible,true;playcommand,"DidWin"),
      --For all text, Fixed y pos. -Kid
      Def.BitmapText{
        Name= "actor_BF",
        DidWinCommand= function(self)
			if gat_judgecount[1][1] > gat_judgecount[2][1] then
				self:settext('win (+5%)')
				uksrt_p1bonus = 5;
			end
		end,
        Font= "_eurostile normal",
        OnCommand= cmd(diffuse,color('1,1,1,0.5');y,-22+(18*-2);zoom,.8;shadowlength,0),
        Text= "",
      },
      Def.BitmapText{
        Name= "actor_CF",
        Font= "_eurostile normal",
        HideScoresMessageCommand= cmd(linear,0.3;diffusealpha,0),
        OnCommand= cmd(diffuse,color('0.5,1,1,1');y,-22+(18*0);zoom,1;shadowlength,0),
        Text= "0",
        UpdateScoresP1MessageCommand= function(self) self:settext(gat_judgecount[1][1]) end,
      },
      Def.BitmapText{
        Name= "actor_DF",
        Font= "_eurostile normal",
        HideScoresMessageCommand= cmd(linear,0.3;diffusealpha,-.5),
        OnCommand= cmd(diffuse,color('1,.8,0,.5');y,-18+(18*1);zoom,0.8;shadowlength,0),
        Text= "0",
        UpdateScoresP1MessageCommand= function(self) self:settext(gat_judgecount[1][2]) end,
      },
      Def.BitmapText{
        Name= "actor_EF",
        Font= "_eurostile normal",
        HideScoresMessageCommand= cmd(linear,0.3;diffusealpha,-.5),
        OnCommand= cmd(diffuse,color('0,1,0,.5');y,-18+(18*2);zoom,0.8;shadowlength,0),
        Text= "0",
        UpdateScoresP1MessageCommand= function(self) self:settext(gat_judgecount[1][3]) end,
      },
      Def.BitmapText{
        Name= "actor_FF",
        Font= "_eurostile normal",
        HideScoresMessageCommand= cmd(linear,0.3;diffusealpha,-.5),
        OnCommand= cmd(diffuse,color('0.5,0,1,.5');y,-18+(18*3);zoom,0.8;shadowlength,0),
        Text= "0",
        UpdateScoresP1MessageCommand= function(self) self:settext(gat_judgecount[1][4]) end,
      },
      Def.BitmapText{
        Name= "actor_aab",
        Font= "_eurostile normal",
        HideScoresMessageCommand= cmd(linear,0.3;diffusealpha,-.5),
        OnCommand= cmd(diffuse,color('1,0.5,0,.5');y,-18+(18*4);zoom,0.8;shadowlength,0),
        Text= "0",
        UpdateScoresP1MessageCommand= function(self) self:settext(gat_judgecount[1][5]) end,
      },
      Def.BitmapText{
        Name= "actor_bab",
        Font= "_eurostile normal",
        HideScoresMessageCommand= cmd(linear,0.3;diffusealpha,-.5),
        OnCommand= cmd(diffuse,color('1,0,0,.5');y,-18+(18*5);zoom,0.8;shadowlength,0),
        Text= "0",
        UpdateScoresP1MessageCommand= function(self) self:settext(gat_judgecount[1][6]) end,
      },
    }),
    optional_actor(cond_wA_result,
    Def.ActorFrame{
      Name= "actor_cab",
      HideScores2MessageCommand= cmd(visible,false),--Added a zoom. -Kid
      OnCommand= cmd(x,SCREEN_WIDTH*0.75;y,SCREEN_HEIGHT*0.5;zoom,gat_height_ratio;visible,false),
      ShowScoresMessageCommand= cmd(visible,true;playcommand,"DidWin"),
      --For all text, Fixed y pos. -Kid
      Def.BitmapText{
        Name= "actor_dab",
        DidWinCommand= function(self)
			if gat_judgecount[1][1] < gat_judgecount[2][1] then
				self:settext('win (+5%)')
				uksrt_p2bonus = 5;
			end
		end,
        Font= "_eurostile normal",
        OnCommand= cmd(diffuse,color('1,1,1,0.5');y,-22+(18*-2);zoom,.8;shadowlength,0),
        Text= "",
      },
      Def.BitmapText{
        Name= "actor_eab",
        Font= "_eurostile normal",
        HideScoresMessageCommand= cmd(linear,0.3;diffusealpha,0),
        OnCommand= cmd(diffuse,color('0.5,1,1,1');y,-22+(18*0);zoom,1;shadowlength,0),
        Text= "0",
        UpdateScoresP2MessageCommand= function(self) self:settext(gat_judgecount[2][1]) end,
      },
      Def.BitmapText{
        Name= "actor_fab",
        Font= "_eurostile normal",
        HideScoresMessageCommand= cmd(linear,0.3;diffusealpha,-.5),
        OnCommand= cmd(diffuse,color('1,.8,0,.5');y,-18+(18*1);zoom,0.8;shadowlength,0),
        Text= "0",
        UpdateScoresP2MessageCommand= function(self) self:settext(gat_judgecount[2][2]) end,
      },
      Def.BitmapText{
        Name= "actor_gab",
        Font= "_eurostile normal",
        HideScoresMessageCommand= cmd(linear,0.3;diffusealpha,-.5),
        OnCommand= cmd(diffuse,color('0,1,0,.5');y,-18+(18*2);zoom,0.8;shadowlength,0),
        Text= "0",
        UpdateScoresP2MessageCommand= function(self) self:settext(gat_judgecount[2][3]) end,
      },
      Def.BitmapText{
        Name= "actor_hab",
        Font= "_eurostile normal",
        HideScoresMessageCommand= cmd(linear,0.3;diffusealpha,-.5),
        OnCommand= cmd(diffuse,color('0.5,0,1,.5');y,-18+(18*3);zoom,0.8;shadowlength,0),
        Text= "0",
        UpdateScoresP2MessageCommand= function(self) self:settext(gat_judgecount[2][4]) end,
      },
      Def.BitmapText{
        Name= "actor_iab",
        Font= "_eurostile normal",
        HideScoresMessageCommand= cmd(linear,0.3;diffusealpha,-.5),
        OnCommand= cmd(diffuse,color('1,0.5,0,.5');y,-18+(18*4);zoom,0.8;shadowlength,0),
        Text= "0",
        UpdateScoresP2MessageCommand= function(self) self:settext(gat_judgecount[2][5]) end,
      },
      Def.BitmapText{
        Name= "actor_jab",
        Font= "_eurostile normal",
        HideScoresMessageCommand= cmd(linear,0.3;diffusealpha,-.5),
        OnCommand= cmd(diffuse,color('1,0,0,.5');y,-18+(18*5);zoom,0.8;shadowlength,0),
        Text= "0",
        UpdateScoresP2MessageCommand= function(self) self:settext(gat_judgecount[2][6]) end,
      },
    }),
    Def.Quad{
      Name= "actor_kab",
      InitCommand= function(self) self:visible(false) gat_terrorfuck_0 = self end,
    },
    Def.Quad{
      Name= "actor_lab",
      InitCommand= function(self) self:visible(false) gat_terrorfuck_1 = self end,
    },
    Def.Quad{
      Name= "actor_mab",
      InitCommand= function(self) self:visible(false) gat_terrorfuck_2 = self end,
    },
    Def.Quad{
      Name= "actor_nab",
      InitCommand= function(self) self:visible(false) gat_terrorfuck_3 = self end,
    },
    Def.Quad{
      Name= "actor_oab",
      InitCommand= function(self) self:visible(false); self:basezoomx(256); self:basezoomy(384); gat_pos1 = self; end,
    },
    Def.Quad{
      Name= "actor_pab",
      InitCommand= function(self) self:visible(false); self:basezoomx(256); self:basezoomy(384); gat_pos2 = self; end,
    },
    Def.Quad{
      Name= "actor_qab",
      InitCommand= function(self) self:visible(false); self:basezoomx(256); self:basezoomy(384); gat_pos3 = self; end,
    },
    Def.Quad{
      Name= "actor_rab",
      InitCommand= function(self) self:visible(false); self:basezoomx(256); self:basezoomy(384); gat_pos4 = self; end,
    },
    Def.Quad{
      Name= "actor_sab",
      InitCommand= cmd(visible,false),
      SetupEndingMessageCommand= function(self)
			for i=1,4 do
				_G['gat_pos'..i]:visible(true);
				_G['gat_pos'..i]:zoom(0.7*gat_height_ratio);--Can scale zoom and y pos here. -Kid
				_G['gat_pos'..i]:diffusealpha(0);
				_G['gat_pos'..i]:x(SCREEN_CENTER_X-480*gat_height_ratio+(240*i*gat_height_ratio));
				_G['gat_pos'..i]:y(250*gat_height_ratio);
			end
			for pn=1,4 do
				local a = Proxy(pn)
				if a then
					a:zoom(0.75*gat_height_ratio);--Scale zoom. -Kid
					a:zoom(0.75*gat_height_ratio);
					a:visible(true);--'Convert' position and scale. -Kid
					a:x(_G['gat_pos'..pn]:GetX())
					a:y(sh/2)
					a:rotationz(0);
				end
			end
		end,
    },
    LoadActor('fuck.lua') .. {
      Name= "actor_tab",
      File= "fuck.lua",
    },
    Def.Sprite{
      Name= "actor_uab",
      HideAFTMessageCommand= cmd(visible,false),
      InitCommand= cmd(zoom,1;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;visible,false),
      OnCommand= function(self)
		
			--self:basezoomx((SCREEN_WIDTH/DISPLAY:GetDisplayWidth()));
			--self:basezoomy(-1*(SCREEN_WIDTH/DISPLAY:GetDisplayWidth()))
			--Instead of doing basezoom, we do customtexturerect instead. -Kid
		
			self:SetTexture(gat_aft:GetTexture());
			--This makes it so the aft fills the whole screen regardless of internal resolution OR screen ratio! -Kid
			self:customtexturerect(0,0,gat_aft_width_ratio,gat_aft_height_ratio)
			
			self:diffusealpha(0);
			
			gat_aft_target2 = self;--We'll use this. -Kid
			--gat_aft_target2wrap = self:AddWrapperState():x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y)
			
		end,
      ShowAFTMessageCommand= cmd(visible,true),
      Texture= "white",
    },
    Def.Sprite{
      Name= "actor_vab",
      HideAFTMessageCommand= cmd(visible,false),
      InitCommand= cmd(zoom,1;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;visible,false),
      OnCommand= function(self)
		
			--self:basezoomx((SCREEN_WIDTH/DISPLAY:GetDisplayWidth()));
			--self:basezoomy(-1*(SCREEN_WIDTH/DISPLAY:GetDisplayWidth()))
		
			self:SetTexture(gat_aft:GetTexture());
			--This makes it so the aft fills the whole screen regardless of internal resolution OR screen ratio! -Kid
			self:customtexturerect(0,0,gat_aft_width_ratio,gat_aft_height_ratio)
			
			self:diffusealpha(0);
			
			gat_aft_target3 = self;--We'll use this. -Kid
			--gat_aft_target3wrap = self:AddWrapperState():x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y)
			
		end,
      ShowAFTMessageCommand= cmd(visible,true),
      Texture= "white",
    },
    --To Recreate how nITG does AFTS, we need our own AFT. I'll call it screen_aft. -Kid
    Def.ActorFrameTexture{
      Name= "actor_wab",
      InitCommand= function(self)
			
			self:SetTextureName( 'gat_screen_aft' )
			self:SetWidth( SCREEN_WIDTH );
			self:SetHeight( SCREEN_HEIGHT );
			self:EnableDepthBuffer( true );
			self:EnableAlphaBuffer( true );
			self:EnableFloat( false );
			self:EnablePreserveTexture( false );
			
			self:visible(true);
			
			self:Create();
			
			screen_aft = self;
		end,
	--The beauty of this is that I can pick and choose what to put into the AFT. No need to proxy everything -Kid
	Def.Quad{
	    Name= "BGQUAD",--If we remove this quad, we get a 'motion blur'-type effect with our AFTs (noticable at beat 128). -Kid
	    OnCommand= cmd(Center;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;diffuse,0,0,0,1),
	},
	Def.ActorProxy{
	    Name= "BG",
	    ProxyThisMessageCommand= function(self)
		gat_all_bg_prox = self;
		if gat_all_bg then
		    self:SetTarget(gat_all_bg)
		    self:visible(true):x(-SCREEN_CENTER_X):y(-SCREEN_CENTER_Y)
		    self:AddWrapperState():x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y)
		end
	    end,
	},--Why yes, I can get away with this. -Kid
	Def.ActorFrame{
	    Name= "actor_CA",
	    InitCommand= function(self) self:visible(false) gat_allproxies = self; end,
	    OnCommand= cmd(x,SCREEN_WIDTH/2;y,SCREEN_HEIGHT/2),
	    Def.ActorFrame{
		Name= "actor_DA",
		InitCommand= function(self) gat_allproxiesc = self; end,
		OnCommand= cmd(x,-SCREEN_WIDTH/2;y,-SCREEN_HEIGHT/2),
		Def.ActorFrame{
		    Name= "actor_EA",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[1],self); end,
		    Def.ActorProxy{
			Name= "actor_FA",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[1],self);
				if SCREENMAN:GetTopScreen():GetChild('PlayerP1') then self:SetTarget(P1); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_aB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[1],self); end,
		    Def.ActorProxy{
			Name= "actor_bB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[1],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP1') then self:SetTarget(P1); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_cB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[1],self); end,
		    Def.ActorProxy{
			Name= "actor_dB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[1],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP1') then self:SetTarget(P1); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_eB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[1],self); end,
		    Def.ActorProxy{
			Name= "actor_fB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[1],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP1') then self:SetTarget(P1); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_gB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[1],self); end,
		    Def.ActorProxy{
			Name= "actor_hB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[1],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP1') then self:SetTarget(P1); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_iB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[1],self); end,
		    Def.ActorProxy{
			Name= "actor_jB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[1],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP1') then self:SetTarget(P1); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_kB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[1],self); end,
		    Def.ActorProxy{
			Name= "actor_lB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[1],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP1') then self:SetTarget(P1); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_mB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[1],self); end,
		    Def.ActorProxy{
			Name= "actor_nB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[1],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP1') then self:SetTarget(P1); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_oB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[1],self); end,
		    Def.ActorProxy{
			Name= "actor_pB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[1],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP1') then self:SetTarget(P1); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_qB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[2],self); end,
		    Def.ActorProxy{
			Name= "actor_rB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[2],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP2') then self:SetTarget(P2); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_sB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[2],self); end,
		    Def.ActorProxy{
			Name= "actor_tB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[2],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP2') then self:SetTarget(P2); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_uB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[2],self); end,
		    Def.ActorProxy{
			Name= "actor_vB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[2],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP2') then self:SetTarget(P2); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_wB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[2],self); end,
		    Def.ActorProxy{
			Name= "actor_xB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[2],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP2') then self:SetTarget(P2); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_yB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[2],self); end,
		    Def.ActorProxy{
			Name= "actor_zB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[2],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP2') then self:SetTarget(P2); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_AB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[2],self); end,
		    Def.ActorProxy{
			Name= "actor_BB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[2],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP2') then self:SetTarget(P2); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_CB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[2],self); end,
		    Def.ActorProxy{
			Name= "actor_DB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[2],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP2') then self:SetTarget(P2); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_EB",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[2],self); end,
		    Def.ActorProxy{
			Name= "actor_FB",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[2],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP2') then self:SetTarget(P2); end end,
			OnCommand= cmd(),
		    },
		},
		Def.ActorFrame{
		    Name= "actor_aC",
		    OnCommand= function(self) self:visible(false) table.insert(gat_proxies[2],self); end,
		    Def.ActorProxy{
			Name= "actor_bC",
			MakeProxy1MessageCommand= function(self) table.insert(gat_proxiesc[2],self);
				    if SCREENMAN:GetTopScreen():GetChild('PlayerP2') then self:SetTarget(P2); end end,
			OnCommand= cmd(),
		    },
		},
	    },
	},
	Def.ActorProxy{
	    Name= "P1P",
	    ProxyThisMessageCommand= function(self)
		proxP1p = self;
		if P1p then
		    self:SetTarget(P1p)
		    self:visible(false)
		end
	    end,
	},
	Def.ActorProxy{
	    Name= "P2P",
	    ProxyThisMessageCommand= function(self)
		proxP2p = self;
		if P2p then
		    self:SetTarget(P2p)
		    self:visible(false)
		end
	    end,
	},
	Def.ActorProxy{
	    Name= "JUDC",
	    ProxyThisMessageCommand= function(self)
		judprox = self;
		if judc then
		    self:SetTarget(judc)
		    self:visible(false)
		end
	    end,
	    SetupFUCKMessageCommand= function(self)
		self:visible(true)
	    end,
	},
	Def.ActorProxy{
	    Name= "COMC",
	    ProxyThisMessageCommand= function(self)
		comprox = self;
		if comc then
		    self:SetTarget(comc)
		    self:visible(false)
		end
	    end,
	    SetupFUCKMessageCommand= function(self)
		self:visible(true)
	    end,
	},
	Def.ActorProxy{
	    Name= "FUCK-LUA",
	    ProxyThisMessageCommand= function(self)
		judprox1 = self;
		if fuck_c then
		    self:SetTarget(fuck_c)
		    self:visible(false)
		end
	    end,
	    SetupFUCKMessageCommand= function(self)
		self:visible(true)
	    end,
	},
	Def.ActorProxy{
	    Name= "AFT_TARGET2",
	    ProxyThisMessageCommand= function(self)
		gat_aft_target2prox = self;
		if gat_aft_target2 then
		    self:SetTarget(gat_aft_target2):x(-SCREEN_CENTER_X):y(-SCREEN_CENTER_Y)
		    self:visible(false)
		    gat_aft_target2proxwrap = self:AddWrapperState():x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y)
		end
	    end,
	    ShowAFTMessageCommand= cmd(visible,true),
	    HideAFTMessageCommand= cmd(visible,false),
	},
	Def.ActorProxy{
	    Name= "AFT_TARGET3",
	    ProxyThisMessageCommand= function(self)
		gat_aft_target3prox = self;
		if gat_aft_target3 then
		    self:SetTarget(gat_aft_target3):x(-SCREEN_CENTER_X):y(-SCREEN_CENTER_Y)
		    self:visible(false)
		    gat_aft_target3proxwrap = self:AddWrapperState():x(SCREEN_CENTER_X):y(SCREEN_CENTER_Y)
		end
	    end,
	    ShowAFTMessageCommand= cmd(visible,true),
	    HideAFTMessageCommand= cmd(visible,false),
	},
    },
    Def.ActorFrameTexture{
      Name= "actor_wab",
      InitCommand= function(self)
			
			self:SetTextureName( 'gat_aft' )
			self:SetWidth( SCREEN_WIDTH );
			self:SetHeight( SCREEN_HEIGHT );
			self:EnableDepthBuffer( true );--Because why not. -Kid
			self:EnableAlphaBuffer( true );
			self:EnableFloat( false );
			self:EnablePreserveTexture( true );
			
			self:visible(true);
			
			self:Create();
			
			gat_aft = self;
			
			--By the very nature of the AFT, we need to make ratios for any sprites that wish to use this aft. -Kid
			gat_aft_height_ratio = SCREEN_HEIGHT / gat_aft:GetTexture():GetTextureHeight()
			gat_aft_width_ratio =  SCREEN_WIDTH / gat_aft:GetTexture():GetTextureWidth()
		end,
	Def.Sprite{
		Name= "aft_self1",
		ProxyThisMessageCommand= function(self)
			self:SetTexture(screen_aft:GetTexture()):Center()
		end,
	},
    },
    Def.ActorFrameTexture{
      Name= "actor_xab",--Enclose queuemessage argument. -Kid
      DelayFrame2RMessageCommand= cmd(finishtweening;queuemessage,'DelayFrame2';visible,true;sleep,0.06;queuecommand,"Hide"),
      DelayFrameMessageCommand= cmd(finishtweening;visible,true;sleep,0.02;queuecommand,"Hide"),
      HideCommand= cmd(visible,false),
      InitCommand= function(self)
			
			self:SetTextureName( 'gat_aft2' )
			self:SetWidth( SCREEN_WIDTH );
			self:SetHeight( SCREEN_HEIGHT );
			self:EnableDepthBuffer( false );
			self:EnableAlphaBuffer( true );
			self:EnableFloat( false );
			self:EnablePreserveTexture( true );
			
			self:visible(true);
			
			self:Create();
			
			gat_aft2 = self;
			
		end,
	Def.Sprite{
		Name= "aft_self2",
		ProxyThisMessageCommand= function(self)
			self:SetTexture(gat_aft:GetTexture()):Center()
		end,
	},
    },
    Def.Quad{
      Name= "actor_yab",
      HideAFTMessageCommand= cmd(visible,false),
      InitCommand= cmd(visible,false),
      OnCommand= cmd(diffuse,color('0,0,0,1');zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y),
      ShowAFTMessageCommand= cmd(visible,true),
    },
    Def.Sprite{
      Name= "actor_zab",
      BackToNormalMessageCommand= cmd(linear,0.5;diffusealpha,0),
      HideAFTMessageCommand= cmd(visible,false),
      InitCommand= cmd(visible,false),
      OnCommand= cmd(diffusealpha,0.5;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y),
      ShowAFTBGMessageCommand= cmd(visible,true),
      Texture= "../bg.png",
    },
    Def.ActorFrame{
      Name= "actor_Aab",
      OnCommand= cmd(fov,80),
      Def.Sprite{
        Name= "actor_Bab",
        HideAFTMessageCommand= cmd(visible,false),
        InitCommand= cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;visible,false),
        OnCommand= function(self)
			--self:basezoomx((SCREEN_WIDTH/DISPLAY:GetDisplayWidth()));
			--self:basezoomy(-1*(SCREEN_WIDTH/DISPLAY:GetDisplayWidth()))
		
			self:SetTexture(gat_aft:GetTexture());
			--This makes it so the aft fills the whole screen regardless of internal resolution OR screen ratio! -Kid
			self:customtexturerect(0,0,gat_aft_width_ratio,gat_aft_height_ratio)
			
			gat_aft_target = self;
		end,
        ShowAFTMessageCommand= cmd(visible,true),
        Texture= "white",
      },
    },
    Def.Quad{
      Name= "actor_Cab",
      DelayFrame2AwayMessageCommand= cmd(visible,false),
      HideAFT2MessageCommand= cmd(visible,false),
      InitCommand= cmd(visible,false),
      OnCommand= cmd(diffuse,color('0,0,0,1');zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y),
      ShowAFT3MessageCommand= cmd(visible,true),
    },
    Def.Sprite{
      Name= "actor_Dab",
      CAMessageCommand= function(self)
			self:finishtweening();
			self:zoom(gat_aft_target:GetZoom());
			self:x(gat_aft_target:GetX());
			self:y(gat_aft_target:GetY());
			local x, y, z = gat_aft_target:getrotation();
			self:rotationz(z);
			self:linear(10/150);
			self:diffusealpha(1);
			self:linear(110/150);
			self:diffusealpha(0);
		end,
      HideAFT2MessageCommand= cmd(visible,false),
      InitCommand= cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;visible,false),
      OnCommand= function(self)
			--self:basezoomx((SCREEN_WIDTH/DISPLAY:GetDisplayWidth()));
			--self:basezoomy(-1*(SCREEN_WIDTH/DISPLAY:GetDisplayWidth()))
			
			self:diffuse(1,1,1,0);
			self:blend("BlendMode_Normal");
		
			self:SetTexture(gat_aft:GetTexture());
			--This makes it so the aft fills the whole screen regardless of internal resolution OR screen ratio! -Kid
			self:customtexturerect(0,0,gat_aft_width_ratio,gat_aft_height_ratio)
			
			gat_aft_target4 = self;
		end,
      ShowAFT2MessageCommand= cmd(visible,true),
      ShowAFT3MessageCommand= cmd(diffuse,color('1,1,1,1');blend,"BlendMode_Normal"),
      ShowAFT4MessageCommand= cmd(diffuse,color('1,1,1,1');blend,"BlendMode_Normal"),
      Texture= "white",
    },
    Def.Quad{
      Name= "actor_Eab",
      DelayFrame2AwayMessageCommand= cmd(finishtweening;diffuse,color('0,0,0,0')),
      DelayFrame2MessageCommand= cmd(finishtweening;diffuse,color('0,0,0,1')),
      DelayFrameMessageCommand= cmd(finishtweening;diffuse,color('1,1,1,1');linear,gat_delayframedur;diffusealpha,0),
      HideAFT2MessageCommand= cmd(visible,false),
      InitCommand= cmd(visible,false),
      OnCommand= cmd(diffuse,color('1,1,1,0');zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y),
      ShowAFT2MessageCommand= cmd(visible,true),
    },
    Def.ActorFrame{
      Name= "actor_Fab",
      OnCommand= cmd(fov,80),
      Def.Sprite{
        Name= "actor_abb",
        DelayFrame2MessageCommand= function(self)
			self:finishtweening();
			self:blend("BlendMode_Normal");
			self:sleep(0.04);
			
			if gat_cur_df == 1 then
				self:zoomx(1);
			elseif gat_cur_df == 2 then
				self:rotationz(30*-1)--rotationx & z get *-1. -Kid
			elseif gat_cur_df == 3 then
				self:rotationz(-30*-1)
			elseif gat_cur_df == 4 then
				self:rotationz(0);
				self:rotationx(-40*-1);
			elseif gat_cur_df == 5 then
				self:rotationx(40*-1);
			elseif gat_cur_df == 6 then
				self:rotationx(0);
				self:rotationy(40);
			elseif gat_cur_df == 7 then
				self:rotationy(-40);
			elseif gat_cur_df == 8 then
				self:rotationy(0);
				self:rotationx(0);
				self:rotationz(0);
			elseif gat_cur_df == 9 then
				self:rotationy(0);
				self:rotationx(30*-1);
				self:rotationz(30*-1);
			elseif gat_cur_df == 10 then
				self:rotationy(0);
				self:rotationx(30*-1);
				self:rotationz(-30*-1);
			elseif gat_cur_df == 11 then
				self:rotationy(0);
				self:rotationx(-30*-1);
				self:rotationz(30*-1);
			elseif gat_cur_df == 12 then
				self:rotationy(0);
				self:rotationx(-30*-1);
				self:rotationz(-30*-1);
			elseif gat_cur_df == 13 then
				self:rotationy(-50);
				self:rotationx(30*-1);
				self:rotationz(0);
			elseif gat_cur_df == 14 then
				self:rotationy(50);
				self:rotationx(30*-1);
			end
			
			gat_cur_df = gat_cur_df+1
			
			self:diffuse(1,1,1,1);
			self:linear(gat_delayframedur*2);
			self:diffusealpha(0);
		end,
        DelayFrameMessageCommand= function(self)
			self:finishtweening();
			self:skewx(0.4*gat_delayframeskewx*-1);
			self:zoomx(1.3);
			self:diffusealpha(1);
			self:linear(gat_delayframedur);
			self:diffusealpha(0);
			self:diffuse(1,1,0,0);
			self:blend("BlendMode_Subtract");
			gat_delayframeskewx = gat_delayframeskewx*-1;
		end,
        HideAFT2MessageCommand= cmd(visible,false),
        InitCommand= cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;visible,false),
        OnCommand= function(self)
			--self:basezoomx((SCREEN_WIDTH/DISPLAY:GetDisplayWidth()));
			--self:basezoomy(-1*(SCREEN_WIDTH/DISPLAY:GetDisplayWidth()))
			
			self:diffuse(1,1,0,0);
			self:blend("BlendMode_Subtract");
		
			self:SetTexture(gat_aft2:GetTexture());
			--This makes it so the aft fills the whole screen regardless of internal resolution OR screen ratio! -Kid
			self:customtexturerect(0,0,gat_aft_width_ratio,gat_aft_height_ratio)
			
			gat_aft_target5 = self;
		end,
        ShowAFT2MessageCommand= cmd(visible,true),
        Texture= "white",
      },
    },
--     LoadActor('../bg') .. {
--       Name= "actor_bbb",
--       File= "../bg",
--       InitCommand= function(self) gat_FUCKTHISGAME = self end,--Unconverted position and added zooms. -Kid
--       OnCommand= cmd(visible,true;x,0;y,0;z,2;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;visible,false),
--     },--Instead of loading the BG, I'm just gonna use a sprite. -Kid
    Def.Sprite{
      Name= "FUCKTHIS",
      InitCommand= function(self) gat_FUCKTHISGAME = self end,
      OnCommand= cmd(visible,true;Center;diffusealpha,0.5;zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;visible,false),--Scaled zoom. -Kid
      Texture= "../bg3.png",
    },
    Def.Sprite{
      Name= "actor_cbb",
      InitCommand= function(self) self:SetTextureFiltering(false) end,
      OnCommand= cmd(zoom,1.5*gat_height_ratio;diffusealpha,0;x,sw/2;y,sh*(5/6)),--Scaled zoom. -Kid
      ShameTrollMessageCommand= cmd(diffusealpha,0.8;linear,gat_delayframedur*2;diffusealpha,0),
      Texture= "laugh 2x1.png",
    },
    --Moved flash quad to be over everything, except for the character. -Kid
    Def.Quad{
      Name= "actor_dC",
      FadeBlackMessageCommand= cmd(diffuse,color('0,0,0,0');linear,480/150;diffusealpha,1),
      OnCommand= cmd(diffuse,color('1,1,1,0');zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y),
      RedFlashLongMessageCommand= function (self)
			self:diffuse(1,0,0,1);
			self:diffusealpha(1);
			self:linear(2)
			self:diffusealpha(0);
		end,
      RedFlashMessageCommand= function (self)
			self:diffuse(1,0,0,1);
			self:diffusealpha(1);
			self:linear(0.5)
			self:diffusealpha(0);
		end,
      RedFlashQMessageCommand= function (self)
			self:diffuse(1,0,0,0);
			self:diffusealpha(.7);
			self:linear(0.5)
			self:diffusealpha(0);
		end,
      WhiteFlashLongMessageCommand= function (self)
			self:diffuse(1,1,1,1.4);
			self:diffusealpha(1.05);
			self:linear(2)
			self:diffusealpha(0);
		end,
      WhiteFlashMessageCommand= function (self)
			self:diffuse(1,1,1,1);
			self:diffusealpha(1);
			self:linear(0.5)
			self:diffusealpha(0);
		end,
    },
    LoadActor('chara') .. {
      Name= "actor_dbb",
      File= "chara",
    },
    Def.BitmapText{
      Name= "actor_ebb",
      Font= "Common normal",
      OnCommand= cmd(x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y;effectclock,"music";playcommand,"SetTime";visible,false),
      SetTimeCommand= function(self) self:settext(self:GetSecsIntoEffect()); mod_time = tonumber(self:GetText()); self:sleep(0.02); self:queuecommand('SetTime'); end,
      Text= "test",
    },
  }),
}
