//Shortcut because laziness
rawset(_G, "SMSpulsecolorset", function (p, c1, c2, c3, c4, c5)
	p.smscoatc5 = c1
	p.smscoatc4 = c2
	p.smscoatc3 = c3
	p.smscoatc2 = c4
	p.smscoatc1 = c5
end)

//Actual menu navigation thinker. Visuals are in HUD hook further below.
local function SMSmenuthink(p)
local s = p.mo
		
			if p.starsms1x == nil
				p.starsms1y = P_RandomRange(220, 240)*FRACUNIT p.starsms1x = P_RandomRange(38, 360)
				p.starsms2y = P_RandomRange(220, 240)*FRACUNIT p.starsms2x = P_RandomRange(38, 360)
				p.starsms3y = P_RandomRange(220, 240)*FRACUNIT p.starsms3x = P_RandomRange(38, 360)
				p.starsms4y = P_RandomRange(220, 240)*FRACUNIT p.starsms4x = P_RandomRange(38, 360)
				p.starsms5y = P_RandomRange(220, 240)*FRACUNIT p.starsms5x = P_RandomRange(38, 360) 
				p.starsms6y = P_RandomRange(220, 240)*FRACUNIT p.starsms6x = P_RandomRange(38, 360)
				p.starsms7y = P_RandomRange(220, 240)*FRACUNIT p.starsms7x = P_RandomRange(38, 360)
				p.starsms8y = P_RandomRange(220, 240)*FRACUNIT p.starsms8x = P_RandomRange(38, 360) 
				p.starsms9y = P_RandomRange(220, 240)*FRACUNIT p.starsms9x = P_RandomRange(38, 360) 

			elseif p.starsms1x != nil
			
				if p.starsms1y != nil p.starsms1y = $-FRACUNIT end if p.starsms1y < -20 p.starsms1y = P_RandomRange(234, 270)*FRACUNIT p.starsms1x = P_RandomRange(-5, 325) end
				if p.starsms2y != nil p.starsms2y = $-2*FRACUNIT end if p.starsms2y < -20 p.starsms2y = P_RandomRange(221, 269)*FRACUNIT p.starsms2x = P_RandomRange(-5, 325) end
				if p.starsms3y != nil p.starsms3y = $-3*FRACUNIT end if p.starsms3y < -20 p.starsms3y = P_RandomRange(240, 280)*FRACUNIT p.starsms3x = P_RandomRange(-5, 325) end
				if p.starsms4y != nil p.starsms4y = $-2*FRACUNIT-15355 end if p.starsms4y < -20 p.starsms4y = P_RandomRange(223, 290)*FRACUNIT p.starsms4x = P_RandomRange(-5, 325) end
				if p.starsms5y != nil p.starsms5y = $-2*FRACUNIT-27000 end if p.starsms5y < -20 p.starsms5y = P_RandomRange(210, 240)*FRACUNIT p.starsms5x = P_RandomRange(-5, 325) end
				if p.starsms6y != nil p.starsms6y = $-2*FRACUNIT-5500 end if p.starsms6y < -20 p.starsms6y = P_RandomRange(229, 260)*FRACUNIT p.starsms6x = P_RandomRange(-5, 325) end
				if p.starsms7y != nil p.starsms7y = $-2*FRACUNIT-43000 end if p.starsms7y < -20 p.starsms7y = P_RandomRange(225, 285)*FRACUNIT p.starsms7x = P_RandomRange(-5, 325) end
				if p.starsms8y != nil p.starsms8y = $-FRACUNIT-43000 end if p.starsms8y < -20 p.starsms8y = P_RandomRange(238, 273)*FRACUNIT p.starsms8x = P_RandomRange(-5, 325) end
				if p.starsms9y != nil p.starsms9y = $-FRACUNIT-30000 end if p.starsms9y < -20 p.starsms9y = P_RandomRange(230, 240)*FRACUNIT p.starsms9x = P_RandomRange(-5, 325) end
			end
			if p.smstext2y == nil or (p.smstext2y > 258*FRACUNIT)
			p.smstext2y = 0 
			else
			p.smstext2y = $+2*FRACUNIT
			end
			if p.smstext1x == nil or (p.smstext1x >= 350*FRACUNIT)
			p.smstext1x = 0 
			else
			p.smstext1x = $+2*FRACUNIT
			end
			
			
			if (leveltime % 16 == 0)
			P_SpawnMobj(s.x, s.y, s.z-8*FRACUNIT, MT_IVSP)
			end
			p.sms_flamedelay = 10
			p.accelstart = 0
			p.powers[pw_carry] = 0
			s.momz = 0
			s.momy = 0
			s.momx = 0
				if (p.sms_intoship == 35)
					if p.powers[pw_underwater]
					p.eshipwater = p.powers[pw_underwater]
					end
					if p.powers[pw_spacetime]
					p.eshipspace = p.powers[pw_spacetime]
					end
				if p.mysticsuper		
				A_ENDMYSTICSUPER(s) //Disengage Mystic Super
				end
				if p.hypermysticsonic
				A_TOGOBACKTOTHEWAYYOUWERE(s, true) //Disengage Hyper Mystic Sonic
				end
				p.smsmenuanim = 160
				p.smsmenuanim2 = 160
				p.sms_boostlevel = 0
				p.hsh1 = 0
				p.hshh2 = 155355
				p.hshh = 1
				s.state = S_PLAY_STND
				p.powers[pw_nocontrol] = 2
				p.ssmenuiuse = true
				p.dashspeed = 0
				p.pflags = $|PF_INVIS|PF_GODMODE|PF_FORCESTRAFE|PF_USEDOWN|PF_JUMPDOWN|PF_JUMPED|PF_THOKKED|PF_JUMPSTASIS & ~PF_SPINNING & ~PF_STARTDASH
					p.sms_intoship = 33
					p.ssmenui1 = 1
					p.ssmenuisub = 1
					p.ssmenuisubpage = 1
					p.ssmenuidrop = 0
					S_ChangeMusic("_INTER", true, p)
						if G_GametypeHasSpectators()
					    P_PlayerEmeraldBurst(p)
					    P_PlayerFlagBurst(p)
					    P_PlayerWeaponAmmoBurst(p)
					    S_StartSound(s, sfx_antiri, p)
					    p.score = 0
					    CONS_Printf(p, "\x85Your score resets to 0 when you use the menu in Match.")
						end
				end

			if p.sms_intoship == 33
				if p.powers[pw_underwater]
					if p.powers[pw_underwater] < 400
					p.powers[pw_underwater] = 401
					p.eshipwater = 401
					elseif p.eshipwater
					p.powers[pw_underwater] = p.eshipwater		
					end
				end
				if p.powers[pw_spacetime]
					if p.powers[pw_spacetime] < 400
					p.powers[pw_spacetime] = 401
					p.eshipspace = 401
					elseif p.eshipspace
					p.powers[pw_spacetime] = p.eshipspace		
					end
				end
				if leveltime //Fixes issue switching levels mid-menu
				S_ChangeMusic("_INTER", true, p)
				end
			if (s.actioncooldown and (s.actioncooldown < 50))
			s.actioncooldown = 50
			end
			p.sms_flamedelay = 10
			p.weapondelay = 11
			p.pflags = $|PF_INVIS|PF_GODMODE|PF_FORCESTRAFE|PF_USEDOWN|PF_JUMPDOWN|PF_JUMPED|PF_THOKKED|PF_JUMPSTASIS & ~PF_SPINNING & ~PF_STARTDASH
			s.iasmsp = 1 //Don't get picked up right now
			s.flags2 = $|MF2_SHADOW
			p.powers[pw_nocontrol] = 0 	
		
//  ___  ___   _ __  | |_  _ __  ___  | | ___ 
// / __|/ _ \ | '_ \ | __|| '__|/ _ \ | |/ __|
//| (__| (_) || | | || |_ | |  | (_) || |\__ \
// \___|\___/ |_| |_| \__||_|   \___/ |_||___/



//Main Menu! Only two options. I'm sure classic fans will enjoy the simplicity! :P

			  if p.ssmenuisub == 1
				if (p.cmd.buttons & BT_USE) and not p.ssmenuiuse
					p.sms_intoship = 0
					p.spinhold = 10
					p.accelstart = skins[s.skin].accelstart
					p.pflags = $|PF_USEDOWN & ~PF_INVIS & ~PF_GODMODE & ~PF_FORCESTRAFE & ~PF_STARTDASH & ~PF_SPINNING & ~PF_JUMPED & ~PF_STASIS & ~PF_JUMPSTASIS & ~PF_THOKKED
					s.flags2 = $|MF2_DONTDRAW & ~MF2_SHADOW
					p.powers[pw_flashing] = 40
					S_StartSound(s, sfx_menu1, p)
					P_RestoreMusic(p)
					p.powers[pw_nocontrol] = 0
				elseif p.ssmenui1 == 1  //SMS Reborn
					if (p.cmd.forwardmove) and not (p.ssmenuiup or p.ssmenuidown)
					p.ssmenui1 = 2
					S_StartSound(s, sfx_smsmmi, p)
					elseif (p.cmd.buttons & BT_JUMP) and not p.ssmenuijump
					p.smshudmenuclick = 2
					p.sms_hudtransf = 7
					S_StartSound(s, sfx_smsmmp, p)
					p.ssmenuisub = 2
					p.ssmenuisubpage = 1
					p.ssmenui1 = 2
						if p.smslastcolormenudrop != nil
						p.ssmenuidrop = p.smslastcolormenudrop
						else
						p.ssmenuidrop = 1
						p.smslastcolormenudrop = 1
						end
					end
				elseif p.ssmenui1 == 2  //Admin Options
					if (p.cmd.forwardmove) and not (p.ssmenuiup or p.ssmenuidown)
					p.ssmenui1 = 1
					S_StartSound(s, sfx_smsmmi, p)
					elseif (p.cmd.buttons & BT_JUMP) and not p.ssmenuijump
						if not (IsPlayerAdmin(p) or (p == server))
						p.smshudmenuclick = 2
						S_StartSound(s, sfx_notadd, p)
						CONS_Printf(p, "\x85"+"Only admins and server hosts may access this.")
						else
						p.smshudmenuclick = 2
						S_StartSound(s, sfx_smsmmp)
						p.sms_hudtransf = 7
						p.ssmenuisub = 3
						p.ssmenuisubpage = 1
						p.ssmenui1 = 1
						p.ssmenuidrop = 0
						end
					end
				end
			  elseif p.ssmenuisub == 2 //Actually in the SMSreborn menu now
			  		if s.skin == "sms"
						p.smscdemo = true
					else
						p.smscdemo = false
					end
			  		if (p.cmd.forwardmove > 0) and not p.ssmenuiup and not (p.ssmenuisubpage < 1)
						p.smscdemo = false
						p.sms_hudflipc = 0
						if (p.ssmenuisubpage == 1)
							p.ssmenuisubpage = 12
						else
							p.ssmenuisubpage = $-1
							if p.ssmenuisubpage == 1
								if p.smslastcolormenudrop != nil
								p.ssmenuidrop = p.smslastcolormenudrop
								else
								p.ssmenuidrop = 1
								p.smslastcolormenudrop = 1
								end
							end
						end
						S_StartSound(s, sfx_smsmmi, p)
						if not (p.ssmenuisubpage == 1)
						p.ssmenuidrop = 0
						end
			  		elseif (p.cmd.forwardmove < 0) and not p.ssmenuidown and not (p.ssmenuisubpage > 12)
						p.smscdemo = false
						p.sms_hudflipc = 0
						if (p.ssmenuisubpage == 12)
							p.ssmenuisubpage = 1
								if p.smslastcolormenudrop != nil
								p.ssmenuidrop = p.smslastcolormenudrop
								else
								p.ssmenuidrop = 1
								p.smslastcolormenudrop = 1
								end
						else
							p.ssmenuisubpage = $+1
						end
						S_StartSound(s, sfx_smsmmi, p)
						if not (p.ssmenuisubpage == 1)
						p.ssmenuidrop = 0
						end
			  		elseif (p.cmd.buttons & BT_USE) and not p.ssmenuiuse
					S_StartSound(s, sfx_smsmmp, p)
					p.sms_hudtransf = 7
					p.smscdemo = false
					p.smshudmenuclick = 2
					p.ssmenuisub = 1
					p.ssmenuisubpage = 1
					p.ssmenui1 = 1
					elseif (p.cmd.sidemove < 0) and not p.ssmenuileft and p.ssmenuidrop
						p.ssmenuidrop = $-1
						S_StartSound(s, sfx_smsmmi, p)
						if p.ssmenuisubpage == 1
						p.smslastcolormenudrop = p.ssmenuidrop
						end
					elseif (p.cmd.sidemove > 0) and not p.ssmenuiright
			  			if p.ssmenuisubpage == 1 //SMS colors right
							if (p.ssmenuidrop < 28)
								p.ssmenuidrop = $+1
								p.smslastcolormenudrop = p.ssmenuidrop
								S_StartSound(s, sfx_smsmmi, p)
							end
			  			end
					elseif (p.cmd.buttons & BT_JUMP) and not p.ssmenuijump
				//From here on, start confirming stuff.
						if (p.ssmenuisubpage > 2)
							S_StartSound(s, sfx_smsmmf, p)	
							p.sms_hudflipc = 4
						end
						if p.ssmenuisubpage == 1
						 if G_GametypeHasTeams()
						 S_StartSound(s, sfx_adderr, p)
						 CONS_Printf(p, "Not in team gametypes.")
						 else
						 S_StartSound(s, sfx_menu1, p)
							if not (s and s.skin == "sms")
							CONS_Printf(p, "Be "+"\x82"+"SMS"+"\x80 before selecting these to see previews.")
							end						
							if p.ssmenuidrop != nil --Select a color!
							A_setSMSspecialcolors(s, p.ssmenuidrop)
							end
						 end
						elseif p.ssmenuisubpage == 2
							if s and (s.skin != "sms")
							P_FlashPal(p, PAL_NUKE, 3)
							S_StartSound(s, sfx_adderr, p)
							CONS_Printf(p, "These are for SMS.")							
							elseif p.lightdashenable
							P_FlashPal(p, PAL_NUKE, 3)
							S_StartSound(s, sfx_adderr, p)
							CONS_Printf(p, "You already have these!")
							elseif (p.rings < 25)
							P_FlashPal(p, PAL_NUKE, 3)
							S_StartSound(s, sfx_notadd, p)
							CONS_Printf(p, "You need at least 25 rings!")
							elseif G_GametypeHasSpectators() or s.battlemodsms
							P_FlashPal(p, PAL_NUKE, 3)
							S_StartSound(s, sfx_adderr, p)
							CONS_Printf(p, "Not for this gamemode!")
							elseif (p.lddiscount < 3)
							P_FlashPal(p, PAL_MIXUP, 3) 
								P_GivePlayerRings(p, -25)
								p.lightdashenable = 1
								S_StartSound(nil, sfx_nxitem)
								print(p.name+" just bought lightdash shoes!")
								CONS_Printf(p, "\x82You unlocked the lightdash!(Custom1) You can also charge the lightspeed attack!")
							elseif (p.lddiscount > 2) //Discount! Lucky you!
							P_FlashPal(p, PAL_MIXUP, 5) 
								P_GivePlayerRings(p, -15)
								p.lightdashenable = 1
								S_StartSound(nil, sfx_nxdone)
								print(p.name+" just got a great deal on some lightdash sneakers!")
								CONS_Printf(p, "\x82You unlocked the lightdash!(Custom1) You can also charge the lightspeed attack!")
							end
			  			elseif p.ssmenuisubpage == 3
							if not p.smsanaloghome
						//	CONS_Printf(p, "\x82"+"Analog Homing Thok is on! Homing thoks go in the direction of the movement keys!")
			  				p.smsanaloghome = true
							else
						//	CONS_Printf(p, "\x85"+"Analog Homing Thok is off! Homing thoks go in the direction of the camera!(unless you use simple controls)")
							p.smsanaloghome = nil
							end
			  			elseif p.ssmenuisubpage == 4
							if not p.smsanalogsweep
						//	CONS_Printf(p, "\x82"+"Analog FootSweeps are on! Your kicks rush in the direction of the movement keys!")
			  				p.smsanalogsweep = true
							else
						//	CONS_Printf(p, "\x85"+"Analog Footsweeps are off! Your kicks rush in the camera's direction! (unless you use simple controls)")
							p.smsanalogsweep = nil
							end
			  			elseif p.ssmenuisubpage == 5
							if p.nosmsquakespls
						//	CONS_Printf(p, "\x83"+"All of the SMS quake effects generated are now restored!")
			  				p.nosmsquakespls = nil
							else
						//	CONS_Printf(p, "\x89"+"Most of the SMS quake effects generated are now turned off.")
							p.nosmsquakespls = true
							end
						elseif p.ssmenuisubpage == 6
							if not p.smseasyhaymaker
						//	CONS_Printf(p, "\x89"+"Easy airborne haymakers are now active. Holding CUSTOM1 and back is no longer necessary!")
			  				p.smseasyhaymaker = true
							else
						//	CONS_Printf(p, "\x83"+"Airborne haymakers now use the full button command!")
							p.smseasyhaymaker = nil
							end
						elseif p.ssmenuisubpage == 7
							if not p.smsdontgrabme
						//	CONS_Printf(p, "\x89"+"You will now never get picked up by SMS.")
			  				p.smsdontgrabme = 1
							elseif p.smsdontgrabme == 1
						//	CONS_Printf(p, "\x84"+"You now live to be thrown by SMS.")
			  				p.smsdontgrabme = 2
							elseif p.smsdontgrabme == 2
						//	CONS_Printf(p, "\x83"+"You can now get picked up by SMS after not moving for 3 seconds.")
			  				p.smsdontgrabme = 0
							end
						elseif p.ssmenuisubpage == 8
							if not p.smstutorial
						//	CONS_Printf(p, "\x82SMS control-aid is now active.")
			  				p.smstutorial = true
							else
						//	CONS_Printf(p, "\x83The training wheels are off!")
							p.smstutorial = false
							end
						elseif p.ssmenuisubpage == 9
							if not p.smsblastboost
						//	CONS_Printf(p, "\x82"+"SMS now emulates the 1.09.4 SMS gameplay of old!")
			  				p.smsblastboost = true
							else
						//	CONS_Printf(p, "\x83"+"The SMS reborn abilities return!")
							p.smsblastboost = nil
							end
						elseif p.ssmenuisubpage == 10
							if not p.nohmstheme
						//	CONS_Printf(p, "\x85"+"The music will no longer change if you transform into HMS")
			  				p.nohmstheme = true
							else
						//	CONS_Printf(p, "\x83"+"The Hyper Mystic theme now plays upon transforming again!")
							p.nohmstheme = nil
							end
						elseif p.ssmenuisubpage == 11
							if not p.autoc1mom
						//	CONS_Printf(p, "\x83"+"Automatic momentum is now on")
			  				p.autoc1mom = 1
							elseif p.autoc1mom == 1
						//	CONS_Printf(p, "\x83"+"Momentum from keys is now on")
			  				p.autoc1mom = 2
							else
						//	CONS_Printf(p, "\x85"+"Automatic momentum is now off")
							p.autoc1mom = 0
							end
						elseif p.ssmenuisubpage == 12 //Because I'm too cool for tables.

						local a1 =0 local a2 =0 local a3 =0 local a4 =0 local a5 =0 local a6 =0 local a7 =0 local a8 =0 local a9 =0 local a10 =0
						local a11 =0 local a12 =0 local a13 =0 local a14 =0 local a15 =0 local a16=0 local a17 =0 local a18 =0 local a19 =0 local a20 =0
						
						--Okay, let's generate this autoconfig command. Since it'd be a pain to type out/remember, we'll auto-execute this when SMS is loaded.
						--It'll also let players make commands that load alongside SMS, such as a bind or naming themselves Super Mystic <name> or whatever.
		  					if p.smscoatc5 and (p.smscoatc5 == SKINCOLOR_SUPERGOLD1) and p.smscoatc4 and (p.smscoatc4 == SKINCOLOR_SUPERGOLD2)
							a1 = 1
							elseif p.shinyglosscoat
							a1 = p.shinyglosscoat //Pref special color
							else
							a1 = 0
							end
							if p.smsanaloghome a2 = 1 end //1 = Analog homing
							if p.smsanalogsweep a3 = 1 end //1 = Analog footsweep
							if p.nosmsquakespls a4 = 1 end //1 = No Quakes
							if p.smseasyhaymaker a5 = 1 end //1 = Simple Haymaker
							a6 = p.smsdontgrabme //1 is never grab, 2 is always grab, 0 is 3s
							if p.smstutorial a7 = 1 end //1 = Tutorial mode on
							if p.smsblastboost a8 = 1 end //1 == SMSblast on
							if p.nohmstheme a9 = 1 end //1 == No HMS theme playing.
							if p.nosmscolorspls a10 = 1 end //1 == Pulsing Colors are forbidden
							if p.autoc1mom a11 = p.autoc1mom else a11 = 0 end //2 = Key, 1 = Auto, 0 = C1
						if (p == admin or p == server)
							if p.smstransformonly a12 = 1 end //1 = SMS through transform-only
							if p.hmstransformdisable a13 = tostring(p.hmstransformdisable) else a13 = tostring(0) end //1= Chaos Emeralds only, 2= HMS off entirely, 0 = free HMS
							if p.powersharerestrict a14 = p.powersharerestrict else a14 = 0 end //1= Chaos Emeralds, 2=No powershare, 0=Free powershare.
							if p.smsgraphix a15 = p.smsgraphix else a15 = 0 end //0=Full, 1=Mid, 0=Garbage
							if p.smsnoracegame a16 = p.smsnoracegame else a16 = 0 end //0=SMSrace, 1=NoSMSrace , 2=SuperRace 
							if p.smsnomatchgame a17 = 1 end //0=SMSmatch, 1=NoSMSmatch (number)
							if p.smsnobmgame a18 = p.smsnobmgame else a18 = 0 end //2==SonicToSMSbm, 1=NoSMSbm, 0=SMSfreebm
							if p.smsnomsspawn a19 = p.smsnomsspawn else a19 = 0 end //1=NoMysticEmerald, 0=SpawnMS (number)
							if p.hmsmlimit a20 = p.hmsmlimit else a20 = 0 end //HMS limit. Number is the direct limit.
						end
		
						if io and p == consoleplayer
							local file = io.openlocal("client/smsrebornsettings22.dat", "w+")
							file:write("SMSrebornautoconfig "+a1+" "+a2+" "+a3+" "+a4+" "+a5+" "+a6+" "+a7+" "+a8+" "+a9+" "+a10+" "+a11+" "+a12+" "+a13+" "+a14+" "+a15+" "+a16+" "+a17+" "+a18+" "+a19+" "+a20)
							file:close()
							CONS_Printf(p, "\n")
							CONS_Printf(p, "Current game's SMSreborn and Admin settings saved.")
							CONS_Printf(p, "\n")
							P_FlashPal(p, PAL_MIXUP, 8) --succesfully saved! Make a flash and print a message.
						end
							

						/*	CONS_Printf(p, "\n")
							CONS_Printf(p, "\x82"+"//v===Find this code in your logs folder===v")
							CONS_Printf(p, "\n")
							CONS_Printf(p, "SMSrebornautoconfig "+a1+" "+a2+" "+a3+" "+a4+" "+a5+" "+a6+" "+a7+" "+a8+" "+a9+" "+a10+" "+a11+" "+a12+" "+a13+" "+a14+" "+a15+" "+a16+" "+a17+" "+a18+" "+a19+" "+a20)
							CONS_Printf(p, "\n")
							CONS_Printf(p, "\x82"+"//^=====Copy Paste into SMSreborn.cfg=====^")
							CONS_Printf(p, "\n") */
							
							S_StartSound(s, sfx_smsmmp, p)
						//	p.ssmenuisub = 241
						//	p.ssmenuisubpage = 241
						//	p.ssmenui1 = 241
						end
					end
					
//Menu 3, the Admin Menu					
			 elseif p.ssmenuisub == 3
			 		if not (IsPlayerAdmin(p) or (p == server))
					or (p.cmd.buttons & BT_USE) and not p.ssmenuiuse
					S_StartSound(s, sfx_smsmmp, p)
					p.sms_hudtransf = 7
					p.smshudmenuclick = 2
					p.ssmenuisub = 1
					p.ssmenuisubpage = 1
					p.ssmenui1 = 2
					elseif (p.cmd.forwardmove > 0) and not p.ssmenuiup and not (p.ssmenuisubpage < 1)
						if (p.ssmenuisubpage == 1)
							p.ssmenuisubpage = 10
						else
							p.ssmenuisubpage = $-1
						end
						S_StartSound(s, sfx_smsmmi, p)
						p.ssmenuidrop = 0
			  		elseif (p.cmd.forwardmove < 0) and not p.ssmenuidown and not (p.ssmenuisubpage > 10)
						if (p.ssmenuisubpage == 10)
							p.ssmenuisubpage = 1
						else
							p.ssmenuisubpage = $+1
						end
						S_StartSound(s, sfx_smsmmi, p)
						p.ssmenuidrop = 0					
					elseif (p.cmd.sidemove < 0) and not p.ssmenuileft and (p.ssmenuidrop or p.ssmenuisubpage == 8)
						if (p.ssmenuisubpage == 8) //HMS limit select
							if (p.hmsmlimit > 1)
								S_StartSound(s, sfx_smsmmi, p)
								p.hmsmlimit = $-1
								for ns in players.iterate
								ns.hmsmlimit = p.hmsmlimit
								end
							end
						else
						p.ssmenuidrop = $-1
						S_StartSound(s, sfx_smsmmf, p)
						end
					elseif (p.cmd.sidemove > 0) and not p.ssmenuiright
						if (p.ssmenuisubpage == 8) //HMS limit select
							if not (p.hmsmlimit > 31)
								S_StartSound(s, sfx_smsmmi, p)
								p.hmsmlimit = $+1
								for ns in players.iterate
								ns.hmsmlimit = p.hmsmlimit
								end
							end
			  			elseif not (p.ssmenuisubpage == 1 or p.ssmenuisubpage == 9 or p.ssmenuisubpage == 6 or p.ssmenuisubpage == 10)
							if (p.ssmenuidrop < 2)
								p.ssmenuidrop = $+1
								S_StartSound(s, sfx_smsmmf, p)
							end
						elseif not p.ssmenuidrop
						S_StartSound(s, sfx_smsmmf, p)
						p.ssmenuidrop = $+1
			  			end
					elseif (p.cmd.buttons & BT_JUMP) and not p.ssmenuijump
						if not (p.ssmenuisubpage == 8)
						S_StartSound(nil, sfx_menu1, p)
						P_FlashPal(p, PAL_MIXUP, 2)
						end
						if p.ssmenuisubpage == 1
							if not p.ssmenuidrop
								print("\x83"+"Players can now freely play as SMS through transforming or as seperate character.")
			  						for ns in players.iterate
			  						ns.smstransformonly = false
			  						end
							elseif p.ssmenuidrop and p.ssmenuidrop == 1
								print("\x87"+"Super Mystic Sonic is now only available as transformation!")
			  						for ns in players.iterate
			  						ns.smstransformonly = true
			  						end
									if (s.skin == "sms") and not p.sms_transformstate
										A_SMSTOSONIC(s, nil, true, true)
									end
							end
						elseif p.ssmenuisubpage == 2
							if not p.ssmenuidrop
								print("\x83"+"Players can now freely transform into Hyper Mystic Sonic.")
			  						for ns in players.iterate
			  						ns.hmstransformdisable = 0
			  						end
							elseif p.ssmenuidrop and p.ssmenuidrop == 1
									print("\x84"+"Players now need the 7 Chaos Emeralds to access Hyper Mystic Sonic.")
			  						for ns in players.iterate
			  						ns.hmstransformdisable = 2
			  						end
							elseif p.ssmenuidrop and p.ssmenuidrop == 2
									print("\x85"+"Hyper Mystic Sonic is now disabled.")
			  						for ns in players.iterate
			  						ns.hmstransformdisable = 1
										if ns.hypermysticsonic and ns.mo
										A_TOGOBACKTOTHEWAYYOUWERE(ns.mo, true) //Disengage Hyper Mystic Sonic
										end
			  						end
							end
						elseif p.ssmenuisubpage == 3
							if not p.ssmenuidrop
								print("\x83"+"SMS can now share powers with others by holding Custom 3.")
			  						for ns in players.iterate
			  						ns.powersharerestrict = 0
			  						end
							elseif p.ssmenuidrop and p.ssmenuidrop == 1
									print("\x84"+"Players now need the 7 Chaos Emeralds to use SMS' powershare.")
			  						for ns in players.iterate
			  						ns.powersharerestrict = 1
			  						end
							elseif p.ssmenuidrop and p.ssmenuidrop == 2
									print("\x85"+"SMS' powershare is now disabled.")
			  						for ns in players.iterate
			  						ns.powersharerestrict = 2
			  						end
							end
						elseif p.ssmenuisubpage == 4
							if not p.ssmenuidrop
								print("\x83"+"SMSreborn graphics are set to full. Auto-graphics are turned off.")
			  						for ns in players.iterate
									ns.smsautographix = false
			  						ns.smsgraphix = 0
			  						end
							elseif p.ssmenuidrop and p.ssmenuidrop == 1
									print("\x87"+"SMSreborn graphics are set to medium. Auto-graphics are turned off.")
			  						for ns in players.iterate
									ns.smsautographix = false
			  						ns.smsgraphix  = 1
			  						end
							elseif p.ssmenuidrop and p.ssmenuidrop == 2
									print("\x85"+"SMSreborn graphics are set to low. Auto-graphics are turned off.")
			  						for ns in players.iterate
									ns.smsautographix = false
			  						ns.smsgraphix  = 2
			  						end
							elseif p.ssmenuidrop and p.ssmenuidrop == 3
								print("\x84"+"Auto-graphics switched on. Graphics auto-adjust whenever someone joins based on playercount.")
			  					for ns in players.iterate
								ns.smsautographix = true
			  					end
							end
						elseif p.ssmenuisubpage == 5
							if not p.ssmenuidrop
								print("\x83"+"Everyone can participate in race, including the golden blur!")
			  					for ns in players.iterate
			  					ns.smsnoracegame = 0
			  					end
							elseif p.ssmenuidrop and p.ssmenuidrop == 1
			 					print("\x82"+"Let's step up the pace! Now EVERYONE can transform at the racing startline!")
			  					for ns in players.iterate
			  					ns.smsnoracegame = 2
			  					end
							elseif p.ssmenuidrop and p.ssmenuidrop == 2
			 					print("\x85"+"Super Mystic hedgehogs are now banned from race!")
			  					for ns in players.iterate
			  					ns.smsnoracegame = 1
			  					end
							end
						elseif p.ssmenuisubpage == 6
							if not p.ssmenuidrop
								print("\x83"+"Everyone can participate in matches, including the golden blur!")
			  					for ns in players.iterate
			  					ns.smsnomatchgame = 0
			  					end
							else
			 					print("\x85"+"SMS is banned from Match and CTF-type modes!")
			  					for ns in players.iterate
			  					ns.smsnomatchgame = 1
			  					end
							end
						elseif p.ssmenuisubpage == 7
							if not p.ssmenuidrop
								print("\x87"+"Players can now select SMS to become Sonic with the Super Mystic ability in Battle modes!")
			  					for ns in players.iterate
			  					ns.smsnobmgame = 2
			  					end
							elseif p.ssmenuidrop and p.ssmenuidrop == 1
								print("\x83"+"SMS can freely participate in Battle Mod matches! ...seems broken. Good luck!")
			  					for ns in players.iterate
			  					ns.smsnobmgame = 0
			  					end
							elseif p.ssmenuidrop and p.ssmenuidrop == 2
			 					print("\x85"+"SMS is banned from Battle Mod!")
			  					for ns in players.iterate
			  					ns.smsnobmgame = 1
			  					end
							end
						elseif p.ssmenuisubpage == 9
							if not p.ssmenuidrop
								print("\x85"+"The Mystic Emerald now spawns at player spawnpoints and checkpoints! Access the SMSreborn menu here!")
			  					for ns in players.iterate
			  					ns.smsnomsspawn = 0
			  					end
							else
								print("\x85"+"The Mystic Emerald no longer spawns! Use the "+"\x82"+"SMSmenu"+"\x85"+" console command to get into the menu!")
			  					for ns in players.iterate
			  					ns.smsnomsspawn = 1
			  					end
							end
						elseif p.ssmenuisubpage == 10
							if not p.ssmenuidrop
								print("\x83"+"Players can now select SMS' special glowing colors from the SMSreborn menu!")
			  					for ns in players.iterate
			  					ns.nosmscolorspls = 0
			  					end
							else
								print("\x85"+"SMS players are now restricted to SRB2's default non-pulsing colors.")
			  					for ns in players.iterate
			  					ns.nosmscolorspls = 1
			  					end
							end
						end
					end
					if not p.ssmenuidrop
					p.smsbcolor = SKINCOLOR_PERIDOT
					elseif p.ssmenuidrop == 1
						if (p.ssmenuisubpage == 1)
						p.smsbcolor = SKINCOLOR_ORANGE
						elseif (p.ssmenuisubpage == 9) or (p.ssmenuisubpage == 6)
						p.smsbcolor = SKINCOLOR_RED
						else
						p.smsbcolor = SKINCOLOR_CORNFLOWER
						end
					else
						p.smsbcolor = SKINCOLOR_RED
					end
			/*  elseif p.ssmenuisub == 241 //Save Config tutorial screen.
				if (p.cmd.buttons & BT_USE) and not p.ssmenuiuse
					p.sms_intoship = 0
					p.spinhold = 10
					p.accelstart = skins[s.skin].accelstart
					p.pflags = $|PF_USEDOWN & ~PF_INVIS & ~PF_GODMODE & ~PF_FORCESTRAFE & ~PF_STARTDASH & ~PF_SPINNING & ~PF_JUMPED & ~PF_STASIS & ~PF_JUMPSTASIS & ~PF_THOKKED
					s.flags2 = $|MF2_DONTDRAW & ~MF2_SHADOW
					p.powers[pw_flashing] = 40
					S_StartSound(s, sfx_menu1, p)
					P_RestoreMusic(p)
					p.powers[pw_nocontrol] = 0
				end */
			  end
				
	//Keep these below the menu Lua or it'll break.		
	
				if (p.cmd.sidemove < 0)
				p.ssmenuileft = true
				else
				p.ssmenuileft = false
				end
				if (p.cmd.sidemove > 0)
				p.ssmenuiright = true
				else
				p.ssmenuiright = false
				end
				if (p.cmd.buttons & BT_JUMP)
				p.ssmenuijump = true
				else
				p.ssmenuijump = false
				end
				if (p.cmd.forwardmove > 0)
				p.ssmenuiup = true
				else
				p.ssmenuiup = false
				end
				if (p.cmd.forwardmove < 0)
				p.ssmenuidown = true
				else
				p.ssmenuidown = false
				end
				if (p.cmd.buttons & BT_USE)
				p.ssmenuiuse = true
				else
				p.ssmenuiuse = false
				end
			end
end





//Hooray, the first PlayerThink hook in SMSreborn!

addHook("PlayerThink", function(p)
	if p.mo //And I STILL only need it when there's a player mobj. :P
	local s = p.mo
		if s.smsmsdelay
			if p.cmd.forwardmove or p.cmd.sidemove or (p.cmd.buttons & BT_JUMP)
				if s.smsmsdelayp
				s.smsmsdelayp = nil
				else
				s.smsmsdelay = nil
				end
			end
		end
		if p.sms_shipready
		p.sms_shipready = 0
		end
		if p.smshudappearanim or p.sms_intoship

		  if p.sms_hudflipc
		  p.sms_hudflipc = $-1
		  end
		  if p.sms_hudflipc2
		  p.sms_hudflipc2 = $-1
		  end
		  if p.sms_hudtransf
		  p.sms_hudtransf = $-1
		  end
		  
		  if p.ssmenuisub != nil
		  	if p.smsmenuanim == nil
			p.smsmenuanim = 160
			elseif p.ssmenuisub == 2
				if (p.smsmenuanim < 480)
				p.smsmenuanim = $+50
				elseif (p.smsmenuanim != 480)
				p.smsmenuanim = 480
				end
			elseif (p.smsmenuanim != 160)
				if (p.smsmenuanim > 160)		
				p.smsmenuanim = $-50
				else
				p.smsmenuanim = 160
				end
			end
			if p.smsmenuanim2 == nil
			p.smsmenuanim2 = 0
			elseif p.ssmenuisub == 3
				if (p.smsmenuanim2 < 160)
				p.smsmenuanim2 = $+30
				elseif (p.smsmenuanim2 != 160)
				p.smsmenuanim2 = 160
				end
			elseif (p.smsmenuanim2 != 0)
				if (p.smsmenuanim2 > 0)		
				p.smsmenuanim2 = $-30
				else
				p.smsmenuanim2 = 0
				end
			end
			if p.hshh == nil
			p.hshh = 1
			elseif p.ssmenuisub != 1
				if (p.hshh < 65355)
				p.hshh = $+10000
				elseif (p.hshh > 65355)
				p.hshh = 65355
				end
			elseif (p.hshh != 1)
				if (p.hshh > 10000)		
				p.hshh = $-10000
				else
				p.hshh = 1
				end
			end
			if p.hshh2 == nil
			p.hshh2 = 155355
			elseif p.hshh2 != 65355
				if (p.hshh2 > 68000)		
				p.hshh2 = $-5000
				else
				p.hshh2 = 65355
				end
			end
			if p.hsh1 == nil
			p.hsh1 = 0
			elseif p.ssmenuisub != 1
				if (p.hsh1 < 200)
					if (p.hsh1 <= 185)
					p.hsh1 = $+15
					elseif (p.hsh1 <= 190)
					p.hsh1 = $+10
					else
					p.hsh1 = $+1
					end
				end
			elseif (p.hsh1 > 0)
				if (p.hsh1 >= 30)
				p.hsh1 = $-30
				elseif (p.hsh1 >= 20)
				p.hsh1 = $-20
				elseif (p.hsh1 >= 10)
				p.hsh1 = $-10
				else
				p.hsh1 = $-1
				end
			end
		  end
		
		
			if p.smshudappearanim == nil
			p.smshudappearanim = 0
			end
			if not p.menutpos or (p.menutpos and (p.menutpos > 16))
			p.menutpos = 1
			else
			p.menutpos = $+1
			end
			if p.sms_intoship and (p.smshudappearanim < 52)
				if p.smshudappearanim < 49
				p.smshudappearanim = $+4
				else
				p.smshudappearanim = $+1
				end
			elseif p.smshudappearanim and not p.sms_intoship
				if (p.smshudappearanim > 3)
				p.smshudappearanim = $-3
				else
				p.smshudappearanim = $-1
				end
			end
			
		if (leveltime % 5 == 0)
			if p.smshudtrans1n == nil or (p.smshudtrans1n > 2)
				if not s.huddiego
				s.huddiego = true
				else
				p.smshudtrans1n = 0
				s.huddiego = false
				end
			else
			p.smshudtrans1n = $+1
			end
		end
		if not p.smshudtrans1n
			p.smshudtrans1 = V_40TRANS
		elseif p.smshudtrans1n == 1
			p.smshudtrans1 = V_50TRANS
		elseif p.smshudtrans1n == 2
			p.smshudtrans1 = V_40TRANS
		elseif p.smshudtrans1n >= 3
			p.smshudtrans1 = V_30TRANS
		end
		
			if (leveltime % 6 == 0)		
				if p.smshudtrans2n == nil or (p.smshudtrans2n > 2)
					if not s.huddiego2
					s.huddiego2 = true
					else
					p.smshudtrans2n = 0
					s.huddiego2 = false
					end
				else
				p.smshudtrans2n = $+1
				end
			end
			if not p.smshudtrans2n
			p.smshudtrans2 = V_60TRANS
			elseif p.smshudtrans2n == 1
			p.smshudtrans2 = V_70TRANS
			elseif p.smshudtrans2n == 2
			p.smshudtrans2 = V_60TRANS
			elseif p.smshudtrans2n >= 3
			p.smshudtrans2 = V_50TRANS
			end
			
			if (leveltime % 6 == 0)		
				if p.smshudtrans3n == nil or (p.smshudtrans3n > 2)
					if not s.huddiego3
					s.huddiego3 = true
					else
					p.smshudtrans3n = 0
					s.huddiego3 = false
					end
				else
				p.smshudtrans3n = $+1
				end
			end
			if not p.smshudtrans3n
			p.smshudtrans3 = V_70TRANS
			elseif p.smshudtrans3n == 1
			p.smshudtrans3 = V_90TRANS
			elseif p.smshudtrans3n == 2
			p.smshudtrans3 = V_80TRANS
			elseif p.smshudtrans3n >= 3
			p.smshudtrans3 = V_70TRANS
			end
		end
		
		if p.smshudmessagetime
		p.smshudmessagetime = $-1
		end
		if p.smshudmenuclick
		p.smshudmenuclick = $-1
		p.smshudmenusphere = "SPHRB0"
		else
		p.smshudmenusphere = "SPHRA0"
		end
		if p.smsmeterfiller
			p.smsmeterfillery = P_RandomRange(0,14)
			p.smsmeterfiller = false
			p.smsmemeter = p.smsmemeter and $+1 or 1
			if p.smsmemeter == 29 and s
			S_StartSound(s, sfx_s25d, p)
			elseif p.smsmemeter >= 30
			p.smsmemeter = 30
			end
		elseif p.smsmemeter and not p.sms_intoship
			p.smsmemeter = 0
		end
//This is where SMSus enters the Mystic Emeship
//Literally repeating the cursed hellscape I had to go through before with Samus to make a goddamn menu.
//Why do I have myself make menus all the time. WHY.

		if s and p.sms_intoship
		SMSmenuthink(p) //Put it into a local thinker because...it's...better? ...apparently????
		end
	end
end)






//All aboard the Mystic Emerald gunship!

addHook("MobjThinker", function(s)
	if s
		if s.movetms
		local v = s.movetms
			if v.valid
			P_SpawnGhostMobj(s)
			P_TryMove(s, s.x-FixedMul(85355, cos( R_PointToAngle2(s.x, s.y, v.x, v.y) )), s.y-FixedMul(85355, sin( R_PointToAngle2(s.x, s.y, v.x, v.y) )), true)
			P_TryMove(s, s.x-FixedMul(105355, cos( R_PointToAngle2(s.x, s.y, v.x, v.y) )), s.y-FixedMul(85355, sin( R_PointToAngle2(s.x, s.y, v.x, v.y) )), true)
			P_TryMove(s, s.x-FixedMul(75355, cos( R_PointToAngle2(s.x, s.y, v.x, v.y) )), s.y-FixedMul(85355, sin( R_PointToAngle2(s.x, s.y, v.x, v.y) )), true)
			end
		s.movetms = nil
		end
		if s.msexisting == nil
		s.msexisting = 70
		s.flags2 = $|MF2_SHADOW
		elseif s.msexisting
		s.msexisting = $-1
		s.flags2 = $|MF2_SHADOW
			if not s.msexisting
			s.flags2 = $ & ~MF2_SHADOW
			end
		end
		if (leveltime > 40) and s.msexisting != nil and not s.msexisting
			if (leveltime % 16 == 0) and
			P_SpawnMobj(s.x, s.y, s.z-18*FRACUNIT, MT_IVSP)
			end
			if not s.mslayer1 or (s.mslayer1 and not s.mslayer1.valid)
			s.mslayer1 = P_SpawnMobj(s.x, s.y, s.z, MT_THOK)
			s.mslayer1.eflags = s.eflags
			s.mslayer1.scale = s.scale
			s.mslayer1.angle = s.angle
			s.mslayer1.sprite = SPR_SMME
			s.mslayer1.frame = C|FF_FULLBRIGHT|TR_TRANS10
			elseif s.mslayer1 and s.mslayer1.valid
			s.mslayer1.tics = 3
				if s.state == S_SMSME1
					if s.tics > 4
					s.mslayer1.frame = C|FF_FULLBRIGHT|TR_TRANS10
					else
					s.mslayer1.frame = C|FF_FULLBRIGHT|TR_TRANS20
					end
				else
					if s.tics > 4
					s.mslayer1.frame = C|FF_FULLBRIGHT|TR_TRANS40
					else
					s.mslayer1.frame = C|FF_FULLBRIGHT|TR_TRANS30
					end
				end
			end
			if not s.mslayer2 or (s.mslayer2 and not s.mslayer2.valid)
			s.mslayer2 = P_SpawnMobj(s.x, s.y, s.z, MT_THOK)
			s.mslayer2.eflags = s.eflags
			s.mslayer2.scale = s.scale
			s.mslayer2.angle = s.angle
			s.mslayer2.sprite = SPR_SMME
			s.mslayer2.frame = D|FF_FULLBRIGHT|TR_TRANS40
			elseif s.mslayer2 and s.mslayer2.valid
			s.mslayer2.tics = 3
				if s.state == S_SMSME1
					if s.tics > 4
					s.mslayer2.frame = D|FF_FULLBRIGHT|TR_TRANS40
					else
					s.mslayer2.frame = D|FF_FULLBRIGHT|TR_TRANS60
					end
				else
					if s.tics > 4
					s.mslayer2.frame = D|FF_FULLBRIGHT|TR_TRANS90
					else
					s.mslayer2.frame = D|FF_FULLBRIGHT|TR_TRANS70
					end
				end
			end
		end
		if not s.mozes
			if s.z == s.floorz
			s.z = $+16*FRACUNIT
			end
		s.scale = 2*FRACUNIT
		s.mozes = true
	//	P_SpawnMobj(s.x, s.y, s.z, MT_IVSP)
		end
	end
end, MT_THEMYSTICEMERALD)

local function MECollide(s, v)
	if v and v.valid
		if v.player and v.player.bot
		return false
		end
		if v.smsmsdelay 
			if (v.z > s.z+s.height) or (s.z > v.z+v.height)
			return false
			end
			v.smsmsdelayp = true
			return false
		elseif v.player and v.health
			local p = v.player
					if (p.cmd.buttons & BT_CUSTOM3) and not (p.transformdown and p.transformdown > 1) and (v.skin == "sms")
					and (p.rings >= 25) and not p.lightdashenable
						if (p.lddiscount < 3)
							P_GivePlayerRings(p, -25)
							S_StartSound(nil, sfx_nxitem)
							print(p.name+" just bought lightdash shoes!")
						elseif (p.lddiscount > 2) //Discount! Lucky you!
							P_GivePlayerRings(p, -15)
							S_StartSound(nil, sfx_nxdone)
							print(p.name+" just got a great deal on some lightdash sneakers!")
						end
						CONS_Printf(p, "\x82You unlocked the lightdash!(Custom1) You can also charge the lightspeed attack!")
						p.lightdashenable = 1 p.transformdown = 4
						S_StartSound(s, sfx_s1c5)
						P_FlashPal(p, PAL_MIXUP, 3)
						return false
					end
		end
	  if (v.trymsspawn or not v.checktimer == nil) and s and not (s.msexisting!= nil and s.msexisting == 0) //Gunship and starposts "push" Mystic Emerald
		s.movetms = v
		return false
	  elseif v.player and s
	local p = v.player
		if (v.z > s.z+s.height) or (s.z > v.z+v.height)
			return false
		elseif not p.sms_intoship
			p.smsmeterfiller = true
			if p and v.health and (p.smsmemeter and p.smsmemeter >= 30)
			p.sms_shipready = 2
				if p.sms_shipready
					if (p.cmd.buttons & BT_USE) and not (p.spinhold and (p.spinhold  > 1))
					and not p.sms_intoship
					p.sms_intoship = 35
					return false
					end
				end
			end
		end
	  end
	end
	return false
end

addHook("MobjCollide", MECollide, MT_THEMYSTICEMERALD)
addHook("MobjMoveCollide", MECollide, MT_THEMYSTICEMERALD)

hud.add(function(v, p)
	if not p.mo
	return end
	if p.sms_intoship
	v.drawFill(0, 0, 600, 500, 31|V_SNAPTOTOP|V_SNAPTOLEFT) //Black background
		if p.starsms1x != nil and p.smshudtrans2 //Rising bubbles
		v.drawScaled(p.starsms1x*FRACUNIT, p.starsms1y, FRACUNIT, v.cachePatch("THOKA0"), V_90TRANS, v.getColormap(nil, SKINCOLOR_SUPERGOLD5))
		v.drawScaled(p.starsms2x*FRACUNIT, p.starsms2y, FRACUNIT/2, v.cachePatch("THOKA0"), V_80TRANS, v.getColormap(nil, SKINCOLOR_SUPERRED4))
		v.drawScaled(p.starsms3x*FRACUNIT, p.starsms3y, FRACUNIT, v.cachePatch("THOKA0"), V_70TRANS, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
		v.drawScaled(p.starsms4x*FRACUNIT, p.starsms4y, FRACUNIT/3, v.cachePatch("THOKA0"), V_80TRANS, v.getColormap(nil, SKINCOLOR_SUPERGOLD1))
		v.drawScaled(p.starsms5x*FRACUNIT, p.starsms5y, FRACUNIT/2, v.cachePatch("THOKA0"), V_80TRANS, v.getColormap(nil, SKINCOLOR_SUPERGOLD3))
		v.drawScaled(p.starsms6x*FRACUNIT, p.starsms6y, FRACUNIT/3, v.cachePatch("THOKA0"), V_90TRANS, v.getColormap(nil, SKINCOLOR_SUPERSILVER1))
		v.drawScaled(p.starsms7x*FRACUNIT, p.starsms7y, FRACUNIT, v.cachePatch("THOKA0"), V_80TRANS, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
		v.drawScaled(p.starsms8x*FRACUNIT, p.starsms8y, FRACUNIT/2, v.cachePatch("THOKA0"), V_80TRANS, v.getColormap(nil, SKINCOLOR_SUPERPERIDOT1))
		v.drawScaled(p.starsms9x*FRACUNIT, p.starsms9y, FRACUNIT, v.cachePatch("THOKA0"), V_80TRANS, v.getColormap(nil, SKINCOLOR_SILVER))
		end
		if p.hshh2 != nil
		  if p.smstext1x != nil
			if p.hshh2 != 65355
			//Sonic background artwork and SMSreborn/Super Mystic Sonic text
			
			v.drawScaled(139*FRACUNIT-(p.smshudappearanim*FRACUNIT), -80*FRACUNIT, p.hshh2*3/2, v.cachePatch("SMSMENUA"), V_90TRANS|V_SNAPTORIGHT|V_SNAPTOBOTTOM)
			v.drawScaled(189*FRACUNIT-(p.smshudappearanim*FRACUNIT), 0, p.hshh2, v.cachePatch("SMSMENUA"), V_90TRANS|V_SNAPTORIGHT|V_SNAPTOBOTTOM)
			
			v.drawScaled(p.smstext1x+200*FRACUNIT, 4*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT1"), V_90TRANS|V_SNAPTOTOP|V_SNAPTOLEFT)
			v.drawScaled(p.smstext1x-150*FRACUNIT, 4*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT1"), V_90TRANS|V_SNAPTOTOP|V_SNAPTOLEFT)
			v.drawScaled(p.smstext1x-500*FRACUNIT, 4*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT1"), V_90TRANS|V_SNAPTOTOP|V_SNAPTOLEFT)
			
			v.drawScaled(p.smstext1x*-1+50*FRACUNIT, 180*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT1"), V_90TRANS|V_SNAPTOBOTTOM|V_SNAPTOLEFT)			
			v.drawScaled(p.smstext1x*-1+400*FRACUNIT, 180*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT1"), V_90TRANS|V_SNAPTOBOTTOM|V_SNAPTOLEFT)
			v.drawScaled(p.smstext1x*-1+750*FRACUNIT, 180*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT1"), V_90TRANS|V_SNAPTOBOTTOM|V_SNAPTOLEFT)	
			else
			
			v.drawScaled(696*FRACUNIT-(p.smshudappearanim*FRACUNIT)-(p.smsmenuanim*FRACUNIT), 0, p.hshh2, v.cachePatch("SMSMENUC"), V_70TRANS|V_SNAPTORIGHT|V_SNAPTOBOTTOM)
			v.drawScaled(-148*FRACUNIT+(p.smsmenuanim2*FRACUNIT), 0, p.hshh2, v.cachePatch("SMSMENUC"), V_70TRANS|V_SNAPTOLEFT|V_SNAPTOBOTTOM)
			v.drawScaled(189*FRACUNIT-(p.smshudappearanim*FRACUNIT)+(p.smsmenuanim*FRACUNIT)-160*FRACUNIT+((p.smsmenuanim2*FRACUNIT)/5), 0, p.hshh2, v.cachePatch("SMSMENUA"), V_70TRANS|V_SNAPTORIGHT|V_SNAPTOBOTTOM)
			
			v.drawScaled(p.smstext1x+200*FRACUNIT, 4*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT1"), V_80TRANS|V_SNAPTOTOP|V_SNAPTOLEFT)
			v.drawScaled(p.smstext1x-150*FRACUNIT, 4*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT1"), V_80TRANS|V_SNAPTOTOP|V_SNAPTOLEFT)
			v.drawScaled(p.smstext1x-500*FRACUNIT, 4*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT1"), V_80TRANS|V_SNAPTOTOP|V_SNAPTOLEFT)
			
			v.drawScaled(p.smstext1x*-1+50*FRACUNIT, 180*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT1"), V_80TRANS|V_SNAPTOBOTTOM|V_SNAPTOLEFT)			
			v.drawScaled(p.smstext1x*-1+400*FRACUNIT, 180*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT1"), V_80TRANS|V_SNAPTOBOTTOM|V_SNAPTOLEFT)
			v.drawScaled(p.smstext1x*-1+750*FRACUNIT, 180*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT1"), V_80TRANS|V_SNAPTOBOTTOM|V_SNAPTOLEFT)
			end
		  end
		end
	elseif p.smsmemeter
		v.drawFill(115, 139, 2+(p.smsmemeter*3), 15, 100|V_SNAPTOBOTTOM)
		v.drawFill(115, 145, 2+(p.smsmemeter*3), 9, 101|V_SNAPTOBOTTOM)
		v.drawFill(115, 149, 2+(p.smsmemeter*3), 5, 102|V_SNAPTOBOTTOM)
		v.drawFill(115, 139, 2+(p.smsmemeter*3), 2, 96|V_SNAPTOBOTTOM)
		v.drawFill(115, 152, 2+p.smsmemeter*3, 2, 107|V_SNAPTOBOTTOM)
		v.drawFill(115, 139, 2, 13, 96|V_SNAPTOBOTTOM)
		if p.smsmeterfillery != nil and (p.smsmemeter < 30)
		v.drawScaled((113+(p.smsmemeter*3))*FRACUNIT, (163-p.smsmeterfillery)*FRACUNIT, 40055, v.cachePatch("SSPKA0"), V_30TRANS|V_SNAPTOBOTTOM)
		v.drawScaled((117+(p.smsmemeter*3))*FRACUNIT, (154+p.smsmeterfillery)*FRACUNIT, 55355, v.cachePatch("SSPKA0"), V_10TRANS|V_SNAPTOBOTTOM)
		end
		if (p.smsmemeter > 10)
			if (p.smsmemeter < 20)
			v.drawString(158, 142, "SPIN", V_90TRANS|V_SNAPTOBOTTOM, "center")
			elseif (p.smsmemeter < 25)
			v.drawString(158, 142, "SPIN", V_60TRANS|V_SNAPTOBOTTOM, "center")
			elseif (p.smsmemeter < 30)
			v.drawString(158, 142, "SPIN", V_40TRANS|V_SNAPTOBOTTOM, "center")
			elseif (p.smsmemeter >= 30)
			v.drawString(158, 142, "SPIN", V_20TRANS|V_SNAPTOBOTTOM, "center")
			v.drawFill(205, 139, 2, 13, 98|V_SNAPTOBOTTOM)
			end
		end
	end	
	
	if p.smshudappearanim
	  if p.sms_hudtransf //Changing Colors!
	 	if p.sms_hudtransf == 4
			v.drawFill(0, 0, p.smshudappearanim, 500, 0|V_SNAPTOTOP|V_SNAPTOLEFT) //White background
			if p.menutpos != nil
			v.drawScaled(p.smshudappearanim*FRACUNIT, (p.menutpos*FRACUNIT)-16*FRACUNIT, FRACUNIT, v.cachePatch("SMSMENUT"), V_SNAPTOLEFT|V_SNAPTOTOP, v.getColormap(nil, SKINCOLOR_SUPERSILVER1)) //White Triangles
			else
			v.drawScaled(p.smshudappearanim*FRACUNIT, 0, FRACUNIT, v.cachePatch("SMSMENUT"), V_SNAPTOLEFT|V_SNAPTOTOP, v.getColormap(nil, SKINCOLOR_SUPERSILVER1)) //Triangles
			end
			v.drawFill(70, 208-p.smshudappearanim, 206, 20, 16|V_SNAPTOBOTTOM) //Box around text, middle gray
			v.drawFill(70, 208-p.smshudappearanim, 2, 20, 6|V_SNAPTOBOTTOM)  //Left vertical line
			v.drawFill(274, 208-p.smshudappearanim, 2, 20, 6|V_SNAPTOBOTTOM) //Right vertical line
			v.drawFill(70, 208-p.smshudappearanim, 206, 1, 0|V_SNAPTOBOTTOM)  //Sideways lines
			v.drawFill(70, 209-p.smshudappearanim, 206, 1, 3|V_SNAPTOBOTTOM)
			v.drawFill(70, 228-p.smshudappearanim, 206, 1, 6|V_SNAPTOBOTTOM) 
			v.drawFill(70, 229-p.smshudappearanim, 206, 1, 9|V_SNAPTOBOTTOM)
		else
			v.drawFill(0, 0, p.smshudappearanim, 500, 15|V_SNAPTOTOP|V_SNAPTOLEFT) //Blue background
			if p.menutpos != nil
			v.drawScaled(p.smshudappearanim*FRACUNIT, (p.menutpos*FRACUNIT)-16*FRACUNIT, FRACUNIT, v.cachePatch("SMSMENUT"), V_SNAPTOLEFT|V_SNAPTOTOP, v.getColormap(nil, SKINCOLOR_GREY)) //Grey Triangles
			else
			v.drawScaled(p.smshudappearanim*FRACUNIT, 0, FRACUNIT, v.cachePatch("SMSMENUT"), V_SNAPTOLEFT|V_SNAPTOTOP, v.getColormap(nil, SKINCOLOR_GREY)) //Triangles
			end
			v.drawFill(70, 208-p.smshudappearanim, 206, 20, 26|V_SNAPTOBOTTOM) //Box around text, middle dark gray
			v.drawFill(70, 208-p.smshudappearanim, 2, 20, 11|V_SNAPTOBOTTOM)  //Left vertical line
			v.drawFill(274, 208-p.smshudappearanim, 2, 20, 11|V_SNAPTOBOTTOM) //Right vertical line
			v.drawFill(70, 208-p.smshudappearanim, 206, 1, 6|V_SNAPTOBOTTOM)  //Sideways lines
			v.drawFill(70, 209-p.smshudappearanim, 206, 1, 9|V_SNAPTOBOTTOM)
			v.drawFill(70, 228-p.smshudappearanim, 206, 1, 13|V_SNAPTOBOTTOM) 
			v.drawFill(70, 229-p.smshudappearanim, 206, 1, 15|V_SNAPTOBOTTOM)
		end
	  elseif (p.ssmenuisub and (p.ssmenuisub <= 1 or p.ssmenuisub >= 4))	//Default Blue!
		v.drawFill(0, 0, p.smshudappearanim, 500, 153|V_SNAPTOTOP|V_SNAPTOLEFT) //Blue background
		if p.menutpos != nil
		v.drawScaled(p.smshudappearanim*FRACUNIT, (p.menutpos*FRACUNIT)-16*FRACUNIT, FRACUNIT, v.cachePatch("SMSMENUT"), V_SNAPTOLEFT|V_SNAPTOTOP, v.getColormap(nil, SKINCOLOR_BLUE)) //Triangles
		else
		v.drawScaled(p.smshudappearanim*FRACUNIT, 0, FRACUNIT, v.cachePatch("SMSMENUT"), V_SNAPTOLEFT|V_SNAPTOTOP, v.getColormap(nil, SKINCOLOR_BLUE)) //Triangles
		end
		v.drawFill(70, 208-p.smshudappearanim, 206, 20, 156|V_SNAPTOBOTTOM) //Box around text, middle blue
		v.drawFill(70, 208-p.smshudappearanim, 2, 20, 148|V_SNAPTOBOTTOM)  //Left vertical line
		v.drawFill(274, 208-p.smshudappearanim, 2, 20, 148|V_SNAPTOBOTTOM) //Right vertical line
		v.drawFill(70, 208-p.smshudappearanim, 206, 1, 146|V_SNAPTOBOTTOM)  //Sideways lines
		v.drawFill(70, 209-p.smshudappearanim, 206, 1, 147|V_SNAPTOBOTTOM)
		v.drawFill(70, 228-p.smshudappearanim, 206, 1, 149|V_SNAPTOBOTTOM) 
		v.drawFill(70, 229-p.smshudappearanim, 206, 1, 151|V_SNAPTOBOTTOM)
		
	 elseif (p.ssmenuisub and p.ssmenuisub == 2)	//SMS style yellow!
		v.drawFill(0, 0, p.smshudappearanim, 500, 73|V_SNAPTOTOP|V_SNAPTOLEFT) //Yellow background  
		v.drawFill(0, 0, p.smshudappearanim-10, 500, 74|V_SNAPTOTOP|V_SNAPTOLEFT) //Yellower background	
		v.drawFill(0, 0, p.smshudappearanim-22, 500, 75|V_SNAPTOTOP|V_SNAPTOLEFT) //Yellowest background
		v.drawFill(0, 0, p.smshudappearanim-34, 500, 76|V_SNAPTOTOP|V_SNAPTOLEFT) //Yellowester background
		v.drawFill(0, 0, p.smshudappearanim-46, 500, 77|V_SNAPTOTOP|V_SNAPTOLEFT) //Yellowestest background
		if p.menutpos != nil
		v.drawScaled(p.smshudappearanim*FRACUNIT, (p.menutpos*FRACUNIT)-16*FRACUNIT, FRACUNIT, v.cachePatch("SMSMENUT"), V_SNAPTOLEFT|V_SNAPTOTOP, v.getColormap(nil, SKINCOLOR_SUPERGOLD2)) //Yellow Triangles
		else
		v.drawScaled(p.smshudappearanim*FRACUNIT, 0, FRACUNIT, v.cachePatch("SMSMENUT"), V_SNAPTOLEFT|V_SNAPTOTOP, v.getColormap(nil, SKINCOLOR_SUPERGOLD2)) //Yellow Triangles
		end
			v.drawFill(70, 208-p.smshudappearanim, 206, 20, 70|V_SNAPTOBOTTOM) //Box around text, middle blue
			v.drawFill(70, 208-p.smshudappearanim, 2, 20, 83|V_SNAPTOBOTTOM)  //Left vertical line
			v.drawFill(274, 208-p.smshudappearanim, 2, 20, 83|V_SNAPTOBOTTOM) //Right vertical line
			v.drawFill(70, 208-p.smshudappearanim, 206, 1, 0|V_SNAPTOBOTTOM)  //Sideways lines
			v.drawFill(70, 209-p.smshudappearanim, 206, 1, 80|V_SNAPTOBOTTOM)
			v.drawFill(70, 228-p.smshudappearanim, 206, 1, 83|V_SNAPTOBOTTOM) 
			v.drawFill(70, 229-p.smshudappearanim, 206, 1, 74|V_SNAPTOBOTTOM)
	  elseif (p.ssmenuisub and p.ssmenuisub == 3)	//Red!
	  	v.drawFill(0, 0, p.smshudappearanim, 500, 40|V_SNAPTOTOP|V_SNAPTOLEFT) //RED Background
		if p.menutpos != nil
		v.drawScaled(p.smshudappearanim*FRACUNIT, (p.menutpos*FRACUNIT)-16*FRACUNIT, FRACUNIT, v.cachePatch("SMSMENUT"), V_SNAPTOLEFT|V_SNAPTOTOP, v.getColormap(nil, SKINCOLOR_RED)) //Red Triangles
		else
		v.drawScaled(p.smshudappearanim*FRACUNIT, 0, FRACUNIT, v.cachePatch("SMSMENUT"), V_SNAPTOLEFT|V_SNAPTOTOP, v.getColormap(nil, SKINCOLOR_RED)) //Red Triangles
		end
			v.drawFill(70, 208-p.smshudappearanim, 206, 20, 47|V_SNAPTOBOTTOM) //Box around text, middle blue
			v.drawFill(70, 208-p.smshudappearanim, 2, 20, 37|V_SNAPTOBOTTOM)  //Left vertical line
			v.drawFill(274, 208-p.smshudappearanim, 2, 20, 37|V_SNAPTOBOTTOM) //Right vertical line
			v.drawFill(70, 208-p.smshudappearanim, 206, 1, 32|V_SNAPTOBOTTOM)  //Sideways lines
			v.drawFill(70, 209-p.smshudappearanim, 206, 1, 35|V_SNAPTOBOTTOM)
			v.drawFill(70, 228-p.smshudappearanim, 206, 1, 37|V_SNAPTOBOTTOM) 
			v.drawFill(70, 229-p.smshudappearanim, 206, 1, 43|V_SNAPTOBOTTOM)
	  end
	  //Display these regardless
	  	if not p.sms_intoship
			v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -116*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
			v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -116*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
			v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -116*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
			
			v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
			v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
			v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
		end
	  v.drawFill(286, 242-p.smshudappearanim, 20, 25, 59|V_SNAPTOBOTTOM|V_SNAPTORIGHT) //Spin Notification box
	end
	
	
// _____ ___  ___ _____          _   _  _   _ ______ 
///  ___||  \/  |/  ___|        | | | || | | ||  _  \
//\ `--. | .  . |\ `--.  ______ | |_| || | | || | | |
// `--. \| |\/| | `--. \|______||  _  || | | || | | |
///\__/ /| |  | |/\__/ /        | | | || |_| || |/ / 
//\____/ \_|  |_/\____/         \_| |_/ \___/ |___/  


	
	if p.sms_intoship and p.smshudmenusphere and p.smshudappearanim != nil
		if p.hshh2 != nil
		  if p.smstext2y != nil 
			if p.hshh2 > 105355
			v.drawScaled(6*FRACUNIT, p.smstext2y-174*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT2"), V_70TRANS|V_SNAPTOLEFT)
			v.drawScaled(6*FRACUNIT, p.smstext2y+86*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT2"), V_70TRANS|V_SNAPTOLEFT)
			elseif p.hshh2 > 65355
			v.drawScaled(6*FRACUNIT, p.smstext2y-174*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT2"), V_50TRANS|V_SNAPTOLEFT)
			v.drawScaled(6*FRACUNIT, p.smstext2y+86*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT2"), V_50TRANS|V_SNAPTOLEFT)
			else	
			v.drawScaled(6*FRACUNIT, p.smstext2y-174*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT2"), V_30TRANS|V_SNAPTOLEFT)
			v.drawScaled(6*FRACUNIT, p.smstext2y+86*FRACUNIT, p.hshh2, v.cachePatch("SMSTEXT2"), V_30TRANS|V_SNAPTOLEFT)
			end
		  end
		 end
	v.drawString(288, 244-p.smshudappearanim, "SPIN", V_50TRANS|V_SNAPTOBOTTOM|V_SNAPTORIGHT, "small")
			
		v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -116*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
		v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -116*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
		v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -116*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
		v.drawString(133+p.hsh1*2, -109+(p.smshudappearanim*3)-p.hsh1, "SMS Reborn", V_20TRANS, "center")
			
		v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
		v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
		v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
		v.drawString(132+p.hsh1*2, -45+(p.smshudappearanim*3)-p.hsh1, "Admin Options", V_20TRANS, "center")
		
		if (p.ssmenuisub and p.ssmenuisub == 1) and p.ssmenui1 != nil
		
			if p.ssmenui1 == 1 and not (p.ssmenuisub == 2)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, 58*FRACUNIT, FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
			
				v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -116*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU1"), V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE))
				v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -116*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU2"), p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -116*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU3"), p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				v.drawString(133+p.hsh1*2, -109+(p.smshudappearanim*3)-p.hsh1, "SMS Reborn", V_20TRANS, "center")
			
				v.drawString(75, 212-p.smshudappearanim, "Personalize settings related to Super Mystic Sonic.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				v.drawString(75, 222-p.smshudappearanim, "These options only affect your own character setup.", V_20TRANS|V_SNAPTOBOTTOM, "small")
			elseif p.ssmenui1 == 2 and not (p.ssmenuisub == 2)
				if IsPlayerAdmin(p) or (p == server)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, 122*FRACUNIT, FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU1"), V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE))
				v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU2"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU3"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				else
				v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU1"), V_40TRANS,  v.getColormap(nil, SKINCOLOR_RED))
				v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU2"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_RED))
				v.drawScaled(69*FRACUNIT+(p.hsh1*FRACUNIT*2), -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3)-(p.hsh1*FRACUNIT), 65355, v.cachePatch("SMSMENU3"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_RED))
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, 122*FRACUNIT, FRACUNIT/2, v.cachePatch("SPHRC0"), V_SNAPTOLEFT)
				end
			
				v.drawString(132+p.hsh1*2, -45+(p.smshudappearanim*3)-p.hsh1, "Admin Options", V_20TRANS, "center")
				v.drawString(75, 212-p.smshudappearanim, "Set server-wide options/restrictions related to SMS.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				v.drawString(75, 222-p.smshudappearanim, "These cannot be changed by unverified server joiners.", V_20TRANS|V_SNAPTOBOTTOM, "small")
			end
		end
		
//SMS Reborn Menu	
	
		if (p.ssmenuisub == 2)
		//First page
			if (p.ssmenuisubpage < 5) //SMS colors
			v.drawScaled(40*FRACUNIT, -18*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSADWN"),p.smshudtrans1,  v.getColormap(nil, p.mo.color))
			
			v.drawScaled(61*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU4"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE))
							if not p.smslastcolormenudrop //The great list of shiny SMS colors
								v.drawString(132, -133+(p.smshudappearanim*3), "NO SPECIAL", nil, "center")
							elseif p.smslastcolormenudrop == 1
								v.drawString(132, -133+(p.smshudappearanim*3), "SMS DEFAULT", nil, "center")
							elseif p.smslastcolormenudrop == 2
								v.drawString(132, -133+(p.smshudappearanim*3), "SUPER YELLOW", nil, "center")
							elseif p.smslastcolormenudrop == 3
								v.drawString(132, -133+(p.smshudappearanim*3), "SUPER ORANGE", nil, "center")
							elseif p.smslastcolormenudrop == 4 //Oldschool SMS replaced with emperor. You select oldschool SMS as a static color now.
								v.drawString(132, -133+(p.smshudappearanim*3), "SUPER RED", nil, "center")
							elseif p.smslastcolormenudrop == 5
								v.drawString(132, -133+(p.smshudappearanim*3), "SUPER GREEN", nil, "center")
							elseif p.smslastcolormenudrop == 6
								v.drawString(132, -133+(p.smshudappearanim*3), "SUPER SKY", nil, "center")
							elseif p.smslastcolormenudrop == 7
								v.drawString(132, -133+(p.smshudappearanim*3), "SUPER PURPLE", nil, "center")
							elseif p.smslastcolormenudrop == 8
								v.drawString(132, -133+(p.smshudappearanim*3), "SUPER RUST", nil, "center")
							elseif p.smslastcolormenudrop == 9
								v.drawString(132, -133+(p.smshudappearanim*3), "SUPER TAN", nil, "center")
							elseif p.smslastcolormenudrop == 10
								v.drawString(132, -133+(p.smshudappearanim*3), "CRISIS", nil, "center")
							elseif p.smslastcolormenudrop == 11 //Antimatter
								v.drawString(132, -133+(p.smshudappearanim*3), "ANTIMATTER", nil, "center")
							elseif p.smslastcolormenudrop == 12 //Priest
								v.drawString(132, -133+(p.smshudappearanim*3), "PRIEST", nil, "center")
							elseif p.smslastcolormenudrop == 13 //Hyper Sonic
								v.drawString(132, -133+(p.smshudappearanim*3), "HYPER", nil, "center")
							elseif p.smslastcolormenudrop == 14 //Blue Wave
								v.drawString(132, -133+(p.smshudappearanim*3), "BLUEWAVE", nil, "center")
							elseif p.smslastcolormenudrop == 15 //Arctic Chi
								v.drawString(132, -133+(p.smshudappearanim*3), "ARCTIC CHI", nil, "center")
							elseif p.smslastcolormenudrop == 16 //Ranger
								v.drawString(132, -133+(p.smshudappearanim*3), "RANGER", nil, "center")
							elseif p.smslastcolormenudrop == 17 //Pink Menace
								v.drawString(132, -133+(p.smshudappearanim*3), "PINK MENACE", nil, "center")
							elseif p.smslastcolormenudrop == 18 //Metallic Gold
								v.drawString(132, -133+(p.smshudappearanim*3), "METALLIC", nil, "center")
							elseif p.smslastcolormenudrop == 19 //HazelGlow
								v.drawString(132, -133+(p.smshudappearanim*3), "HAZELGLOW", nil, "center")
							elseif p.smslastcolormenudrop == 20 //Ultra Drive
								v.drawString(132, -133+(p.smshudappearanim*3), "ULTRA DRIVE", nil, "center")
							elseif p.smslastcolormenudrop == 21 //Lapis Vapor
								v.drawString(132, -133+(p.smshudappearanim*3), "LAPIS VAPOR", nil, "center")
							elseif p.smslastcolormenudrop == 22 //Azure Breaker
								v.drawString(132, -133+(p.smshudappearanim*3), "AZURE BREAKER", nil, "center")
							elseif p.smslastcolormenudrop == 23 //EMPEROR
								v.drawString(132, -133+(p.smshudappearanim*3), "EMPEROR", nil, "center")
							elseif p.smslastcolormenudrop == 24 //Base Sonic
								v.drawString(132, -133+(p.smshudappearanim*3), "BASE SONIC", nil, "center")
							elseif p.smslastcolormenudrop == 25 //Mystical
								v.drawString(132, -133+(p.smshudappearanim*3), "MYSTICAL", nil, "center")
							elseif p.smslastcolormenudrop == 26 //Trans-Formation
								v.drawString(132, -133+(p.smshudappearanim*3), "TRANS-FORMATION", nil, "center")	
							elseif p.smslastcolormenudrop == 27 //FlameBreaker
								v.drawString(132, -133+(p.smshudappearanim*3), "FLAMEBREAKER", nil, "center")	
							elseif p.smslastcolormenudrop == 28 //Infinity's End
								v.drawString(133, -133+(p.smshudappearanim*3), "INFINITY'S END", nil, "center")									
							end
			if p.smscdemo			
			v.drawScaled(234*FRACUNIT, -118*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh/2, v.cachePatch("SMSOS2S3"),nil,  v.getColormap(nil, p.mo.color))
			else
			v.drawScaled(234*FRACUNIT, -118*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh/2, v.cachePatch("SMSOS2S3"),V_80TRANS,  v.getColormap(nil, SKINCOLOR_GREY))
			end
			
			v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_GOLD)) 
			v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD5))
			v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD5))
			v.drawString(132, -98+(p.smshudappearanim*3), "Golden Shoes", V_20TRANS, "center")
			v.drawScaled(234*FRACUNIT, -83*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh*2/3, v.cachePatch("RINGA0"))
			if p.hshh == 65355
			v.drawString(234, -97+(p.smshudappearanim*3), "25", V_20TRANS, "center")
			end
			
			v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
			v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
			v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
			v.drawString(132, -63+(p.smshudappearanim*3), "Homing Thok", V_20TRANS, "center")
			if p.sms_hudflipc and (p.ssmenuisubpage == 3)
				v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))	
			else
				if not p.smsanaloghome
				v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_RED))
				if p.hshh == 65355 and not (p.sms_hudflipc and (p.ssmenuisubpage == 3)) v.drawString(234, -62+(p.smshudappearanim*3), "OFF", V_20TRANS, "center") end
				else
				v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_PERIDOT))
				if p.hshh == 65355 v.drawString(233, -62+(p.smshudappearanim*3), "ON", V_20TRANS, "center") end
				end
				v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
				v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
			end
			
			
			v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
			v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
			v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
			v.drawString(133, -28+(p.smshudappearanim*3), "Footsweep Attack", V_20TRANS, "center")
			if p.sms_hudflipc and (p.ssmenuisubpage == 4)
				v.drawScaled(221*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))	
			else
				if not p.smsanalogsweep
				v.drawScaled(221*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_RED))
				if p.hshh == 65355 and not (p.sms_hudflipc and (p.ssmenuisubpage == 4)) v.drawString(234, -27+(p.smshudappearanim*3), "OFF", V_20TRANS, "center") end
				else
				v.drawScaled(221*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_PERIDOT))
				if p.hshh == 65355 v.drawString(233, -27+(p.smshudappearanim*3), "ON", V_20TRANS, "center") end
				end
				v.drawScaled(221*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
				v.drawScaled(221*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
			end
			//Getting into specifics, 1-4
				if (p.ssmenuisubpage == 1)
				v.drawScaled(61*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU4"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_SUPERSILVER1))
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -122*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawString(75, 212-p.smshudappearanim, "Select exclusive glowing color patterns for SMS.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				v.drawString(75, 222-p.smshudappearanim, "Press jump to apply. Are unused in team games.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				
				elseif (p.ssmenuisubpage == 2)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -88*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_70TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERSILVER1))
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD1))
				v.drawString(132, -98+(p.smshudappearanim*3), "GOLDEN SHOES", nil, "center")
				v.drawString(75, 212-p.smshudappearanim, "Buy shoes for the LightDash and Lightspeed Attack.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				v.drawString(75, 222-p.smshudappearanim, "PS: Quick-buy these with C3 at the Mystic Emerald!", V_20TRANS|V_SNAPTOBOTTOM, "small")
				elseif (p.ssmenuisubpage == 3)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				v.drawString(132, -63+(p.smshudappearanim*3), "HOMING THOK", nil, "center")
				v.drawString(75, 212-p.smshudappearanim, "Toggle analog homing thoks for standard/legacy", V_20TRANS|V_SNAPTOBOTTOM, "small")
				v.drawString(75, 222-p.smshudappearanim, "control schemes. Thok in the movement key direction.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				elseif (p.ssmenuisubpage == 4)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -17*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				v.drawString(133, -28+(p.smshudappearanim*3), "FOOTSWEEP ATTACK", nil, "center")
				v.drawString(75, 212-p.smshudappearanim, "Toggle analog footsweeps for standard/legacy", V_20TRANS|V_SNAPTOBOTTOM, "small")
				v.drawString(75, 222-p.smshudappearanim, "control schemes. Rush in the movement key direction.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				end
		//Second Page
			elseif (p.ssmenuisubpage < 9)
			
			v.drawScaled(40*FRACUNIT, -142*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSAMUP"),p.smshudtrans1,  v.getColormap(nil, p.mo.color))			
			v.drawScaled(40*FRACUNIT, -18*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSADWN"),p.smshudtrans1,  v.getColormap(nil, p.mo.color))
			
			v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
			v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
			v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
				v.drawString(132, -133+(p.smshudappearanim*3), "SMS Quakes", V_20TRANS, "center")
				if p.sms_hudflipc and (p.ssmenuisubpage == 5)
				v.drawScaled(221*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))	
				else
					if p.nosmsquakespls
					v.drawScaled(221*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_RED))
					if p.hshh == 65355 and not (p.sms_hudflipc and (p.ssmenuisubpage == 5)) v.drawString(234, -132+(p.smshudappearanim*3), "OFF", V_20TRANS, "center") end
					else
					v.drawScaled(221*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_PERIDOT))
					if p.hshh == 65355 v.drawString(233, -132+(p.smshudappearanim*3), "ON", V_20TRANS, "center") end
					end
				v.drawScaled(221*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
				v.drawScaled(221*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
				end
				
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
				v.drawString(133, -98+(p.smshudappearanim*3), "Simple Haymaker", V_20TRANS, "center")
				if p.sms_hudflipc and (p.ssmenuisubpage == 6)
					v.drawScaled(221*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))	
				else
					if not p.smseasyhaymaker
					v.drawScaled(221*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_RED))
					if p.hshh == 65355 and not (p.sms_hudflipc and (p.ssmenuisubpage == 6)) v.drawString(234, -97+(p.smshudappearanim*3), "OFF", V_20TRANS, "center") end
					else
					v.drawScaled(221*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_PERIDOT))
					if p.hshh == 65355 v.drawString(233, -97+(p.smshudappearanim*3), "ON", V_20TRANS, "center") end
					end
					v.drawScaled(221*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
					v.drawScaled(221*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
				end
				
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
				v.drawString(132, -63+(p.smshudappearanim*3), "Pick Me Up", V_20TRANS, "center")
				if p.sms_hudflipc and (p.ssmenuisubpage == 7)
				v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))	
				else
					if not p.smsdontgrabme
					v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_ORANGE))
					if p.hshh == 65355 and not (p.sms_hudflipc and (p.ssmenuisubpage == 7)) v.drawString(233, -62+(p.smshudappearanim*3), "3S", V_20TRANS, "center") end
					elseif p.smsdontgrabme and p.smsdontgrabme == 1
					v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_RED))
					if p.hshh == 65355 and not (p.sms_hudflipc and (p.ssmenuisubpage == 7))v.drawString(234, -62+(p.smshudappearanim*3), "OFF", V_20TRANS, "center") end
					else
					v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_PERIDOT))
					if p.hshh == 65355 v.drawString(233, -62+(p.smshudappearanim*3), "ON", V_20TRANS, "center") end
					end
					v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
					v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
				end
				
			v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
			v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
			v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
				v.drawString(133, -28+(p.smshudappearanim*3), "Controls Aid", V_20TRANS, "center")		
			if p.sms_hudflipc and (p.ssmenuisubpage == 8)
				v.drawScaled(221*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))	
			else
				if not p.smstutorial
				v.drawScaled(221*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_RED))
				if p.hshh == 65355 and not (p.sms_hudflipc and (p.ssmenuisubpage == 8)) v.drawString(234, -27+(p.smshudappearanim*3), "OFF", V_20TRANS, "center") end
				else
				v.drawScaled(221*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_PERIDOT))
				if p.hshh == 65355 v.drawString(233, -27+(p.smshudappearanim*3), "ON", V_20TRANS, "center") end
				end
				v.drawScaled(221*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
				v.drawScaled(221*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
			end	
				
			//Getting into specifics, 5-8				
				if (p.ssmenuisubpage == 5)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -122*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				v.drawString(132, -133+(p.smshudappearanim*3), "SMS QUAKES", nil, "center")
				v.drawString(75, 212-p.smshudappearanim, "Turning this off makes most quakes generated by SMS", V_20TRANS|V_SNAPTOBOTTOM, "small")
				v.drawString(75, 222-p.smshudappearanim, "not display for you. Useful if you're sensitive.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				elseif (p.ssmenuisubpage == 6)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -88*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				v.drawString(133, -98+(p.smshudappearanim*3), "SIMPLE HAYMAKER", nil, "center")
				v.drawString(75, 212-p.smshudappearanim, "Turn this on to execute airborne haymakers with", V_20TRANS|V_SNAPTOBOTTOM, "small")
				v.drawString(75, 222-p.smshudappearanim, "only a press of C2, without holding back and C1.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				elseif (p.ssmenuisubpage == 7)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				v.drawString(132, -63+(p.smshudappearanim*3), "PICK ME UP", nil, "center")
				v.drawString(75, 212-p.smshudappearanim, "Toggle whether SMS players can pick you up or not.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				v.drawString(75, 222-p.smshudappearanim, "By default allowed after not moving for 3 seconds.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				elseif (p.ssmenuisubpage == 8)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -17*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				v.drawString(133, -28+(p.smshudappearanim*3), "CONTROLS AID", nil, "center")
				v.drawString(75, 212-p.smshudappearanim, "Turns on a context-sensitive controls aid, which", V_20TRANS|V_SNAPTOBOTTOM, "small")
				v.drawString(75, 222-p.smshudappearanim, "displays every available command for SMS each moment.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				end
		//Third page of SMSreborn menu		
			elseif (p.ssmenuisubpage > 8)
			
				v.drawScaled(40*FRACUNIT, -142*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSAMUP"),p.smshudtrans1,  v.getColormap(nil, p.mo.color))
			
				v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
				v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
				v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
					v.drawString(132, -133+(p.smshudappearanim*3), "LEGEND MODE", V_20TRANS, "center")
				if p.sms_hudflipc and (p.ssmenuisubpage == 9)
					v.drawScaled(221*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))	
				else
					if not p.smsblastboost
					v.drawScaled(221*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_RED))
					if p.hshh == 65355 and not (p.sms_hudflipc and (p.ssmenuisubpage == 9)) v.drawString(234, -132+(p.smshudappearanim*3), "OFF", V_20TRANS, "center") end
					else
					v.drawScaled(221*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_PERIDOT))
					if p.hshh == 65355 v.drawString(233, -132+(p.smshudappearanim*3), "ON", V_20TRANS, "center") end
					end
					v.drawScaled(221*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
					v.drawScaled(221*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
				end
				
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
					v.drawString(133, -98+(p.smshudappearanim*3), "Music themes", V_20TRANS, "center")
				if p.sms_hudflipc and (p.ssmenuisubpage == 10)
				v.drawScaled(221*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))	
				else
					if p.nohmstheme
					v.drawScaled(221*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_RED))
					if p.hshh == 65355 and not (p.sms_hudflipc and (p.ssmenuisubpage == 10)) v.drawString(234, -97+(p.smshudappearanim*3), "OFF", V_20TRANS, "center") end
					else
					v.drawScaled(221*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_PERIDOT))
					if p.hshh == 65355 v.drawString(233, -97+(p.smshudappearanim*3), "ON", V_20TRANS, "center") end
					end
					v.drawScaled(221*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
					v.drawScaled(221*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
				end			
				
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
					v.drawString(133, -63+(p.smshudappearanim*3), "H. MOMENTUM", V_20TRANS, "center")
				if p.sms_hudflipc and (p.ssmenuisubpage == 11)
				v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))	
				else
					if not p.autoc1mom
					v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_PERIDOT))
					if p.hshh == 65355 and not (p.sms_hudflipc and (p.ssmenuisubpage == 10)) v.drawString(234, -62+(p.smshudappearanim*3), "C1", V_20TRANS, "center") end
					elseif p.autoc1mom == 1
					v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_ORANGE))
					if p.hshh == 65355 v.drawString(234, -62+(p.smshudappearanim*3), "AUTO", V_20TRANS, "center") end
					else
					v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_BLUE))
					if p.hshh == 65355 v.drawString(233, -62+(p.smshudappearanim*3), "KEY", V_20TRANS, "center") end
					end
					v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
					v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
				end	
				
				v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_SILVER)) 
				v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_WHITE))
				v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERSILVER3))
				v.drawString(133, -28+(p.smshudappearanim*3), "SAVE CONFIG", V_20TRANS, "center")
				
			//Getting into specifics, 9-11	
				if (p.ssmenuisubpage == 9)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -122*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				v.drawString(132, -133+(p.smshudappearanim*3), "LEGEND MODE", nil, "center")
				v.drawString(75, 212-p.smshudappearanim, "Play similarly to the old school SMS releases", V_20TRANS|V_SNAPTOBOTTOM, "small")
				v.drawString(75, 222-p.smshudappearanim, "in exchange for most of your SMSreborn abilities.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				elseif (p.ssmenuisubpage == 10)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -88*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				v.drawString(133, -98+(p.smshudappearanim*3), "MUSIC THEMES", nil, "center")
				v.drawString(75, 212-p.smshudappearanim, "Toggle whether the HMS, HMS panic(Match modes)", V_20TRANS|V_SNAPTOBOTTOM, "small")
				v.drawString(75, 222-p.smshudappearanim, "and runshoes event themes will play for you.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				elseif (p.ssmenuisubpage == 11)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				v.drawString(133, -63+(p.smshudappearanim*3), "H. MOMENTUM", nil, "center")
				v.drawString(75, 212-p.smshudappearanim, "Retain momentum from your homing attacks either by", V_20TRANS|V_SNAPTOBOTTOM, "small")
				v.drawString(75, 222-p.smshudappearanim, "holding C1, a forward direction, or automatically.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				
				elseif (p.ssmenuisubpage == 12)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -17*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERSILVER3))
				v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawString(133, -28+(p.smshudappearanim*3), "SAVE CONFIG", nil, "center")
				v.drawString(75, 212-p.smshudappearanim, "Save your preferences as a code to your logs. You'll", V_20TRANS|V_SNAPTOBOTTOM, "small")
				v.drawString(75, 222-p.smshudappearanim, "be given instructions how to auto-load these.", V_20TRANS|V_SNAPTOBOTTOM, "small")	
				end
			end
			
//Admin Options Menu	

		elseif (p.ssmenuisub == 3) and p.smsbcolor
		
			if (p.ssmenuisubpage < 5) //Super Mystic
			
			v.drawScaled(40*FRACUNIT, -18*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSADWN"),p.smshudtrans1,  v.getColormap(nil, p.mo.color))
			
			v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_SUPERGOLD4)) 
			v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD1))
			v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERSILVER1))
			v.drawString(132, -133+(p.smshudappearanim*3), "Super Mystic", V_20TRANS, "center")
			
			
			v.drawScaled(221*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			v.drawScaled(221*FRACUNIT+34*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			if (p.ssmenuisubpage == 1) and not (p.sms_hudflipc2) and p.hshh == 65355
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT) , -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, p.smsbcolor))
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
				v.drawString(234+(p.ssmenuidrop*34), -133+(p.smshudappearanim*3), p.ssmenuidrop+1, V_20TRANS, "center")
			end
			
			v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BONE)) 
			v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
			v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERSKY1))
			v.drawString(132, -98+(p.smshudappearanim*3), "Hyper Mystic", V_20TRANS, "center")
			
			v.drawScaled(221*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			v.drawScaled(221*FRACUNIT+34*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			v.drawScaled(221*FRACUNIT+68*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			if (p.ssmenuisubpage == 2) and not (p.sms_hudflipc2) and p.hshh == 65355
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT) , -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, p.smsbcolor))
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
				v.drawString(234+(p.ssmenuidrop*34), -98+(p.smshudappearanim*3), p.ssmenuidrop+1, V_20TRANS, "center")
			end
			
			
			v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
			v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
			v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
			v.drawString(132, -63+(p.smshudappearanim*3), "Power Share", V_20TRANS, "center")
			
			v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			v.drawScaled(221*FRACUNIT+34*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			v.drawScaled(221*FRACUNIT+68*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			if (p.ssmenuisubpage == 3) and not (p.sms_hudflipc2) and p.hshh == 65355
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT) , -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, p.smsbcolor))
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
				v.drawString(234+(p.ssmenuidrop*34), -63+(p.smshudappearanim*3), p.ssmenuidrop+1, V_20TRANS, "center")
			end
			
			v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
			v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
			v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
			v.drawString(133, -28+(p.smshudappearanim*3), "SMS Graphics", V_20TRANS, "center")
			
			v.drawScaled(221*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			v.drawScaled(221*FRACUNIT+34*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			v.drawScaled(221*FRACUNIT+68*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			if (p.ssmenuisubpage == 4) and not (p.sms_hudflipc2) and p.hshh == 65355
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT) , -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, p.smsbcolor))
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
				v.drawString(234+(p.ssmenuidrop*34), -28+(p.smshudappearanim*3), p.ssmenuidrop+1, V_20TRANS, "center")
			end
		//Getting into specifics, 1-4 : Menu 3	
				if (p.ssmenuisubpage == 1)
				v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_80TRANS,  v.getColormap(nil, SKINCOLOR_SUPERSILVER1)) 
				v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_RED))
				v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_RED))
				v.drawString(132, -133+(p.smshudappearanim*3), "SUPER MYSTIC", nil, "center")
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -122*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
					if not p.ssmenuidrop
					v.drawString(75, 212-p.smshudappearanim, "\x83"+"[Free]"+"\x80 Allow players to go Super Mystic through", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "transforming, or become SMS as seperate character.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					else
					v.drawString(75, 212-p.smshudappearanim, "\x87"+"[Transform-Only]"+"\x80 Players may only go Super Mystic", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "by transforming from any other version of Sonic.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					end
				elseif (p.ssmenuisubpage == 2)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -88*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_80TRANS,  v.getColormap(nil, SKINCOLOR_SUPERGOLD1)) 
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_RED))
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_RED))
				v.drawString(132, -98+(p.smshudappearanim*3), "HYPER MYSTIC", nil, "center")
					if not p.ssmenuidrop
					v.drawString(75, 212-p.smshudappearanim, "\x83"+"[Free]"+"\x80 Allow access to Hyper Mystic Sonic", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "freely. The Chaos Emeralds are irrelevant.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					elseif p.ssmenuidrop and p.ssmenuidrop == 1
					v.drawString(75, 212-p.smshudappearanim, "\x84"+"[All-Emeralds]"+"\x80 Allow access to Hyper Mystic Sonic", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "only when all 7 Chaos Emeralds are collected in coop.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					else
					v.drawString(75, 212-p.smshudappearanim, "\x85"+"[No-HMS]"+"\x80 Don't allow players to go Hyper Mystic.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "This restriction does not apply in Match/CTF.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					end
				elseif (p.ssmenuisubpage == 3)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				v.drawString(132, -63+(p.smshudappearanim*3), "POWER SHARE", nil, "center")
					if not p.ssmenuidrop
					v.drawString(75, 212-p.smshudappearanim, "\x83"+"[Free]"+"\x80 SMS can powershare by holding C3. Other", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "characters gain access to a special 'mystic' superform.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					elseif p.ssmenuidrop and p.ssmenuidrop == 1
					v.drawString(75, 212-p.smshudappearanim, "\x84"+"[All-Emeralds]"+"\x80 SMS can powershare only when", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "all 7 Chaos Emeralds are already collected.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					else
					v.drawString(75, 212-p.smshudappearanim, "\x85"+"[No-Powershare]"+"\x80 Don't allow SMS to share power", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "with anyone.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					end
				elseif (p.ssmenuisubpage == 4)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -17*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				v.drawString(133, -28+(p.smshudappearanim*3), "SMS GRAPHICS", nil, "center")
					if not p.ssmenuidrop
					v.drawString(75, 212-p.smshudappearanim, "\x83"+"[ALL]"+"\x80 All SMSreborn particles/graphics display.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "If a player receives too much lag, try lowering this.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					elseif p.ssmenuidrop and p.ssmenuidrop == 1
					v.drawString(75, 212-p.smshudappearanim, "\x87"+"[MEDIUM]"+"\x80 The more intensive effects are removed.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "Only purely visual effects are removed.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					else
					v.drawString(75, 212-p.smshudappearanim, "\x85"+"[LOW]"+"\x80 A ton of particles and effects are removed.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "This includes a few that mildly affect gameplay.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					end
				end
			//Page 2 of Admin Menu
			elseif (p.ssmenuisubpage < 9)
			
			v.drawScaled(40*FRACUNIT, -18*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSADWN"),p.smshudtrans1,  v.getColormap(nil, p.mo.color))
			v.drawScaled(40*FRACUNIT, -142*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSAMUP"),p.smshudtrans1,  v.getColormap(nil, p.mo.color))
			
			v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
			v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
			v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
				v.drawString(132, -133+(p.smshudappearanim*3), "Circuit/Race", V_20TRANS, "center")
				
			v.drawScaled(221*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			v.drawScaled(221*FRACUNIT+34*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			v.drawScaled(221*FRACUNIT+68*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			if (p.ssmenuisubpage == 5) and not (p.sms_hudflipc2) and p.hshh == 65355
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT) , -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, p.smsbcolor))
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
				v.drawString(234+(p.ssmenuidrop*34), -133+(p.smshudappearanim*3), p.ssmenuidrop+1, V_20TRANS, "center")
			end
				
			v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
			v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
			v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
				v.drawString(132, -98+(p.smshudappearanim*3), "MATCH/CTF", V_20TRANS, "center")
				
			v.drawScaled(221*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			v.drawScaled(221*FRACUNIT+34*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			if (p.ssmenuisubpage == 6) and not (p.sms_hudflipc2) and p.hshh == 65355
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT) , -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, p.smsbcolor))
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
				v.drawString(234+(p.ssmenuidrop*34), -98+(p.smshudappearanim*3), p.ssmenuidrop+1, V_20TRANS, "center")
			end				
				
			v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
			v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
			v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
				v.drawString(132, -63+(p.smshudappearanim*3), "BattleMod", V_20TRANS, "center")
			v.drawScaled(221*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			v.drawScaled(221*FRACUNIT+34*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			v.drawScaled(221*FRACUNIT+68*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
			if (p.ssmenuisubpage == 7) and not (p.sms_hudflipc2) and p.hshh == 65355
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT) , -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, p.smsbcolor))
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
				v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
				v.drawString(234+(p.ssmenuidrop*34), -63+(p.smshudappearanim*3), p.ssmenuidrop+1, V_20TRANS, "center")
			end				
		
		
		
		
			//HMS limit
			v.drawScaled(61*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU4"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE))
			v.drawScaled(221*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, SKINCOLOR_LAVENDER))
			v.drawScaled(221*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_BLUE))
			v.drawScaled(221*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_PURPLE))
			
			v.drawString(132, -28+(p.smshudappearanim*3), "HMS LIMIT", nil, "center")
			v.drawString(234, -27+(p.smshudappearanim*3), p.hmsmlimit, nil, "center")
	
	
			//Getting into specifics, 5-8: Menu 3	
				if (p.ssmenuisubpage == 5)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -122*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				v.drawString(132, -133+(p.smshudappearanim*3), "CIRCUIT/RACE", nil, "center")
					if not p.ssmenuidrop
					v.drawString(75, 212-p.smshudappearanim, "\x83"+"[Free]"+"\x80 SMS is allowed to race.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "At this point everyone should be SMS to stand a chance.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					elseif p.ssmenuidrop and p.ssmenuidrop == 1
					v.drawString(75, 212-p.smshudappearanim, "\x82"+"[All-Super]"+"\x80 Non-SMS players receive shared power", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "to compensate a bit for SMS' overwhelming speed.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					else
					v.drawString(75, 212-p.smshudappearanim, "\x85"+"[No-SMS]"+"\x80 SMS is disqualified from the races.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "", V_20TRANS|V_SNAPTOBOTTOM, "small")
					end
				elseif (p.ssmenuisubpage == 6)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -88*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				v.drawString(132, -98+(p.smshudappearanim*3), "MATCH/CTF", nil, "center")
					if not p.ssmenuidrop
					v.drawString(75, 212-p.smshudappearanim, "\x83"+"[Free]"+"\x80 SMS can be picked in Match&CTF. He can't use", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "weapons, is nerfed, and his abilities drain rings.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					else
					v.drawString(75, 212-p.smshudappearanim, "\x85"+"[No-SMS]"+"\x80 SMS is disqualified from Match and CTF.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "", V_20TRANS|V_SNAPTOBOTTOM, "small")
					end				
				elseif (p.ssmenuisubpage == 7)
				v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -52*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
				v.drawScaled(69*FRACUNIT, -70*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
				v.drawString(132, -63+(p.smshudappearanim*3), "BATTLEMOD", nil, "center")
					if not p.ssmenuidrop
					v.drawString(75, 212-p.smshudappearanim, "\x82"+"[Ability]"+"\x80 Pick SMS to become a weaker Sonic with the", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "Super Mystic transformation as his special ability!", V_20TRANS|V_SNAPTOBOTTOM, "small")
					elseif p.ssmenuidrop and p.ssmenuidrop == 1
					v.drawString(75, 212-p.smshudappearanim, "\x83"+"[Free]"+"\x80 SMS can be picked in 'Battle Mod' modes.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "Perhaps good if you're looking for an all-SMS match?", V_20TRANS|V_SNAPTOBOTTOM, "small")
					else
					v.drawString(75, 212-p.smshudappearanim, "\x85"+"[No-SMS]"+"\x80 SMS is disqualified from Battle Mod.", V_20TRANS|V_SNAPTOBOTTOM, "small")
					v.drawString(75, 222-p.smshudappearanim, "", V_20TRANS|V_SNAPTOBOTTOM, "small")
					end
					
				elseif (p.ssmenuisubpage == 8) //Hyper Mystic Limit

				v.drawScaled(61*FRACUNIT, -35*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU4"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_SUPERSILVER1))
				v.drawString(75, 212-p.smshudappearanim, "\x80"+"Select how many players can go Hyper Mystic at once.", V_20TRANS|V_SNAPTOBOTTOM, "small")
				v.drawString(75, 222-p.smshudappearanim, "Too many will strain performance.\x83 Default limit is 1.", V_20TRANS|V_SNAPTOBOTTOM, "small")





				end
				//Page 3 of the Admin Menu
			elseif (p.ssmenuisubpage > 8)
			
			
					v.drawScaled(40*FRACUNIT, -142*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSAMUP"),p.smshudtrans1,  v.getColormap(nil, p.mo.color))
					
					v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_RED)) 
					v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_ORANGE))
					v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERORANGE5))
					v.drawString(133, -133+(p.smshudappearanim*3), "Mystic Emerald", V_20TRANS, "center")
					
					v.drawScaled(221*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
					v.drawScaled(221*FRACUNIT+34*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
					if (p.ssmenuisubpage == 9) and not (p.sms_hudflipc2) and p.hshh == 65355
						v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT) , -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, p.smsbcolor))
						v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
						v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
						v.drawString(234+(p.ssmenuidrop*34), -133+(p.smshudappearanim*3), p.ssmenuidrop+1, V_20TRANS, "center")
					end
					
					v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_10TRANS,  v.getColormap(nil, SKINCOLOR_BLUE)) 
					v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SKY))
					v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SKY))
					v.drawString(133, -98+(p.smshudappearanim*3), "Pulse Colors", V_20TRANS, "center")
					
					v.drawScaled(221*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
					v.drawScaled(221*FRACUNIT+34*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENUF"), nil,  v.getColormap(nil, SKINCOLOR_CARBON))
					if (p.ssmenuisubpage == 10) and not (p.sms_hudflipc2) and p.hshh == 65355
						v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT) , -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU5"), nil,  v.getColormap(nil, p.smsbcolor))
						v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU7"),p.smshudtrans3,  v.getColormap(nil, SKINCOLOR_SUPERSILVER2))
						v.drawScaled(221*FRACUNIT+(p.ssmenuidrop*34*FRACUNIT), -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU6"),p.smshudtrans2,  v.getColormap(nil, SKINCOLOR_BLACK))
						v.drawString(234+(p.ssmenuidrop*34), -98+(p.smshudappearanim*3), p.ssmenuidrop+1, V_20TRANS, "center")
					end					
					
				 //Specifics of page 3	
					if (p.ssmenuisubpage == 9) 
					v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -122*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
					v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
					v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
					v.drawScaled(69*FRACUNIT, -140*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
					v.drawString(133, -133+(p.smshudappearanim*3), "MYSTIC EMERALD", nil, "center")
						if not p.ssmenuidrop
						v.drawString(75, 212-p.smshudappearanim, "\x83"+"[ON]"+"\x80 Enables the Mystic Emerald's appearance. Allows", V_20TRANS|V_SNAPTOBOTTOM, "small")
						v.drawString(75, 222-p.smshudappearanim, "easy access into the SMSreborn menu for all players.", V_20TRANS|V_SNAPTOBOTTOM, "small")
						else
						v.drawString(75, 212-p.smshudappearanim, "\x85"+"[OFF]"+"\x80 Disables the Mystic Emerald's appearance. Bring", V_20TRANS|V_SNAPTOBOTTOM, "small")
						v.drawString(75, 222-p.smshudappearanim, "this menu up again with the"+"\x82"+" 'SMSmenu'"+"\x80"+" console command.", V_20TRANS|V_SNAPTOBOTTOM, "small")
						end
					elseif (p.ssmenuisubpage == 10) 
					v.drawScaled((p.smshudappearanim-22)*FRACUNIT, -87*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), FRACUNIT/2, v.cachePatch(p.smshudmenusphere), V_SNAPTOLEFT)
					v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU1"),V_90TRANS,  v.getColormap(nil, SKINCOLOR_WHITE)) 
					v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU2"), p.smshudtrans1, v.getColormap(nil, SKINCOLOR_SUPERGOLD2))
					v.drawScaled(69*FRACUNIT, -105*FRACUNIT+(p.smshudappearanim*FRACUNIT*3), p.hshh, v.cachePatch("SMSMENU3"), p.smshudtrans2, v.getColormap(nil, SKINCOLOR_SUPERGOLD4))
					v.drawString(133, -98+(p.smshudappearanim*3), "PULSE COLORS", nil, "center")
						if not p.ssmenuidrop
						v.drawString(75, 212-p.smshudappearanim, "\x83"+"[ON]"+"\x80 Enables players to select the pulsing colors", V_20TRANS|V_SNAPTOBOTTOM, "small")
						v.drawString(75, 222-p.smshudappearanim, "in the SMSreborn menu. Might be hard on SRB2's netcode.", V_20TRANS|V_SNAPTOBOTTOM, "small")
						else
						v.drawString(75, 212-p.smshudappearanim, "\x85"+"[OFF]"+"\x80 Disables SMS pulsing colors. Experimental!", V_20TRANS|V_SNAPTOBOTTOM, "small")
						v.drawString(75, 222-p.smshudappearanim, "May be gentler on netcode. Use if experiencing resyncs!", V_20TRANS|V_SNAPTOBOTTOM, "small")
						end
					end
					
					
			
			end
	/*	elseif p.ssmenuisub == 241 //Save Config Tutorial text
			v.drawString(70, 112-p.smshudappearanim, "\x83"+"[1]"+"\x80 Exit SRB2.", V_20TRANS|V_SNAPTOBOTTOM, "small")
			v.drawString(70, 122-p.smshudappearanim, "\x83"+"[2]"+"\x80 Go into SRB2 folder > Go into Logs folder.", V_20TRANS|V_SNAPTOBOTTOM, "small")
			v.drawString(70, 132-p.smshudappearanim, "\x83"+"[3]"+"\x80 Open your most recent log txt. Find the code at the bottom.", V_20TRANS|V_SNAPTOBOTTOM, "small")
			v.drawString(70, 142-p.smshudappearanim, "\x83"+"[4]"+"\x80 Copy&Paste code into SMSreborn.cfg with notepad.", V_20TRANS|V_SNAPTOBOTTOM, "small")
			v.drawString(75, 212-p.smshudappearanim, "Download SMSreborn.cfg from the SRB2 MB if it doesn't", V_20TRANS|V_SNAPTOBOTTOM, "small")
			v.drawString(75, 222-p.smshudappearanim, "exist already, or create it with notepad.", V_20TRANS|V_SNAPTOBOTTOM, "small")
			v.drawFill(286, 242-p.smshudappearanim, 20, 25, 59|V_SNAPTOBOTTOM|V_SNAPTORIGHT) //Spin Notification box
	  		v.drawString(288, 244-p.smshudappearanim, "SPIN", V_50TRANS|V_SNAPTOBOTTOM|V_SNAPTORIGHT, "small")			*/	
		end
	
	end
end)

addHook("SpinSpecial", function(p)
	if p
	and (p.sms_intoship or p.sms_shipready or (p.sms_dodging and p.sms_dodging > 3) or p.mo and (p.mo.tnospina or p.mo.dodgeoh)) //No special abilities when in the menu
	return true
	end
end)
//Ridiculously long command for autoloading. Practically requires copy&paste.
COM_AddCommand("SMSrebornautoconfig", function(p, a0, a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,x1)
/*if not a0 and a0 == "SMSrebornautoconfig"
return end */
/*if not p.specialloadpermission //basic check
CONS_Printf(p, "\x85"+"This command's for auto-loading. Don't use it during runtime.")
return end */
a1 = tonumber(a1) //Turn all of you to numbers!
a2 = tonumber(a2)
a3 = tonumber(a3)
a4 = tonumber(a4)
a5 = tonumber(a5)
a6 = tonumber(a6)
a7 = tonumber(a7)
a8 = tonumber(a8)
a9 = tonumber(a9)
a10 = tonumber(a10)
a11 = tonumber(a11)
a12 = tonumber(a12)
a13 = tonumber(a13)
a14 = tonumber(a14)
a15 = tonumber(a15)
a16 = tonumber(a16)
a17 = tonumber(a17)
a18 = tonumber(a18)
a19 = tonumber(a19)
a20 = tonumber(a20)
			if not G_GametypeHasTeams()
				if a1 == 0
				or p.nosmscolorspls
				p.shinyglosscoat = 0
					if p.mo and p.mo.skin == "sms"
					p.skincolor = SKINCOLOR_COBALT
					p.mo.color = SKINCOLOR_COBALT //Turning it off
					end
					SMSpulsecolorset(p, SKINCOLOR_COBALT, SKINCOLOR_COBALT, SKINCOLOR_COBALT, SKINCOLOR_COBALT, SKINCOLOR_COBALT)
				elseif a1 != nil and a1 < 28 and p.mo
					A_setSMSspecialcolors(p.mo, a1)
				else 
				//Remember to keep this last in order, the default SMS color.				
					p.shinyglosscoat = 1 //SMS. 
					SMSpulsecolorset(p, SKINCOLOR_SMS1R, SKINCOLOR_SMS2R, SKINCOLOR_SMS3R, SKINCOLOR_SMS4R, SKINCOLOR_SMS5R)
				end
			end
			if a2 == 1
			p.smsanaloghome = true
			else
			p.smsanaloghome = false
			end
			if a3 == 1
			p.smsanalogsweep = true
			else
			p.smsanalogsweep = false
			end
			if a4 == 1
			p.nosmsquakespls = true
			else
			p.nosmsquakespls = false
			end
			if a5 == 1
			p.smseasyhaymaker = true
			else
			p.smseasyhaymaker = false
			end
			if a6 == 1
			p.smsdontgrabme = 1
			elseif a6 == 2
			p.smsdontgrabme = 2
			else
			p.smsdontgrabme = 0
			end
			if a7 == 1
			p.smstutorial = true
			else
			p.smstutorial = false
			end
			if a8 == 1
			p.smsblastboost = true
			else
			p.smsblastboost = false
			end
			if a9 == 1
			p.nohmstheme = true
			else
			p.nohmstheme = false
			end
			if a10 == 1 //Newest addition, NOSMSCOLORS
			p.nosmscolorspls = 1
			else
			p.nosmscolorspls = 0
			end
			if a11 == 0
			p.autoc1mom = 0
			elseif a11 == 2
			p.autoc1mom = 2
			elseif a11 == 1
			p.autoc1mom = 1
			end
			
			
			if (p == server or p == admin) //Rest is admin only, so don't bother if you're not one.
				if a12 == 1
				p.smstransformonly = true
				else
				p.smstransformonly = false
				end
				if a13 == 1
				p.hmstransformdisable = 1
				elseif a13 == 2
				p.hmstransformdisable = 2
				else
				p.hmstransformdisable = 0
				end
				if a14 == 1
				p.powersharerestrict = 1
				elseif a14 == 2
				p.powersharerestrict = 2
				else
				p.powersharerestrict = 0
				end
				if a15 == 1
				p.smsgraphix = 1
				elseif a15 == 2
				p.smsgraphix = 2 
				p.smsautographix = false //It's safe to assume they only want crap graphics at this point.
				else
				p.smsgraphix = 0
				end
				if a16 == 1
				p.smsnoracegame = 1
				elseif a16 == 2
				p.smsnoracegame = 2
				else
				p.smsnoracegame = 0
				end
				if a17 == 1
				p.smsnomatchgame = 1
				else
				p.smsnomatchgame = 0
				end
				if a18 == 1
				p.smsnobmgame = 1
				elseif a18 == 2
				p.smsnobmgame = 2
				else
				p.smsnobmgame = 0
				end
				if a19 == 1
				p.smsnomsspawn = 1
				else
				p.smsnomsspawn = 0
				end
				if a20 and ((a20 > 1) and (a20 < 33))
				p.hmsmlimit = a20
				else
				p.hmsmlimit = 1
				end
			end
end)

function A_setSMSspecialcolors(s, var1, var2)
	if tonumber(var1) == nil
	return 
	elseif s and s.player
	local p = s.player
	local sc = tonumber(var1)
	p.shinyglosscoat = sc
		if sc == 0 //The great list of shiny SMS colors
		or p.nosmscolorspls
			if p.nosmscolorspls and not s.color == SKINCOLOR_COBALT and not p.sms_transformstate
			CONS_Printf(p, "\x84"+"Cannot use pulsing colors at this moment. Default color set!")
			end
			if s.skin == "sms"
			s.player.skincolor = SKINCOLOR_COBALT
			s.color = SKINCOLOR_COBALT 
			end //0 turns it off
			p.shinyglosscoat = 0		
		SMSpulsecolorset(p, SKINCOLOR_COBALT, SKINCOLOR_COBALT, SKINCOLOR_COBALT, SKINCOLOR_COBALT, SKINCOLOR_COBALT)
		elseif sc == 1 //SMS
		SMSpulsecolorset(p, SKINCOLOR_SMS1R, SKINCOLOR_SMS2R, SKINCOLOR_SMS3R, SKINCOLOR_SMS4R, SKINCOLOR_SMS5R)
		elseif sc == 2 //Super Yellow - Super Sonic
		SMSpulsecolorset(p, SKINCOLOR_SUPERGOLD5, SKINCOLOR_SUPERGOLD4, SKINCOLOR_SUPERGOLD3, SKINCOLOR_SUPERGOLD2, SKINCOLOR_SUPERGOLD1)
		elseif sc == 3 //Super Orange
		SMSpulsecolorset(p, SKINCOLOR_SUPERORANGE5, SKINCOLOR_SUPERORANGE4, SKINCOLOR_SUPERORANGE3, SKINCOLOR_SUPERORANGE2, SKINCOLOR_SUPERORANGE2)
		elseif sc == 4 //Super Red
		SMSpulsecolorset(p, SKINCOLOR_SUPERRED5, SKINCOLOR_SUPERRED4, SKINCOLOR_SUPERRED3, SKINCOLOR_SUPERRED2, SKINCOLOR_SUPERRED2)		
		elseif sc == 5 //Super Green
		SMSpulsecolorset(p, SKINCOLOR_SUPERPERIDOT5, SKINCOLOR_SUPERPERIDOT4, SKINCOLOR_SUPERPERIDOT3, SKINCOLOR_SUPERPERIDOT2, SKINCOLOR_SUPERPERIDOT2)
		elseif sc == 6 //Super Blue
		SMSpulsecolorset(p, SKINCOLOR_SUPERSKY5, SKINCOLOR_SUPERSKY4, SKINCOLOR_SUPERSKY3, SKINCOLOR_SUPERSKY2, SKINCOLOR_SUPERSKY2)
		elseif sc == 7 //Super Purple
		SMSpulsecolorset(p, SKINCOLOR_SUPERPURPLE5, SKINCOLOR_SUPERPURPLE4, SKINCOLOR_SUPERPURPLE3, SKINCOLOR_SUPERPURPLE2, SKINCOLOR_SUPERPURPLE2)
		elseif sc == 8 //Super Rust
		SMSpulsecolorset(p, SKINCOLOR_SUPERRUST5, SKINCOLOR_SUPERRUST4, SKINCOLOR_SUPERRUST3, SKINCOLOR_SUPERRUST2, SKINCOLOR_SUPERRUST2)
		elseif sc == 9 //Super Tan
		SMSpulsecolorset(p, SKINCOLOR_SUPERTAN5, SKINCOLOR_SUPERTAN4, SKINCOLOR_SUPERTAN3, SKINCOLOR_SUPERTAN2, SKINCOLOR_SUPERTAN2)
		elseif sc == 10 //Crisis flame
		SMSpulsecolorset(p, SKINCOLOR_CRIMSON, SKINCOLOR_RED, SKINCOLOR_FLAME, SKINCOLOR_KETCHUP, SKINCOLOR_SUPERORANGE5)
		elseif sc == 11 //Dark SMS
		SMSpulsecolorset(p, SKINCOLOR_BLACK, SKINCOLOR_CARBON, SKINCOLOR_BLACK, SKINCOLOR_JET, SKINCOLOR_GREY)
		elseif sc == 12 //Priest
		SMSpulsecolorset(p, SKINCOLOR_GREY, SKINCOLOR_SILVER, SKINCOLOR_SUPERSILVER5, SKINCOLOR_SUPERSILVER3, SKINCOLOR_SUPERSILVER1)
		elseif sc == 13 //Hyper Sonic
		SMSpulsecolorset(p, SKINCOLOR_SUPERSKY1, SKINCOLOR_SUPERPERIDOT1, SKINCOLOR_SUPERRED1, SKINCOLOR_SUPERGOLD1, SKINCOLOR_SUPERPURPLE1)
		elseif sc == 14 //Bluewave
		SMSpulsecolorset(p, SKINCOLOR_COBALT, SKINCOLOR_BLUE, SKINCOLOR_CORNFLOWER, SKINCOLOR_BLUEBELL, SKINCOLOR_AZURE)
		elseif sc == 15 //Arctic Chi
		SMSpulsecolorset(p, SKINCOLOR_ICY, SKINCOLOR_AETHER, SKINCOLOR_BONE, SKINCOLOR_WHITE, SKINCOLOR_SUPERSILVER5)
		elseif sc == 16 //Ranger
		SMSpulsecolorset(p, SKINCOLOR_FOREST, SKINCOLOR_GREEN, SKINCOLOR_PERIDOT, SKINCOLOR_SUPERPERIDOT5, SKINCOLOR_SUPERPERIDOT2)
		elseif sc == 17 //Pink Menace
		SMSpulsecolorset(p, SKINCOLOR_LILAC, SKINCOLOR_ROSY, SKINCOLOR_PINK, SKINCOLOR_BUBBLEGUM, SKINCOLOR_BUBBLEGUM)
		elseif sc == 18 //Metallic
		SMSpulsecolorset(p, SKINCOLOR_SUPERRUST4, SKINCOLOR_COPPER, SKINCOLOR_SUNSET, SKINCOLOR_GOLD, SKINCOLOR_GOLD)
		elseif sc == 19 //HazelGlow
		SMSpulsecolorset(p, SKINCOLOR_CARBON, SKINCOLOR_BRONZE, SKINCOLOR_BROWN, SKINCOLOR_BEIGE, SKINCOLOR_BEIGE)
		elseif sc == 20 //UltraDrive
		SMSpulsecolorset(p, SKINCOLOR_WHITE, SKINCOLOR_SUPERSILVER3, SKINCOLOR_SUPERSILVER2, SKINCOLOR_SUPERSILVER1, SKINCOLOR_SUPERSILVER1)
		elseif sc == 21 //Lapis Vapor
		SMSpulsecolorset(p, SKINCOLOR_DUSK, SKINCOLOR_CERULEAN, SKINCOLOR_BLUE, SKINCOLOR_SAPPHIRE, SKINCOLOR_BLUEBELL)
		elseif sc == 22 //Azure Breaker
		SMSpulsecolorset(p, SKINCOLOR_AZURE, SKINCOLOR_WAVE, SKINCOLOR_TEAL, SKINCOLOR_AQUA, SKINCOLOR_MOSS)
		elseif sc == 23 //Emperor
		SMSpulsecolorset(p, SKINCOLOR_EMPEROR1, SKINCOLOR_EMPEROR2, SKINCOLOR_EMPEROR3, SKINCOLOR_EMPEROR4, SKINCOLOR_EMPEROR5)
		elseif sc == 24 //Base Sonic
		SMSpulsecolorset(p, SKINCOLOR_SONIC1, SKINCOLOR_SONIC2, SKINCOLOR_SONIC3, SKINCOLOR_SONIC4, SKINCOLOR_SONIC5)
		elseif sc == 25 //Mystical
		SMSpulsecolorset(p, SKINCOLOR_MYSTICAL1, SKINCOLOR_MYSTICAL2, SKINCOLOR_MYSTICAL3, SKINCOLOR_MYSTICAL4, SKINCOLOR_MYSTICAL5)
		elseif sc == 26 //Trans-Formation. Because I hate myself enough to make puns like this.
		SMSpulsecolorset(p, SKINCOLOR_TRANSFORMATION1, SKINCOLOR_TRANSFORMATION2, SKINCOLOR_TRANSFORMATION3, SKINCOLOR_TRANSFORMATION4, SKINCOLOR_TRANSFORMATION5)
		elseif sc == 27 //FlameBreaker
		SMSpulsecolorset(p, SKINCOLOR_FLAMEBREAKER1, SKINCOLOR_FLAMEBREAKER2, SKINCOLOR_FLAMEBREAKER3, SKINCOLOR_FLAMEBREAKER4, SKINCOLOR_FLAMEBREAKER5)			
		elseif sc == 28 //Infinity's End
		SMSpulsecolorset(p, SKINCOLOR_ZEEJIN1, SKINCOLOR_ZEEJIN2, SKINCOLOR_ZEEJIN3, SKINCOLOR_ZEEJIN4, SKINCOLOR_ZEEJIN5)		
		end
	end
end		
// Let's set some sound priorities!

sfxinfo[sfx_bkhl] = {priority = 9999998, flags = SF_NOMULTIPLESOUND|SF_NOINTERRUPT|SF_X8AWAYSOUND,}
sfxinfo[sfx_cmph] = {flags = SF_X4AWAYSOUND,}
sfxinfo[sfx_smach] = {flags = SF_X2AWAYSOUND,}
sfxinfo[sfx_machwh] = {flags = SF_X2AWAYSOUND,}
sfxinfo[sfx_harrg1] = {flags = SF_X2AWAYSOUND,}
sfxinfo[sfx_harrg2] = {flags = SF_X2AWAYSOUND,}
sfxinfo[sfx_harrg3] = {flags = SF_X2AWAYSOUND,}
sfxinfo[sfx_smsrbt] = {flags = SF_X4AWAYSOUND,}
sfxinfo[sfx_smsdr] = {flags = SF_X2AWAYSOUND,}
sfxinfo[sfx_smscrt] = {flags = SF_X4AWAYSOUND,}
sfxinfo[sfx_smscr2] = {flags = SF_X4AWAYSOUND,}
sfxinfo[sfx_nerf] = {flags = SF_X4AWAYSOUND,}
sfxinfo[sfx_hmsnob] = {flags = SF_X8AWAYSOUND,}
sfxinfo[sfx_hmsnof] = {priority = 9999992, flags = SF_X4AWAYSOUND,}
sfxinfo[sfx_hmsgax] = {priority = 9999994, flags = SF_X4AWAYSOUND,}
sfxinfo[sfx_smex] = {singular = true,}
sfxinfo[sfx_pwbmb] = {flags = SF_X4AWAYSOUND,}
sfxinfo[sfx_nuexp] = {priority = 9999999,flags = SF_NOMULTIPLESOUND|SF_X8AWAYSOUND|SF_X2AWAYSOUND}
sfxinfo[sfx_hypemt] = {priority = 9999997,flags = SF_X8AWAYSOUND|SF_X4AWAYSOUND|SF_X2AWAYSOUND}

//And finally, to round things off, captions!

/*
sfxinfo[sfx_HMSJUM].caption = "SMS jump"
sfxinfo[sfx_bldash].caption = "BlindDash"
sfxinfo[sfx_smsbrk].caption = "Chalkboard abuse"
sfxinfo[sfx_smsv01].caption = "Compassion and empathy"
sfxinfo[sfx_smsv02].caption = "Nobody's faster than me!"
sfxinfo[sfx_smsv03].caption = "Is that all you got?"
sfxinfo[sfx_smsv04].caption = "C'mon!"
sfxinfo[sfx_pain02].caption = "WHAT THE--(fruit, ofc)"
sfxinfo[sfx_pain03].caption = "Ouch!"
sfxinfo[sfx_pain04].caption = "Huagh!"
sfxinfo[sfx_dead01].caption = "Sound of dying"
sfxinfo[sfx_dead02].caption = "N-no...!"
sfxinfo[sfx_bldchg].caption = "Charging Blinddash..." */ --Oh, oops. SRB2 doesn't view these as seperate sounds.

sfxinfo[sfx_smsha1].caption = "GO!!"
sfxinfo[sfx_smsha2].caption = "...heh!"
sfxinfo[sfx_smsha3].caption = "Hohp!"
sfxinfo[sfx_smsha4].caption = "HA!"
sfxinfo[sfx_smsha5].caption = "HYAH!!!"
sfxinfo[sfx_hmsfly].caption = "HMS flight boost"
sfxinfo[sfx_hypemt].caption = "Hyper Mystic transformation"
sfxinfo[sfx_bljp].caption = "Super walljump"
sfxinfo[sfx_bljpw].caption = "Weakened walljump"
sfxinfo[sfx_smex].caption = "Small flame explosion"
sfxinfo[sfx_sarb].caption = "Airboost"
sfxinfo[sfx_stst].caption = "Stomp fling"
sfxinfo[sfx_bkhl].caption = "Hmph! It's aaaaall over!"
sfxinfo[sfx_hmsgax].caption = "Galaxy Storm"
sfxinfo[sfx_spld].caption = "Mighty explosion"
sfxinfo[sfx_cmph].caption = "Incoming spanking"
sfxinfo[sfx_nerf].caption = "Haymaker smash"
sfxinfo[sfx_sdodge].caption = "Swift dodge"
sfxinfo[sfx_nuexp].caption = "Nuclear Explosion"
sfxinfo[sfx_pwbmb].caption = "Samus sueing SMS"
sfxinfo[sfx_smach].caption = "Sound barrier shatter"
sfxinfo[sfx_sswip].caption = "Footsweep"
sfxinfo[sfx_machw].caption = "Whoosh"
sfxinfo[sfx_machwh].caption = "Harsh whoosh"
sfxinfo[sfx_machwb].caption = "Speeding"
sfxinfo[sfx_harrg1].caption = "Crying in despair"
sfxinfo[sfx_harrg2].caption = "Cry of pain"
sfxinfo[sfx_harrg3].caption = "Cries of agony"
sfxinfo[sfx_smsrbt].caption = "Ring Burst"
sfxinfo[sfx_gentrg].caption = "Robot gore"
sfxinfo[sfx_smsdr].caption = "Drifting"
sfxinfo[sfx_hmsnof].caption = "NovaBlast Fire"
sfxinfo[sfx_hmsnob].caption = "Corpses"
sfxinfo[sfx_smscrt].caption = "Critical!!"
sfxinfo[sfx_smscr2].caption = "WHU-OWW!!"
sfxinfo[sfx_smsmmi].caption = "SMS Menu1"
sfxinfo[sfx_smsmmp].caption = "SMS Menu2"
sfxinfo[sfx_smsmmf].caption = "SMS Menu3"