Advertisement
ILovePotato

Untitled

Nov 22nd, 2024
5,622
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. repeat wait() until player.Character.Humanoid
  3. local humanoid = player.Character.Humanoid
  4. local character = player.Character or player.CharacterAdded:Wait()
  5. local UserInputService = game:GetService("UserInputService")
  6. local mainAnimationId = "rbxassetid://18440398084"
  7. local pushBackAnimationId = "rbxassetid://18440406788"
  8.  
  9. local minDamage = 0
  10. local maxDamage = 0
  11. local pushBackDistance = 0
  12.  
  13. -- Function to play an animation
  14. local function playAnimation(animationId, humanoid)
  15. local animation = Instance.new("Animation")
  16. animation.AnimationId = animationId
  17. local animationTrack = humanoid:LoadAnimation(animation)
  18. animationTrack:Play()
  19. return animationTrack
  20. end
  21.  
  22. -- Function to play the push-back animation
  23. local function playPushBackAnimation(humanoid)
  24. local pushBackAnimation = Instance.new("Animation")
  25. pushBackAnimation.AnimationId = pushBackAnimationId
  26. local pushBackAnimationTrack = humanoid:LoadAnimation(pushBackAnimation)
  27. pushBackAnimationTrack:Play()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement