Advertisement
DEVJORDAN22

DashControl

Feb 21st, 2025
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.48 KB | None | 0 0
  1. local var41 = true --cooldown
  2. local Enabled = false --enabled
  3. local Ragdolled = Character:WaitForChild("Ragdolled")
  4. local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
  5. local Animator = Humanoid:WaitForChild("Animator")
  6. local UserInputService = game:GetService("UserInputService")
  7. local any_LoadAnimation_result1 = Animator:LoadAnimation(LocalPlayer.PlayerGui.Sprinting:WaitForChild("Animation2"))
  8. local DashForce = 90 --force
  9. UserInputService.InputBegan:Connect(function(arg1, arg2) -- Line 83
  10. if Enabled == true then
  11.     --[[ Upvalues[5]:
  12.         [1]: var40 (read and write)
  13.         [2]: Ragdolled (readonly)
  14.         [3]: any_LoadAnimation_result1 (readonly)
  15.         [4]: HumanoidRootPart (readonly)
  16.         [5]: Humanoid (readonly)
  17.     ]]
  18.     if not arg2 and arg1.UserInputType == Enum.UserInputType.Keyboard and arg1.KeyCode == Enum.KeyCode.E and var40 == true and Ragdolled.Value == false then
  19.         if var41 == true then
  20.             var40 = false
  21.         end
  22.         any_LoadAnimation_result1:Play()
  23.         local BodyVelocity = Instance.new("BodyVelocity", HumanoidRootPart)
  24.         BodyVelocity.MaxForce = Vector3.new(20000, 0, 20000)
  25.         BodyVelocity.Velocity = Humanoid.MoveDirection * Vector3.new(DashForce, 0, DashForce)
  26.         if Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
  27.             BodyVelocity.Velocity = HumanoidRootPart.CFrame.lookVector * Vector3.new(DashForce, 0, DashForce)
  28.         end
  29.         game.Debris:AddItem(BodyVelocity, 0.2)
  30.         wait(2)
  31.         if var41 == true then
  32.             var40 = false
  33.         end
  34.     end
  35. end
  36. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement