local function v()return ThumbstickFrame and ThumbstickFrame.Visible end local function S(S)if S and v()then local v=S.AutoJumpEnabled==false v=v and LocalPlayer.DevTouchMovementMode==Enum.DevTouchMovementMode.UserChoice RevertAutoJumpEnabledToFalse=v S.AutoJumpEnabled=true end end do local function v(v)for v,S in ipairs(LocalPlayer.Character:GetChildren())do if S:IsA("\084\111\111\108")then IsAToolEquipped=true end end v.ChildAdded:Connect(function(v)if v:IsA("\084\111\111\108")then IsAToolEquipped=true elseif v:IsA("\072\117\109\097\110\111\105\100")then S(v)end end)v.ChildRemoved:Connect(function(v)if v:IsA("\084\111\111\108")then IsAToolEquipped=false end end)local f=v:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")if f then S(f)end end LocalPlayer.CharacterAdded:Connect(v)if LocalPlayer.Character then v(LocalPlayer.Character)end end
--

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
				IsAToolEquipped = true
			end
		end
		character.ChildAdded:Connect(function(child)
			if child:IsA("Tool") then
				IsAToolEquipped = true
			elseif child:IsA("Humanoid") then
				enableAutoJump(child)
			end
		end)
		character.ChildRemoved:Connect(function(child)
			if child:IsA("Tool") then
				IsAToolEquipped = false
			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
