//Glitch Forms IO

COM_AddCommand("glitchforms_transformbutton", function(player_t, arg)
	if player_t.mo and player_t.mo.valid
		if arg
			if arg == "0"
			or arg == "TF"
			or arg == "tf"
			or arg == "Tf"
			or arg == "tF"
			or arg == "TOSSFLAG"
			or arg == "tossflag"
			or arg == "Tossflag"
			or arg == "TossFlag"
			or arg == "tOSSFLAG"
			or arg == "tossflaG"
			or arg == "TOSSFlag"
			or arg == "TOSSflag"
			or arg == "tossFLAG"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/GlitchFormsButton.cfg", "w+")
					file:write("TF")
					file:close()
				end
				player_t.transformbutton = BT_TOSSFLAG
				CONS_Printf(player_t, "Now you can transform into your Glitch Form with Toss Flag!")
			elseif arg == "1"
			or arg == "C2"
			or arg == "c2"
			or arg == "CUSTOM2"
			or arg == "custom2"
			or arg == "Custom2"
			or arg == "cUSTOM2"
			or arg == "custoM2"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/GlitchFormsButton.cfg", "w+")
					file:write("C2")
					file:close()
				end
				player_t.transformbutton = BT_CUSTOM2
				CONS_Printf(player_t, "Now you can transform into your Glitch Form with Custom 2!")
			elseif arg == "2"
			or arg == "C3"
			or arg == "c3"
			or arg == "CUSTOM3"
			or arg == "custom3"
			or arg == "Custom3"
			or arg == "cUSTOM3"
			or arg == "custoM3"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/GlitchFormsButton.cfg", "w+")
					file:write("C3")
					file:close()
				end
				player_t.transformbutton = BT_CUSTOM3
				CONS_Printf(player_t, "Now you can transform into your Glitch Form with Custom 3!")
			elseif arg == "3"
			or arg == "F"
			or arg == "f"
			or arg == "FIRE"
			or arg == "fire"
			or arg == "Fire"
			or arg == "fIRE"
			or arg == "firE"
			or arg == "ATTACK"
			or arg == "attack"
			or arg == "Attack"
			or arg == "aTTACK"
			or arg == "attacK"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/GlitchFormsButton.cfg", "w+")
					file:write("F")
					file:close()
				end
				player_t.transformbutton = BT_ATTACK
				CONS_Printf(player_t, "Now you can transform into your Glitch Form with Fire!")
			elseif arg == "4"
			or arg == "FN"
			or arg == "fn"
			or arg == "Fn"
			or arg == "fN"
			or arg == "FIRENORMAL"
			or arg == "firenormal"
			or arg == "Firenormal"
			or arg == "FireNormal"
			or arg == "fIRENORMAL"
			or arg == "firenormaL"
			or arg == "FIRENormal"
			or arg == "FIREnormal"
			or arg == "fireNORMAL"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/GlitchFormsButton.cfg", "w+")
					file:write("FN")
					file:close()
				end
				player_t.transformbutton = BT_FIRENORMAL
				CONS_Printf(player_t, "Now you can transform into your Glitch Form with Fire Normal!")
			else
				CONS_Printf(player_t, "Not a valid value...")
			end
		else
			if player_t.transformbutton == BT_CUSTOM2
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and transform into yur Glitch Form with it. Currently asigned button is Custom 2.")
			elseif player_t.transformbutton == BT_CUSTOM3
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and transform into yur Glitch Form with it. Currently asigned button is Custom 3.")
			elseif player_t.transformbutton == BT_ATTACK
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and transform into yur Glitch Form with it. Currently asigned button is Fire.")
			elseif player_t.transformbutton == BT_FIRENORMAL
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and transform into yur Glitch Form with it. Currently asigned button is Fire Normal.")
			else
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and transform into yur Glitch Form with it. Currently asigned button is Toss Flag.")
			end
		end
	else
		CONS_Printf(player_t, "You should be in a stage...")
	end
end)

local GLITCHFORMS_ioLoadTransformButton = function(player_t)
	if player_t.mo and player_t.mo.valid
		if player_t.transformbutton != nil
			local file = io.openlocal("client/GlitchForms/GlitchFormsButton.cfg")
			if file
				local string = file:read("*a")
				if string == "TF"
					player_t.transformbutton = BT_TOSSFLAG
				end
				if string == "C2"
					player_t.transformbutton = BT_CUSTOM2
				end
				if string == "C3"
					player_t.transformbutton = BT_CUSTOM3
				end
				if string == "F"
					player_t.transformbutton = BT_ATTACK
				end
				if string == "FN"
					player_t.transformbutton = BT_FIRENORMAL
				end
				file:close()
			else
				player_t.transformbutton = BT_TOSSFLAG
			end
		else
			player_t.transformbutton = BT_TOSSFLAG
		end
	end
end

COM_AddCommand("glitchforms_cursormode", function(player_t, arg)
	if player_t.mo and player_t.mo.valid
		if arg
			if arg == "0"
			or arg == "PC"
			or arg == "pc"
			or arg == "Pc"
			or arg == "pC"
			or arg == "COMPUTER"
			or arg == "computer"
			or arg == "Computer"
			or arg == "cOMPUTER"
			or arg == "computeR"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorMode.cfg", "w+")
					file:write("PC")
					file:close()
				end
				player_t.wechidnaonpc = true
				if splitscreen
					players[1].wechidnaonpc = true
				end
				CONS_Printf(player_t, "Now you can move your cursor by using your mouse!")
			elseif arg == "1"
			or arg == "MOBILE"
			or arg == "mobile"
			or arg == "Mobile"
			or arg == "mOBILE"
			or arg == "mobilE"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorMode.cfg", "w+")
					file:write("MOBILE")
					file:close()
				end
				player_t.wechidnaonpc = true
				if splitscreen
					players[1].wechidnaonpc = true
				end
				CONS_Printf(player_t, "Now you can move your cursor with (Cursor Move Button)!")
			else
				CONS_Printf(player_t, "Not a valid value...")
			end
		else
			if player_t.wechidnaonpc == true
				CONS_Printf(player_t, "If you put: 0/PC/Computer, Wechidna's cursor will move by your mouse. If you put: 1/Mobile, Wechidna's cursor will move with (Cursor Move Button). Currently cursor mode is PC.")
			else
				CONS_Printf(player_t, "If you put: 0/PC/Computer, Wechidna's cursor will move by your mouse. If you put: 1/Mobile, Wechidna's cursor will move with (Cursor Move Button). Currently cursor mode is Mobile.")
			end
		end
	else
		CONS_Printf(player_t, "You should be in a stage...")
	end
end)

local GLITCHFORMS_ioLoadPcOrMobile = function(player_t)
	if player_t.mo and player_t.mo.valid
		if player_t.wechidnaonpc != nil
			local file = io.openlocal("client/GlitchForms/CursorMode.cfg")
			if file
				local string = file:read("*a")
				if string == "PC"
					player_t.wechidnaonpc = true
				else
					player_t.wechidnaonpc = false
				end
				file:close()
			else
				player_t.wechidnaonpc = true
			end
		else
			player_t.wechidnaonpc = true
		end
	end
end

COM_AddCommand("glitchforms_cursordirbutton", function(player_t, arg)
	if player_t.mo and player_t.mo.valid
		if arg
			if arg == "0"
			or arg == "TF"
			or arg == "tf"
			or arg == "Tf"
			or arg == "tF"
			or arg == "TOSSFLAG"
			or arg == "tossflag"
			or arg == "Tossflag"
			or arg == "TossFlag"
			or arg == "tOSSFLAG"
			or arg == "tossflaG"
			or arg == "TOSSFlag"
			or arg == "TOSSflag"
			or arg == "tossFLAG"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorChangeDirButton.cfg", "w+")
					file:write("TF")
					file:close()
				end
				player_t.wechidnacursordirectionbutton = BT_TOSSFLAG
				CONS_Printf(player_t, "Now you can change cursor's direction when in Mobile Mode with Toss Flag!")
			elseif arg == "1"
			or arg == "C2"
			or arg == "c2"
			or arg == "CUSTOM2"
			or arg == "custom2"
			or arg == "Custom2"
			or arg == "cUSTOM2"
			or arg == "custoM2"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorChangeDirButton.cfg", "w+")
					file:write("C2")
					file:close()
				end
				player_t.wechidnacursordirectionbutton = BT_CUSTOM2
				CONS_Printf(player_t, "Now you can change cursor's direction when in Mobile Mode with Custom 2!")
			elseif arg == "2"
			or arg == "C3"
			or arg == "c3"
			or arg == "CUSTOM3"
			or arg == "custom3"
			or arg == "Custom3"
			or arg == "cUSTOM3"
			or arg == "custoM3"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorChangeDirButton.cfg", "w+")
					file:write("C3")
					file:close()
				end
				player_t.wechidnacursordirectionbutton = BT_CUSTOM3
				CONS_Printf(player_t, "Now you can change cursor's direction when in Mobile Mode with Custom 3!")
			elseif arg == "3"
			or arg == "F"
			or arg == "f"
			or arg == "FIRE"
			or arg == "fire"
			or arg == "Fire"
			or arg == "fIRE"
			or arg == "firE"
			or arg == "ATTACK"
			or arg == "attack"
			or arg == "Attack"
			or arg == "aTTACK"
			or arg == "attacK"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorChangeDirButton.cfg", "w+")
					file:write("F")
					file:close()
				end
				player_t.wechidnacursordirectionbutton = BT_ATTACK
				CONS_Printf(player_t, "Now you can change cursor's direction when in Mobile Mode with Fire!")
			elseif arg == "4"
			or arg == "FN"
			or arg == "fn"
			or arg == "Fn"
			or arg == "fN"
			or arg == "FIRENORMAL"
			or arg == "firenormal"
			or arg == "Firenormal"
			or arg == "FireNormal"
			or arg == "fIRENORMAL"
			or arg == "firenormaL"
			or arg == "FIRENormal"
			or arg == "FIREnormal"
			or arg == "fireNORMAL"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorChangeDirButton.cfg", "w+")
					file:write("FN")
					file:close()
				end
				player_t.wechidnacursordirectionbutton = BT_FIRENORMAL
				CONS_Printf(player_t, "Now you can change cursor's direction when in Mobile Mode with Fire Normal!")
			else
				CONS_Printf(player_t, "Not a valid value...")
			end
		else
			if player_t.wechidnacursordirectionbutton == BT_TOSSFLAG
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and change cursor's direction when in Mobile Mode with it. Currently asigned button is Toss Flag.")
			elseif player_t.wechidnacursordirectionbutton == BT_CUSTOM3
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and change cursor's direction when in Mobile Mode with it. Currently asigned button is Custom 3.")
			elseif player_t.wechidnacursordirectionbutton == BT_ATTACK
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and change cursor's direction when in Mobile Mode with it. Currently asigned button is Fire.")
			elseif player_t.wechidnacursordirectionbutton == BT_FIRENORMAL
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and change cursor's direction when in Mobile Mode with it. Currently asigned button is Fire Normal.")
			else
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and change cursor's direction when in Mobile Mode with it. Currently asigned button is Custom 2.")
			end
		end
	else
		CONS_Printf(player_t, "You should be in a stage...")
	end
end)

local GLITCHFORMS_ioLoadCursDirButton = function(player_t)
	if player_t.mo and player_t.mo.valid
		if player_t.transformbutton != nil
			local file = io.openlocal("client/GlitchForms/CursorChangeDirButton.cfg")
			if file
				local string = file:read("*a")
				if string == "TF"
					player_t.wechidnacursordirectionbutton = BT_TOSSFLAG
				end
				if string == "C2"
					player_t.wechidnacursordirectionbutton = BT_CUSTOM2
				end
				if string == "C3"
					player_t.wechidnacursordirectionbutton = BT_CUSTOM3
				end
				if string == "F"
					player_t.wechidnacursordirectionbutton = BT_ATTACK
				end
				if string == "FN"
					player_t.wechidnacursordirectionbutton = BT_FIRENORMAL
				end
				file:close()
			else
				player_t.wechidnacursordirectionbutton = BT_CUSTOM2
			end
		else
			player_t.wechidnacursordirectionbutton = BT_CUSTOM2
		end
	end
end

COM_AddCommand("glitchforms_cursormovebutton", function(player_t, arg)
	if player_t.mo and player_t.mo.valid
		if arg
			if arg == "0"
			or arg == "TF"
			or arg == "tf"
			or arg == "Tf"
			or arg == "tF"
			or arg == "TOSSFLAG"
			or arg == "tossflag"
			or arg == "Tossflag"
			or arg == "TossFlag"
			or arg == "tOSSFLAG"
			or arg == "tossflaG"
			or arg == "TOSSFlag"
			or arg == "TOSSflag"
			or arg == "tossFLAG"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorMoveButton.cfg", "w+")
					file:write("TF")
					file:close()
				end
				player_t.wechidnacursormovebutton = BT_TOSSFLAG
				CONS_Printf(player_t, "Now you can move the cursor when in Mobile Mode with Toss Flag!")
			elseif arg == "1"
			or arg == "C2"
			or arg == "c2"
			or arg == "CUSTOM2"
			or arg == "custom2"
			or arg == "Custom2"
			or arg == "cUSTOM2"
			or arg == "custoM2"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorMoveButton.cfg", "w+")
					file:write("C2")
					file:close()
				end
				player_t.wechidnacursormovebutton = BT_CUSTOM2
				CONS_Printf(player_t, "Now you can move the cursor when in Mobile Mode with Custom 2!")
			elseif arg == "2"
			or arg == "C3"
			or arg == "c3"
			or arg == "CUSTOM3"
			or arg == "custom3"
			or arg == "Custom3"
			or arg == "cUSTOM3"
			or arg == "custoM3"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorMoveButton.cfg", "w+")
					file:write("C3")
					file:close()
				end
				player_t.wechidnacursormovebutton = BT_CUSTOM3
				CONS_Printf(player_t, "Now you can move the cursor when in Mobile Mode with Custom 3!")
			elseif arg == "3"
			or arg == "F"
			or arg == "f"
			or arg == "FIRE"
			or arg == "fire"
			or arg == "Fire"
			or arg == "fIRE"
			or arg == "firE"
			or arg == "ATTACK"
			or arg == "attack"
			or arg == "Attack"
			or arg == "aTTACK"
			or arg == "attacK"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorMoveButton.cfg", "w+")
					file:write("F")
					file:close()
				end
				player_t.wechidnacursormovebutton = BT_ATTACK
				CONS_Printf(player_t, "Now you can move the cursor when in Mobile Mode with Fire!")
			elseif arg == "4"
			or arg == "FN"
			or arg == "fn"
			or arg == "Fn"
			or arg == "fN"
			or arg == "FIRENORMAL"
			or arg == "firenormal"
			or arg == "Firenormal"
			or arg == "FireNormal"
			or arg == "fIRENORMAL"
			or arg == "firenormaL"
			or arg == "FIRENormal"
			or arg == "FIREnormal"
			or arg == "fireNORMAL"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorMoveButton.cfg", "w+")
					file:write("FN")
					file:close()
				end
				player_t.wechidnacursormovebutton = BT_FIRENORMAL
				CONS_Printf(player_t, "Now you can move the cursor when in Mobile Mode with Fire Normal!")
			else
				CONS_Printf(player_t, "Not a valid value...")
			end
		else
			if player_t.wechidnacursormovebutton == BT_CUSTOM2
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and move the cursor when in Mobile Mode with it. Currently asigned button is Custom 2.")
			elseif player_t.wechidnacursormovebutton == BT_CUSTOM3
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and move the cursor when in Mobile Mode with it. Currently asigned button is Custom 3.")
			elseif player_t.wechidnacursormovebutton == BT_ATTACK
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and move the cursor when in Mobile Mode with it. Currently asigned button is Fire.")
			elseif player_t.wechidnacursormovebutton == BT_TOSSFLAG
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and move the cursor when in Mobile Mode with it. Currently asigned button is Toss Flag.")
			else
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and move the cursor when in Mobile Mode with it. Currently asigned button is Fire Normal.")
			end
		end
	else
		CONS_Printf(player_t, "You should be in a stage...")
	end
end)

local GLITCHFORMS_ioLoadCursMoveButton = function(player_t)
	if player_t.mo and player_t.mo.valid
		if player_t.transformbutton != nil
			local file = io.openlocal("client/GlitchForms/CursorMoveButton.cfg")
			if file
				local string = file:read("*a")
				if string == "TF"
					player_t.wechidnacursormovebutton = BT_TOSSFLAG
				end
				if string == "C2"
					player_t.wechidnacursormovebutton = BT_CUSTOM2
				end
				if string == "C3"
					player_t.wechidnacursormovebutton = BT_CUSTOM3
				end
				if string == "F"
					player_t.wechidnacursormovebutton = BT_ATTACK
				end
				if string == "FN"
					player_t.wechidnacursormovebutton = BT_FIRENORMAL
				end
				file:close()
			else
				player_t.wechidnacursormovebutton = BT_FIRENORMAL
			end
		else
			player_t.wechidnacursormovebutton = BT_FIRENORMAL
		end
	end
end

COM_AddCommand("glitchforms_cursorclickbutton", function(player_t, arg)
	if player_t.mo and player_t.mo.valid
		if arg
			if arg == "0"
			or arg == "TF"
			or arg == "tf"
			or arg == "Tf"
			or arg == "tF"
			or arg == "TOSSFLAG"
			or arg == "tossflag"
			or arg == "Tossflag"
			or arg == "TossFlag"
			or arg == "tOSSFLAG"
			or arg == "tossflaG"
			or arg == "TOSSFlag"
			or arg == "TOSSflag"
			or arg == "tossFLAG"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorClickButton.cfg", "w+")
					file:write("TF")
					file:close()
				end
				player_t.wechidnacursorclickbutton = BT_TOSSFLAG
				CONS_Printf(player_t, "Now you can click with Toss Flag!")
			elseif arg == "1"
			or arg == "C2"
			or arg == "c2"
			or arg == "CUSTOM2"
			or arg == "custom2"
			or arg == "Custom2"
			or arg == "cUSTOM2"
			or arg == "custoM2"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorClickButton.cfg", "w+")
					file:write("C2")
					file:close()
				end
				player_t.wechidnacursorclickbutton = BT_CUSTOM2
				CONS_Printf(player_t, "Now you can click with Custom 2!")
			elseif arg == "2"
			or arg == "C3"
			or arg == "c3"
			or arg == "CUSTOM3"
			or arg == "custom3"
			or arg == "Custom3"
			or arg == "cUSTOM3"
			or arg == "custoM3"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorClickButton.cfg", "w+")
					file:write("C3")
					file:close()
				end
				player_t.wechidnacursorclickbutton = BT_CUSTOM3
				CONS_Printf(player_t, "Now you can click with Custom 3!")
			elseif arg == "3"
			or arg == "F"
			or arg == "f"
			or arg == "FIRE"
			or arg == "fire"
			or arg == "Fire"
			or arg == "fIRE"
			or arg == "firE"
			or arg == "ATTACK"
			or arg == "attack"
			or arg == "Attack"
			or arg == "aTTACK"
			or arg == "attacK"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorClickButton.cfg", "w+")
					file:write("F")
					file:close()
				end
				player_t.wechidnacursorclickbutton = BT_ATTACK
				CONS_Printf(player_t, "Now you can click with Fire!")
			elseif arg == "4"
			or arg == "FN"
			or arg == "fn"
			or arg == "Fn"
			or arg == "fN"
			or arg == "FIRENORMAL"
			or arg == "firenormal"
			or arg == "Firenormal"
			or arg == "FireNormal"
			or arg == "fIRENORMAL"
			or arg == "firenormaL"
			or arg == "FIRENormal"
			or arg == "FIREnormal"
			or arg == "fireNORMAL"
				if player_t == consoleplayer
					local file = io.openlocal("client/GlitchForms/CursorClickButton.cfg", "w+")
					file:write("FN")
					file:close()
				end
				player_t.wechidnacursorclickbutton = BT_FIRENORMAL
				CONS_Printf(player_t, "Now you can click with Fire Normal!")
			else
				CONS_Printf(player_t, "Not a valid value...")
			end
		else
			if player_t.wechidnacursorclickbutton == BT_CUSTOM2
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and click with it. Currently asigned button is Custom 2.")
			elseif player_t.wechidnacursorclickbutton == BT_CUSTOM3
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and click with it. Currently asigned button is Custom 3.")
			elseif player_t.wechidnacursorclickbutton == BT_TOSSFLAG
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and click with it. Currently asigned button is Toss Flag.")
			elseif player_t.wechidnacursorclickbutton == BT_FIRENORMAL
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and click with it. Currently asigned button is Fire Normal.")
			else
				CONS_Printf(player_t, "Put TossFlag/Custom2/Custom3/Fire/FireNormal to asign that button and click with it. Currently asigned button is Fire.")
			end
		end
	else
		CONS_Printf(player_t, "You should be in a stage...")
	end
end)

local GLITCHFORMS_ioLoadCursClickButton = function(player_t)
	if player_t.mo and player_t.mo.valid
		if player_t.transformbutton != nil
			local file = io.openlocal("client/GlitchForms/CursorClickButton.cfg")
			if file
				local string = file:read("*a")
				if string == "TF"
					player_t.wechidnacursorclickbutton = BT_TOSSFLAG
				end
				if string == "C2"
					player_t.wechidnacursorclickbutton = BT_CUSTOM2
				end
				if string == "C3"
					player_t.wechidnacursorclickbutton = BT_CUSTOM3
				end
				if string == "F"
					player_t.wechidnacursorclickbutton = BT_ATTACK
				end
				if string == "FN"
					player_t.wechidnacursorclickbutton = BT_FIRENORMAL
				end
				file:close()
			else
				player_t.wechidnacursorclickbutton = BT_ATTACK
			end
		else
			player_t.wechidnacursorclickbutton = BT_ATTACK
		end
	end
end

addHook("PlayerThink", function(player)
	if player.mo and player.mo.valid
		GLITCHFORMS_ioLoadTransformButton(player)
		GLITCHFORMS_ioLoadPcOrMobile(player)
		GLITCHFORMS_ioLoadCursDirButton(player)
		GLITCHFORMS_ioLoadCursMoveButton(player)
		GLITCHFORMS_ioLoadCursClickButton(player)
	end
end)