FantasyGamer

Shift To Run

Mar 18th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. game.Players.LocalPlayer:GetMouse().KeyDown:Connect(function(run)
  2. if run == "0" then
  3. local plr = game.Players.LocalPlayer.Name
  4. game.Workspace[plr].Humanoid.WalkSpeed = "100"
  5. -----------------------------------------------------------
  6. if not game.Workspace[plr]:FindFirstChild("Run") then
  7. local running = Instance.new("Sound", game.Workspace[plr])
  8. running.SoundId = "rbxassetid://520390529"
  9. running.Name = "Run"
  10. running.Looped = true
  11. running.Playing = true
  12.  
  13. end
  14. end
  15. end)
  16. game.Players.LocalPlayer:GetMouse().KeyUp:Connect(function(walk)
  17. if walk == "0" then
  18. local plr = game.Players.LocalPlayer.Name
  19. game.Workspace[plr].Humanoid.WalkSpeed = "16"
  20. game.Workspace[plr].Run:Destroy()
  21. local running = Instance.new("Sound", game.Workspace[plr])
  22. running.SoundId = "rbxassetid://140685098"
  23. running.Playing = true
  24. wait(1)
  25. running:Destroy()
  26.  
  27.  
  28. end
  29. end)
Advertisement
Add Comment
Please, Sign In to add comment