local Players = game:GetService("Players") local RS = game:GetService("RunService") local lp = Players.LocalPlayer local playerGui = lp:WaitForChild("PlayerGui") local sprintButton = playerGui:WaitForChild("MainUI"):WaitForChild("SprintingButton") local anim = Instance.new("Animation") anim.AnimationId = "rbxassetid://136252471123500" local animTrack local isRunning = false local SPEED_ON = 29 local SPEED_OFF = nil local function setupCharacter(char) local hum = char:WaitForChild("Humanoid") SPEED_OFF = hum.WalkSpeed animTrack = hum:LoadAnimation(anim) animTrack.Priority = Enum.AnimationPriority.Action end if lp.Character then setupCharacter(lp.Character) end lp.CharacterAdded:Connect(setupCharacter) sprintButton.Activated:Connect(function() isRunning = not isRunning end) RS.RenderStepped:Connect(function() local char = lp.Character if not char then return end local hum = char:FindFirstChildOfClass("Humanoid") if not hum then return end if isRunning then if hum.WalkSpeed ~= SPEED_ON then hum.WalkSpeed = SPEED_ON end if animTrack and not animTrack.IsPlaying then animTrack:Play() end else if hum.WalkSpeed ~= SPEED_OFF then hum.WalkSpeed = SPEED_OFF end if animTrack and animTrack.IsPlaying then animTrack:Stop() end end end)