Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local part = script.Parent
- local powerupSpeed = 20
- local debounce = false
- local regularWalkspeed = game.StarterPlayer.CharacterWalkSpeed
- local timer = 5
- part.Touched:Connect(function(hit)
- if hit.Parent:FindFirstChild("Humanoid") and debounce == false
- then
- debounce = true
- part.Transparency = 1
- local char = hit.Parent
- local humanoid = char:WaitForChild("Humanoid")
- humanoid.WalkSpeed = powerupSpeed
- wait(timer)
- humanoid.WalkSpeed = regularWalkspeed
- debounce = false
- part:Destroy()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement