local function P()return ThumbstickFrame and ThumbstickFrame.Visible end local function O(O)if O and P()then local P=O.AutoJumpEnabled==false P=P and LocalPlayer.DevTouchMovementMode==Enum.DevTouchMovementMode.UserChoice RevertAutoJumpEnabledToFalse=P O.AutoJumpEnabled=true end end do local function P(P)for P,O in ipairs(LocalPlayer.Character:GetChildren())do if O:IsA("\084\111\111\108")then ToolEquipped=O end end P.ChildAdded:Connect(function(P)if P:IsA("\084\111\111\108")then ToolEquipped=P elseif P:IsA("\072\117\109\097\110\111\105\100")then O(P)end end)P.ChildRemoved:Connect(function(P)if P:IsA("\084\111\111\108")then if P==ToolEquipped then ToolEquipped=nil end end end)local Q=P:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")if Q then O(Q)end end LocalPlayer.CharacterAdded:Connect(P)if LocalPlayer.Character then P(LocalPlayer.Character)end end
--[[ Local functionality ]]
--

local function isDynamicThumbstickEnabled()
	return ThumbstickFrame and ThumbstickFrame.Visible
end

local function enableAutoJump(humanoid)
	if humanoid and isDynamicThumbstickEnabled() then
		local shouldRevert = humanoid.AutoJumpEnabled == false
		shouldRevert = shouldRevert and LocalPlayer.DevTouchMovementMode == Enum.DevTouchMovementMode.UserChoice
		RevertAutoJumpEnabledToFalse = shouldRevert
		humanoid.AutoJumpEnabled = true
	end
end

do
	local function onCharacterAdded(character)
		for _, child in ipairs(LocalPlayer.Character:GetChildren()) do
			if child:IsA("Tool") then
				ToolEquipped = child
			end
		end
		character.ChildAdded:Connect(function(child)
			if child:IsA("Tool") then
				ToolEquipped = child
			elseif child:IsA("Humanoid") then
				enableAutoJump(child)
			end
		end)
		character.ChildRemoved:Connect(function(child)
			if child:IsA("Tool") then
				if child == ToolEquipped then
					ToolEquipped = nil
				end
			end
		end)

		local humanoid = character:FindFirstChildOfClass("Humanoid")
		if humanoid then
			enableAutoJump(humanoid)
		end
	end
	LocalPlayer.CharacterAdded:Connect(onCharacterAdded)
	if LocalPlayer.Character then
		onCharacterAdded(LocalPlayer.Character)
	end
end
