Advertisement
HowToRoblox

DashScript

Feb 25th, 2020
5,639
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. local plr = game.Players.LocalPlayer
  2.  
  3. local char = plr.Character or plr.CharacterAdded:Wait()
  4.  
  5.  
  6. local uis = game:GetService("UserInputService")
  7.  
  8.  
  9. local isCoolingDown = false
  10.  
  11.  
  12. uis.InputBegan:Connect(function(key, processed)
  13.    
  14.     if key.KeyCode == Enum.KeyCode.E and not processed then
  15.        
  16.        
  17.         if isCoolingDown then return end
  18.        
  19.        
  20.         local hrp = char:FindFirstChild("HumanoidRootPart")
  21.        
  22.         if not hrp then return end
  23.        
  24.        
  25.         isCoolingDown = true
  26.        
  27.        
  28.         hrp.Velocity = hrp.CFrame.lookVector * 300
  29.        
  30.        
  31.         wait(2)
  32.        
  33.        
  34.         isCoolingDown = false
  35.        
  36.     end
  37. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement