do local N=LocalPlayer:WaitForChild("\080\108\097\121\101\114\083\099\114\105\112\116\115")local y=pcall(function()N:RegisterTouchMovementMode(Enum.TouchMovementMode.Default)end)if y then N:RegisterTouchMovementMode(Enum.TouchMovementMode.Thumbstick)N:RegisterTouchMovementMode(Enum.TouchMovementMode.DPad)N:RegisterTouchMovementMode(Enum.TouchMovementMode.Thumbpad)N:RegisterTouchMovementMode(Enum.TouchMovementMode.ClickToMove)N:RegisterTouchMovementMode(Enum.TouchMovementMode.DynamicThumbstick)N:RegisterComputerMovementMode(Enum.ComputerMovementMode.Default)N:RegisterComputerMovementMode(Enum.ComputerMovementMode.KeyboardMouse)N:RegisterComputerMovementMode(Enum.ComputerMovementMode.ClickToMove)end end local N=pcall(function()return Enum.DevTouchMovementMode.DynamicThumbstick and Enum.TouchMovementMode.DynamicThumbstick end)local y={}y.Current=nil function y.SwitchTo(o,N)if y.Current==N then return end if y.Current then y.Current:Disable()end y.Current=N if y.Current then y.Current:Enable()end end function y.IsTouchJumpModuleUsed(N)return isJumpEnabled end

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
