Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character
- local plr = game.Players.LocalPlayer
- repeat wait() until plr.Character
- local char = plr.Character
- local UIS = game:GetService("UserInputService")
- local canDJ = false
- --local hasDJ = false
- local jumpCounter = 0
- local isDj = false
- UIS.JumpRequest:Connect(function()
- local coro = coroutine.create(function()
- --if char.Humanoid:GetState() == Enum.HumanoidStateType.Jumping then
- if jumpCounter == 0 then
- jumpCounter = 1
- --print(5)
- elseif jumpCounter == 1 then
- local magnitude = (char.HumanoidRootPart.Position - workspace:FindFirstChild("Baseplate").Position).magnitude
- if magnitude <=45 then
- canDJ = true
- if canDJ == true then
- --canDJ = false
- --print(1)
- char.Humanoid.JumpPower = 70
- wait()
- char.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
- char.Humanoid.JumpPower = 50
- end
- end
- end
- --end
- end)
- coroutine.resume(coro)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement