Advertisement
devvanss

[LUA] Sprint Script

Apr 18th, 2019
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.09 KB | None | 0 0
  1. --// Increase
  2.  
  3. game:GetService("UserInputService").InputBegan:connect(function(input,gameprocesed)
  4.    
  5.  if input.KeyCode == Enum.KeyCode.LeftShift then
  6.   for i = 1,16 do
  7.    wait()
  8.    game.Workspace.Camera.FieldOfView = game.Workspace.Camera.FieldOfView + 0.5
  9.    game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed = game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed + 0.5
  10.  
  11.   end
  12.  end
  13. end)
  14.  
  15. --// Decrease
  16.  
  17. game:GetService("UserInputService").InputEnded:connect(function(input,gameprocesed)
  18.    
  19.  if input.KeyCode == Enum.KeyCode.LeftShift then
  20.   for i = 1,16 do
  21.    wait()
  22.    game.Workspace.Camera.FieldOfView = game.Workspace.Camera.FieldOfView - 0.5
  23.    game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed = game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed - 0.5
  24.  
  25.   end
  26.  end
  27. end)
  28.  
  29. --// Default
  30.  
  31. game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Died:connect(function()
  32.    
  33.  game.Workspace.Camera.FieldOfView = 70
  34.  game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 12.5
  35.  script.Disabled = true
  36.  
  37. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement