Advertisement
tElbara

Roblox Dash Script

Apr 22nd, 2022
3,681
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. local UIS = game:GetService("UserInputService")
  2. local char = script.Parent
  3.  
  4. local slideAnim = Instance.new("Animation")
  5. slideAnim.AnimationId = "rbxassetid://9404057808" -- Enter your AnimtionID
  6.  
  7. local keybind = Enum.KeyCode.Q -- between the key for ability
  8. local canslide = true
  9.  
  10. UIS.InputBegan:Connect(function(input,gameprocessed)
  11. if gameprocessed then return end
  12. if not canslide then return end
  13.  
  14. if input.KeyCode == keybind then
  15. canslide = false
  16.  
  17. local playAnim = char.Humanoid:LoadAnimation(slideAnim)
  18. playAnim:Play()
  19.  
  20. local slide = Instance.new("BodyVelocity")
  21. slide.MaxForce = Vector3.new(1,0,1) * 30000
  22. slide.Velocity = char.HumanoidRootPart.CFrame.lookVector * 100
  23. slide.Parent = char.HumanoidRootPart
  24.  
  25. for count = 1, 8 do
  26. wait(0.05)
  27. slide.Velocity*= 1
  28. end
  29. playAnim:Stop()
  30. slide:Destroy()
  31. canslide = true
  32. end
  33. end)
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement