Advertisement
HowToRoblox

SpeedBuffHandler

Oct 19th, 2020
3,206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. local speedPad = script.Parent
  2.  
  3.  
  4. local speedAmount = 30
  5. local defaultSpeed = 16
  6.  
  7. local speedLength = math.huge
  8.  
  9.  
  10. speedPad.Touched:Connect(function(partTouched)
  11.    
  12.     local char = partTouched.Parent
  13.    
  14.     if char:FindFirstChild("Humanoid") then
  15.        
  16.         char.Humanoid.WalkSpeed = speedAmount
  17.        
  18.        
  19.         if speedLength < math.huge then
  20.            
  21.             wait(speedLength)
  22.             char.Humanoid.WalkSpeed = defaultSpeed
  23.         end
  24.     end
  25. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement