Advertisement
SxScripting

PushUp Local Script

Jan 17th, 2021
3,761
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. -- Don't Forget to Subscribe [ SxS Scripting ]
  2.  
  3. local RS = game:GetService("ReplicatedStorage")
  4.  
  5. local Player = game.Players.LocalPlayer
  6. local Character = Player.Character or Player.CharacterAdded:Wait()
  7. local Humanoid = Character:WaitForChild("Humanoid")
  8. local Tool = script.Parent
  9.  
  10. local PushUpAnimation = Humanoid:LoadAnimation(game.ReplicatedStorage.PowerAnimations.PushUp)
  11.  
  12. local function ChangeSpeed(x,z)
  13. Humanoid.WalkSpeed = x
  14. Humanoid.JumpPower = z
  15. end
  16.  
  17. Tool.Equipped:Connect(function()
  18. PushUpAnimation:Play()
  19. PushUpAnimation:AdjustSpeed(0)
  20. ChangeSpeed(0,0)
  21. end)
  22.  
  23. Tool.Unequipped:Connect(function()
  24. PushUpAnimation:Stop()
  25. ChangeSpeed(16,50)
  26. end)
  27.  
  28. Tool.Activated:Connect(function()
  29. PushUpAnimation:Play()
  30. RS.PowerSystem:FireServer("PushUp")
  31. wait(1.16)
  32. PushUpAnimation:AdjustSpeed(0)
  33. end)
  34.  
  35. -- Animation Track.Legnth - 0.01
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement