local plr = game.Players.LocalPlayer local char = plr.Character or plr.CharacterAdded:Wait() local hum = char:WaitForChild("Humanoid") local hrp = char:WaitForChild("HumanoidRootPart") local baseSpeed = 16 -- standard roblox speed local jumpBoost = 5 -- how much faster per hop local speedCap = 100 -- dont go too crazy local decelRate = 50 -- slow down speed when sliding local lowFriction = 0.01 -- makes it slippery local currSpeed = baseSpeed -- save original props local origProps = hrp.CustomPhysicalProperties or PhysicalProperties.new(0.7, 0.3, 0.5, 1, 1) local slipProps = PhysicalProperties.new(origProps.Density, lowFriction, origProps.Elasticity, 100, origProps.ElasticityWeight) local lastHzSpeed = 0 local lastDir = Vector3.new(0, 0, 0) local sliding = false -- jump to boost speed hum.Jumping:Connect(function() currSpeed = math.min(currSpeed + jumpBoost, speedCap) hum.WalkSpeed = currSpeed sliding = false hrp.CustomPhysicalProperties = origProps end) -- heartbeat for updates game:GetService("RunService").Heartbeat:Connect(function(delta) if hum.MoveDirection.Magnitude > 0 then lastDir = hum.MoveDirection.Unit sliding = false hrp.CustomPhysicalProperties = origProps end local hzSpeedNow = (hrp.Velocity * Vector3.new(1, 0, 1)).Magnitude if hzSpeedNow < lastHzSpeed * 0.5 and lastHzSpeed > baseSpeed * 1.5 then currSpeed = baseSpeed hum.WalkSpeed = baseSpeed sliding = false hrp.CustomPhysicalProperties = origProps end lastHzSpeed = hzSpeedNow if hum.MoveDirection.Magnitude == 0 and currSpeed > baseSpeed then if not sliding then sliding = true hrp.CustomPhysicalProperties = slipProps hrp.Velocity = Vector3.new(lastDir.X * currSpeed, hrp.Velocity.Y, lastDir.Z * currSpeed) end currSpeed = math.max(baseSpeed, currSpeed - decelRate * delta) hum.WalkSpeed = currSpeed local velHz = hrp.Velocity * Vector3.new(1, 0, 1) if velHz.Magnitude > baseSpeed then hrp.Velocity = Vector3.new( lastDir.X * currSpeed, hrp.Velocity.Y, lastDir.Z * currSpeed ) else sliding = false hrp.CustomPhysicalProperties = origProps hum.WalkSpeed = baseSpeed currSpeed = baseSpeed end elseif hum.MoveDirection.Magnitude == 0 then currSpeed = baseSpeed hum.WalkSpeed = baseSpeed sliding = false hrp.CustomPhysicalProperties = origProps else hum.WalkSpeed = currSpeed end end)