Advertisement
IceWolfYT

Roblox I Shift To Sprint I Script

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