Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// MADE BY TACIDUSYT \\--
- --// VARIABLE \\--
- local UIS = game:GetService('UserInputService')
- local Bar = script.Parent:WaitForChild('Sprint'):WaitForChild('Bar')
- local player = game.Players.LocalPlayer
- local NormalWalkSpeed = 16
- local NewWalkSpeed = 25
- local ii = 10
- local running = false
- repeat wait() until game.Players.LocalPlayer.Character
- local character = player.Character
- --// FUNCTIONS \\--
- UIS.InputBegan:connect(function(key, gameProcessed)
- if key.KeyCode == Enum.KeyCode.LeftShift and gameProcessed == false then
- character.Humanoid.WalkSpeed = NewWalkSpeed
- running = true
- while ii > 0 and running do
- ii = ii - .03
- Bar:TweenSize(UDim2.new(ii / 10, 0, 1, 0), 'Out', 'Quint', .1, true)
- --Bar.BackgroundColor3 = Bar.BackgroundColor3:lerp(Color3.fromRGB(255, 42, 42), 0.001)
- wait()
- if ii <= 0 then
- character.Humanoid.WalkSpeed = NormalWalkSpeed
- end
- end
- end
- end)
- UIS.InputEnded:connect(function(key, gameProcessed)
- if key.KeyCode == Enum.KeyCode.LeftShift and gameProcessed == false then
- character.Humanoid.WalkSpeed = NormalWalkSpeed
- running = false
- while ii < 10 and not running do
- ii = ii + .03
- Bar:TweenSize(UDim2.new(ii / 10, 0, 1, 0), 'Out', 'Quint', .1, true)
- --Bar.BackgroundColor3 = Bar.BackgroundColor3:lerp(Color3.fromRGB(255, 166, 11), 0.001)
- wait()
- if ii <= 0 then
- character.Humanoid.WalkSpeed = NormalWalkSpeed
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement