do local M=LocalPlayer:WaitForChild("\080\108\097\121\101\114\083\099\114\105\112\116\115")local B=pcall(function()M:RegisterTouchMovementMode(Enum.TouchMovementMode.Default)end)if B then M:RegisterTouchMovementMode(Enum.TouchMovementMode.Thumbstick)M:RegisterTouchMovementMode(Enum.TouchMovementMode.DPad)M:RegisterTouchMovementMode(Enum.TouchMovementMode.Thumbpad)M:RegisterTouchMovementMode(Enum.TouchMovementMode.ClickToMove)M:RegisterTouchMovementMode(Enum.TouchMovementMode.DynamicThumbstick)M:RegisterComputerMovementMode(Enum.ComputerMovementMode.Default)M:RegisterComputerMovementMode(Enum.ComputerMovementMode.KeyboardMouse)M:RegisterComputerMovementMode(Enum.ComputerMovementMode.ClickToMove)end end local M=pcall(function()return Enum.DevTouchMovementMode.DynamicThumbstick and Enum.TouchMovementMode.DynamicThumbstick end)local B={}B.Current=nil function B.SwitchTo(A,M)if B.Current==M then return end if B.Current then B.Current:Disable()end B.Current=M if B.Current then B.Current:Enable()end end function B.IsTouchJumpModuleUsed(M)return isJumpEnabled end
-- register what control scripts we are using
do
	local PlayerScripts = LocalPlayer:WaitForChild("PlayerScripts")
	local canRegisterControls = pcall(function()
		PlayerScripts:RegisterTouchMovementMode(Enum.TouchMovementMode.Default)
	end)

	if canRegisterControls then
		PlayerScripts:RegisterTouchMovementMode(Enum.TouchMovementMode.Thumbstick)
		PlayerScripts:RegisterTouchMovementMode(Enum.TouchMovementMode.DPad)
		PlayerScripts:RegisterTouchMovementMode(Enum.TouchMovementMode.Thumbpad)
		PlayerScripts:RegisterTouchMovementMode(Enum.TouchMovementMode.ClickToMove)
		PlayerScripts:RegisterTouchMovementMode(Enum.TouchMovementMode.DynamicThumbstick)

		PlayerScripts:RegisterComputerMovementMode(Enum.ComputerMovementMode.Default)
		PlayerScripts:RegisterComputerMovementMode(Enum.ComputerMovementMode.KeyboardMouse)
		PlayerScripts:RegisterComputerMovementMode(Enum.ComputerMovementMode.ClickToMove)
	end
end

local DynamicThumbstickAvailable = pcall(function()
	return Enum.DevTouchMovementMode.DynamicThumbstick and Enum.TouchMovementMode.DynamicThumbstick
end)

local ControlState = {}
ControlState.Current = nil
function ControlState:SwitchTo(newControl)
	if ControlState.Current == newControl then
		return
	end

	if ControlState.Current then
		ControlState.Current:Disable()
	end

	ControlState.Current = newControl

	if ControlState.Current then
		ControlState.Current:Enable()
	end
end

function ControlState:IsTouchJumpModuleUsed()
	return isJumpEnabled
end
