-- Script By @AzizAnzofficiall on Youtube -- ScriptBlox Account @AzScripter local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local SoundService = game:GetService("SoundService") local player = Players.LocalPlayer local cam = workspace.CurrentCamera local walkSpeed = 5 local sprintSpeed = 25 local accelRate = 20 local decelRate = 15 local maxStamina = 100 local staminaDrainRate = 20 local staminaRegenRate = 20 local fovSprint = 85 local fovExhausted = 50 local sprintButtonYOffset = 10 local SPRINT_IDLE = "rbxassetid://89190879948216" local SPRINT_HELD = "rbxassetid://96892467644525" local LIQUID = Color3.fromRGB(0, 176, 255) local EMPTY = Color3.fromRGB(168, 196, 214) local STRIPE = Color3.fromRGB(186, 208, 222) local stamina = maxStamina local sprinting = false local isExhausted = false local currentWalkSpeed = walkSpeed local lastDir = Vector3.zero local humanoid local fovMode = "free" local fovTween local fovToken = 0 local controls local controlsFailed = false local blur = Instance.new("BlurEffect") blur.Name = "SprintBlur" blur.Size = 0 blur.Parent = cam local breath = Instance.new("Sound") breath.Name = "SprintBreath" breath.SoundId = "rbxassetid://9069161602" breath.Volume = 0 breath.Looped = true breath.Parent = SoundService local gui = Instance.new("ScreenGui") gui.Name = "SprintSystem" gui.ResetOnSpawn = false gui.IgnoreGuiInset = true gui.DisplayOrder = 50 gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling gui.Parent = player:WaitForChild("PlayerGui") local function corner(parent, radius) local c = Instance.new("UICorner") c.CornerRadius = radius or UDim.new(1, 0) c.Parent = parent return c end local function panel(parent, name, size, position, color, zIndex) local f = Instance.new("Frame") f.Name = name f.Size = size f.Position = position f.BackgroundColor3 = color or Color3.new(1, 1, 1) f.BorderSizePixel = 0 f.ZIndex = zIndex or 1 f.Parent = parent return f end local bar = Instance.new("CanvasGroup") bar.Name = "StaminaBar" bar.BackgroundTransparency = 1 bar.GroupTransparency = 1 bar.AnchorPoint = Vector2.new(0, 1) bar.Position = UDim2.new(0.03, 0, 1, -18) bar.Size = UDim2.new(0.34, 0, 0.085, 0) bar.Parent = gui local shell = panel(bar, "Shell", UDim2.new(0.84, 0, 0.72, 0), UDim2.new(0.5, 0, 0.5, 0), Color3.new(1, 1, 1), 1) shell.AnchorPoint = Vector2.new(0.5, 0.5) corner(shell, UDim.new(0.45, 0)) local leftCap = panel(bar, "LeftCap", UDim2.fromOffset(20, 20), UDim2.new(0, 10, 0.5, 0), Color3.new(1, 1, 1), 1) leftCap.AnchorPoint = Vector2.new(0.5, 0.5) corner(leftCap) local rightCap = panel(bar, "RightCap", UDim2.fromOffset(20, 20), UDim2.new(1, -10, 0.5, 0), Color3.new(1, 1, 1), 1) rightCap.AnchorPoint = Vector2.new(0.5, 0.5) corner(rightCap) local function stripes(xScale) for i = 0, 2 do panel(bar, "Stripe", UDim2.new(0.008, 0, 0.58, 0), UDim2.new(xScale + i * 0.016, 0, 0.21, 0), STRIPE, 3) end end stripes(0.055) stripes(0.9) local track = panel(bar, "Track", UDim2.new(0.7, 0, 0.4, 0), UDim2.new(0.5, 0, 0.5, 0), EMPTY, 4) track.AnchorPoint = Vector2.new(0.5, 0.5) track.ClipsDescendants = true corner(track) local rim = Instance.new("UIStroke") rim.Color = Color3.fromRGB(236, 246, 252) rim.Thickness = 2 rim.Transparency = 0.25 rim.Parent = track local liquid = panel(track, "Liquid", UDim2.new(1, 0, 1.5, 0), UDim2.new(0, 0, -0.25, 0), LIQUID, 5) liquid.ClipsDescendants = true corner(liquid) local shine = Instance.new("UIGradient") shine.Rotation = 90 shine.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(148, 226, 255)), ColorSequenceKeypoint.new(0.42, LIQUID), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 132, 214)), }) shine.Parent = liquid local bubbles = { { x = 0.1, y = 0.3, w = 8, h = 11, speed = 0.07, phase = 0.4 }, { x = 0.18, y = 0.42, w = 6, h = 8, speed = 0.1, phase = 1.6 }, { x = 0.13, y = 0.7, w = 12, h = 16, speed = 0.06, phase = 2.5 }, } for _, bub in ipairs(bubbles) do local f = panel(liquid, "Bubble", UDim2.fromOffset(bub.w, bub.h), UDim2.new(bub.x, 0, bub.y, 0), Color3.fromRGB(226, 248, 255), 6) f.AnchorPoint = Vector2.new(0.5, 0.5) f.BackgroundTransparency = 0.28 corner(f) bub.frame = f end local waveBlobs = {} for i = 1, 10 do local blob = panel(track, "Wave", UDim2.fromOffset(14, 14), UDim2.new(), LIQUID, 6) blob.AnchorPoint = Vector2.new(0.5, 0.5) corner(blob) waveBlobs[i] = blob end local foam = {} for i = 1, 22 do local speck = panel(track, "Foam", UDim2.fromOffset(3, 3), UDim2.new(), Color3.new(1, 1, 1), 7) speck.AnchorPoint = Vector2.new(0.5, 0.5) corner(speck) local kind = i % 3 if kind == 0 then speck.BackgroundColor3 = LIQUID elseif kind == 1 then speck.BackgroundColor3 = Color3.fromRGB(198, 220, 232) else speck.BackgroundColor3 = Color3.fromRGB(236, 248, 255) end foam[i] = { frame = speck, along = (i - 0.5) / 22, drift = i * 1.37, size = 2 + (i % 4), reach = 4 + (i % 5) * 3, } end local sprintBtn = Instance.new("ImageButton") sprintBtn.Name = "SprintButton" sprintBtn.AnchorPoint = Vector2.new(0.5, 1) sprintBtn.BackgroundTransparency = 1 sprintBtn.AutoButtonColor = false sprintBtn.Image = SPRINT_IDLE sprintBtn.Size = UDim2.fromOffset(68, 68) sprintBtn.Position = UDim2.new(1, -90, 1, -(90 + sprintButtonYOffset)) sprintBtn.ZIndex = 10 sprintBtn.Parent = gui sprintBtn.MouseButton1Down:Connect(function() if stamina > 0 and not isExhausted then sprinting = true sprintBtn.Image = SPRINT_HELD end end) sprintBtn.MouseButton1Up:Connect(function() sprinting = false sprintBtn.Image = SPRINT_IDLE end) local function playFov(target, duration, direction, modeName) fovToken += 1 local token = fovToken fovMode = modeName if fovTween then fovTween:Cancel() end local tw = TweenService:Create(cam, TweenInfo.new(duration, Enum.EasingStyle.Back, direction), { FieldOfView = target }) fovTween = tw tw.Completed:Connect(function(state) if token ~= fovToken then return end if modeName == "recover" and state == Enum.PlaybackState.Completed then fovMode = "free" end end) tw:Play() end local function resetFeel() sprinting = false isExhausted = false stamina = maxStamina currentWalkSpeed = walkSpeed lastDir = Vector3.zero sprintBtn.Image = SPRINT_IDLE if breath.IsPlaying then breath:Stop() end breath.Volume = 0 TweenService:Create(blur, TweenInfo.new(0.35), { Size = 0 }):Play() fovToken += 1 if fovTween then fovTween:Cancel() fovTween = nil end fovMode = "free" if cam then cam.FieldOfView = 70 end end local hooked local function hookCharacter(character) if hooked == character then return end hooked = character local hum = character:WaitForChild("Humanoid") humanoid = hum cam = workspace.CurrentCamera blur.Parent = cam resetFeel() hum.WalkSpeed = walkSpeed hum.Died:Connect(function() if humanoid == hum then resetFeel() end end) end local function inputVector() if not controls and not controlsFailed then local scripts = player:FindFirstChild("PlayerScripts") local moduleScript = scripts and scripts:FindFirstChild("PlayerModule") if moduleScript then local ok, result = pcall(function() return require(moduleScript):GetControls() end) if ok and result then controls = result else controlsFailed = true end end end if controls then local ok, vector = pcall(function() return controls:GetMoveVector() end) if ok and typeof(vector) == "Vector3" then return vector end end local x, z = 0, 0 if UserInputService:IsKeyDown(Enum.KeyCode.A) or UserInputService:IsKeyDown(Enum.KeyCode.Left) then x -= 1 end if UserInputService:IsKeyDown(Enum.KeyCode.D) or UserInputService:IsKeyDown(Enum.KeyCode.Right) then x += 1 end if UserInputService:IsKeyDown(Enum.KeyCode.W) or UserInputService:IsKeyDown(Enum.KeyCode.Up) then z -= 1 end if UserInputService:IsKeyDown(Enum.KeyCode.S) or UserInputService:IsKeyDown(Enum.KeyCode.Down) then z += 1 end return Vector3.new(x, 0, z) end local function worldDirection(move) if move.Magnitude < 0.05 or not cam then return Vector3.zero end local look = Vector3.new(cam.CFrame.LookVector.X, 0, cam.CFrame.LookVector.Z) local right = Vector3.new(cam.CFrame.RightVector.X, 0, cam.CFrame.RightVector.Z) if look.Magnitude < 0.001 then return Vector3.zero end local world = right.Unit * move.X - look.Unit * move.Z if world.Magnitude < 0.05 then return Vector3.zero end return world.Unit end player.CharacterAdded:Connect(hookCharacter) pcall(function() RunService:UnbindFromRenderStep("SprintSystem") end) RunService:BindToRenderStep("SprintSystem", Enum.RenderPriority.Last.Value, function(dt) local jumpBtn = player.PlayerGui:FindFirstChild("TouchGui") and player.PlayerGui.TouchGui:FindFirstChild("TouchControlFrame") and player.PlayerGui.TouchGui.TouchControlFrame:FindFirstChild("JumpButton") if jumpBtn then sprintBtn.Size = jumpBtn.Size local pos = jumpBtn.AbsolutePosition local size = jumpBtn.AbsoluteSize local origin = gui.AbsolutePosition sprintBtn.Position = UDim2.fromOffset( pos.X + size.X * 0.5 - origin.X, pos.Y - sprintButtonYOffset - origin.Y ) else sprintBtn.Size = UDim2.fromOffset(68, 68) sprintBtn.Position = UDim2.new(1, -90, 1, -(90 + sprintButtonYOffset)) end local barHeight = bar.AbsoluteSize.Y if barHeight > 1 then local diameter = barHeight leftCap.Size = UDim2.fromOffset(diameter, diameter) rightCap.Size = UDim2.fromOffset(diameter, diameter) leftCap.Position = UDim2.new(0, diameter * 0.5, 0.5, 0) rightCap.Position = UDim2.new(1, -diameter * 0.5, 0.5, 0) end local ratio = math.clamp(stamina / maxStamina, 0, 1) local now = os.clock() local slosh = math.sin(now * 2.5) * 0.045 + math.sin(now * 4.3) * 0.02 liquid.Size = UDim2.new(ratio, 0, 1.5, 0) liquid.Position = UDim2.new(0, 0, -0.25 + slosh, 0) liquid.Visible = ratio > 0.012 shine.Offset = Vector2.new(math.sin(now * 1.25) * 0.15, math.sin(now * 2.1) * 0.08) local showEdge = ratio > 0.03 and ratio < 0.99 local trackHeight = math.max(track.AbsoluteSize.Y, 1) for i, blob in ipairs(waveBlobs) do local along = (i - 0.5) / #waveBlobs local wave = math.sin(now * 3.5 + i * 0.8) * trackHeight * 0.28 + math.sin(now * 6.4 + i * 1.35) * trackHeight * 0.1 local size = trackHeight * 0.62 blob.Size = UDim2.fromOffset(size, size) blob.Position = UDim2.new(ratio, wave, along, 0) blob.Visible = showEdge end for _, speck in ipairs(foam) do local y = speck.along + math.sin(now * 4.8 + speck.drift) * 0.035 local spray = math.sin(now * 6.2 + speck.drift) * speck.reach + speck.reach * 0.35 speck.frame.Size = UDim2.fromOffset(speck.size, speck.size) speck.frame.Position = UDim2.new(ratio, spray, y, 0) speck.frame.Visible = showEdge speck.frame.BackgroundTransparency = 0.15 + (math.sin(now * 9 + speck.drift) * 0.5 + 0.5) * 0.6 end for _, bub in ipairs(bubbles) do bub.y -= bub.speed * dt if bub.y < -0.08 then bub.y = 1.08 end bub.frame.Position = UDim2.new(bub.x + math.sin(now * 1.5 + bub.phase) * 0.025, 0, bub.y, 0) end local fadeGoal = (stamina >= maxStamina - 0.05) and 1 or 0 bar.GroupTransparency = bar.GroupTransparency + (fadeGoal - bar.GroupTransparency) * math.min(dt * 8, 1) if not humanoid or not humanoid.Parent or humanoid.Health <= 0 then return end if workspace.CurrentCamera ~= cam then cam = workspace.CurrentCamera blur.Parent = cam end local move = inputVector() local hasInput = move.Magnitude > 0.1 and not humanoid.Sit if hasInput then local dir = worldDirection(move) local flat = Vector3.new(humanoid.MoveDirection.X, 0, humanoid.MoveDirection.Z) if flat.Magnitude > 0.2 then lastDir = flat.Unit elseif dir.Magnitude > 0.1 then lastDir = dir end end if isExhausted or stamina <= 0 then sprinting = false sprintBtn.Image = SPRINT_IDLE end local targetSpeed = walkSpeed if hasInput and sprinting and stamina > 0 and not isExhausted then targetSpeed = sprintSpeed end if currentWalkSpeed < targetSpeed then currentWalkSpeed = math.min(targetSpeed, currentWalkSpeed + accelRate * dt) elseif currentWalkSpeed > targetSpeed then currentWalkSpeed = math.max(targetSpeed, currentWalkSpeed - decelRate * dt) end if not hasInput and currentWalkSpeed <= walkSpeed then currentWalkSpeed = walkSpeed end humanoid.WalkSpeed = currentWalkSpeed local speedFraction = math.clamp((currentWalkSpeed - walkSpeed) / math.max(sprintSpeed - walkSpeed, 0.001), 0, 1) if hasInput and sprinting and stamina > 0 and not isExhausted then stamina = math.max(0, stamina - staminaDrainRate * speedFraction * dt) else local regen = staminaRegenRate * (1 - speedFraction) if isExhausted then regen *= 0.5 end stamina = math.min(maxStamina, stamina + regen * dt) end if stamina <= 0 and not isExhausted then stamina = 0 sprinting = false isExhausted = true sprintBtn.Image = SPRINT_IDLE playFov(fovExhausted, 0.5, Enum.EasingDirection.Out, "exhausted") TweenService:Create(blur, TweenInfo.new(0.5), { Size = 20 }):Play() breath.Volume = 1 if not breath.IsPlaying then breath:Play() end elseif isExhausted and stamina >= maxStamina * 0.5 then isExhausted = false playFov(70, 1.5, Enum.EasingDirection.InOut, "recover") TweenService:Create(blur, TweenInfo.new(1), { Size = 0 }):Play() end if breath.IsPlaying and not isExhausted then breath.Volume = math.max(0, breath.Volume - dt * 2) if breath.Volume <= 0 then breath:Stop() end end if not hasInput and currentWalkSpeed > walkSpeed and lastDir.Magnitude > 0.1 then humanoid:Move(lastDir, false) end if fovMode == "free" then cam.FieldOfView = 70 + (fovSprint - 70) * speedFraction end end) if cam then cam.FieldOfView = 70 end if player.Character then task.spawn(hookCharacter, player.Character) end