rawset(_G, "`jayt", {})

addHook("PlayerThink", function(player)
	if player.mo and player.mo.skin == "jayt"
		if (player.cmd.buttons & BT_CUSTOM2) then
			if not player.powers[pw_super] and player.rings and player.solchar and not player.solchar.istransformed
				if MP_MatchSuper and player.rings > 49 and G_RingSlingerGametype() then
					player.keepsolformepleasethankies = true
				end
				
				player.solchar.istransformed = 1
				player.mo.state = S_PLAY_SUPER_TRANS1
				S_StartSound(player.mo, sfx_secir)
				player.powers[pw_extralife] = 0
				player.powers[pw_sneakers] = 0
				player.powers[pw_invulnerability] = 0
				player.solchar.emeraldcircle = 1

				if G_RingSlingerGametype() then
					COM_BufInsertText(server, "csay " .. player.name .. "\\IS NOW IN SOL FORM.\\\\\\\\")
				end
			end
		end
	end
end)

print("\x83Jay T. The Stickfigure Created By: jaybitts10",
	"\x81Press Toss Flag to TAUNT!",
	"\x80With SolChars, Press Custom 2 Button To Become into Sol Form.",
	"\x84With the Hyper Ability, Press Custom 3 to TRANSFORM INTO HYPER FORM! (while in super form)")