SxScripting

SitUp Local Script [2021]

Jan 17th, 2021 (edited)
1,304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 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 SitUpAnimaiton = Humanoid:LoadAnimation(game.ReplicatedStorage.PowerAnimations.SitUp)
  11.  
  12. local function ChangeSpeed(x,z)
  13. Humanoid.WalkSpeed = x
  14. Humanoid.JumpPower = z
  15. end
  16.  
  17. Tool.Equipped:Connect(function()
  18. SitUpAnimaiton:Play()
  19. SitUpAnimaiton:AdjustSpeed(0)
  20. ChangeSpeed(0,0)
  21. end)
  22.  
  23. Tool.Unequipped:Connect(function()
  24. SitUpAnimaiton:Stop()
  25. ChangeSpeed(16,50)
  26. end)
  27.  
  28. Tool.Activated:Connect(function()
  29. SitUpAnimaiton:Play()
  30. RS.PowerSystem:FireServer("SitUp")
  31. wait(.99)
  32. SitUpAnimaiton:AdjustSpeed(0)
  33. end)
  34.  
  35. -- Animation Track.Legnth - 0.01
Add Comment
Please, Sign In to add comment