Advertisement
Guest User

noob

a guest
Feb 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character
  2. local plr = game.Players.LocalPlayer
  3. repeat wait() until plr.Character
  4. local char = plr.Character
  5.  
  6.  
  7.  
  8. local UIS = game:GetService("UserInputService")
  9.  
  10. local canDJ = false
  11. --local hasDJ = false
  12. local jumpCounter = 0
  13. local isDj = false
  14. UIS.JumpRequest:Connect(function()
  15. local coro = coroutine.create(function()
  16.  
  17. --if char.Humanoid:GetState() == Enum.HumanoidStateType.Jumping then
  18. if jumpCounter == 0 then
  19. jumpCounter = 1
  20. --print(5)
  21.  
  22. elseif jumpCounter == 1 then
  23.  
  24. local magnitude = (char.HumanoidRootPart.Position - workspace:FindFirstChild("Baseplate").Position).magnitude
  25. if magnitude <=45 then
  26. canDJ = true
  27. if canDJ == true then
  28. --canDJ = false
  29. --print(1)
  30. char.Humanoid.JumpPower = 70
  31. wait()
  32. char.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
  33. char.Humanoid.JumpPower = 50
  34. end
  35. end
  36. end
  37. --end
  38. end)
  39. coroutine.resume(coro)
  40. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement