HAHOOS

SpeedBoost

Apr 21st, 2020
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. local boostPart = script.Parent
  2. local moc = 125
  3.  
  4. local function onPartTouch(otherPart)
  5.     -- kod dodający Super Jump graczowi
  6.     local partParent = otherPart.Parent -- zapisanie właściciela "kolana"
  7.     local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
  8.     if humanoid then
  9.         local currentSpeed = humanoid.WalkSpeed
  10.         if currentSpeed < moc then
  11.             humanoid.WalkSpeed = moc
  12.             wait(10)
  13.             humanoid.WalkSpeed = currentSpeed
  14.         end
  15.     end
  16.    
  17. end
  18.  
  19. boostPart.Touched:Connect(onPartTouch) -- wywołanie funkcji onPartTouch
Advertisement
Add Comment
Please, Sign In to add comment