Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local character = player.Character
  3. local mouse = player:GetMouse()
  4.  
  5. local running = false
  6. local runSpeed = 75
  7. local walkSpeed = 20
  8. function hintOutput(text)
  9. local newHint = Instance.new("Hint", workspace)
  10. newHint.Text = text
  11. game:GetService("Debris"):AddItem(newHint, 3)
  12. end
  13.  
  14. mouse.KeyDown:connect(function(key)
  15. if key == "f" then
  16. running = true
  17. character.Humanoid.WalkSpeed = runSpeed
  18. elseif key == "e" then
  19. if mouse.Target ~= nil and mouse.Target.Parent:FindFirstChild("Humanoid") then
  20. local cframe = mouse.Target.Parent.Torso.CFrame
  21. cframe = cframe - Vector3.new(-3, 0, 0)
  22. cframe = cframe.p
  23. character:MoveTo(cframe)
  24. else
  25. character:MoveTo(mouse.Hit.p)
  26. end
  27. elseif key == "z" then
  28. if mouse.Target ~= nil and mouse.Target.Parent:FindFirstChild("Humanoid") then
  29. for i,v in pairs(mouse.Target.Parent:GetChildren()) do
  30. v.Anchored = true
  31. end
  32. end
  33. end
  34. end)
  35. mouse.KeyUp:connect(function(key)
  36. if key == "f" then
  37. running = false
  38. character.Humanoid.WalkSpeed = walkSpeed
  39. end
  40. end)
  41. while true do
  42. character.Humanoid.JumpPower = 200
  43. character.Humanoid.MaxSlopeAngle = 90
  44. if running then
  45. character.Humanoid.WalkSpeed = runSpeed
  46. else
  47. character.Humanoid.WalkSpeed = walkSpeed
  48. end
  49. wait(.1)
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement