iOSdeveloper

Untitled

Feb 8th, 2025
11,594
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  3. local animationId = "rbxassetid://118566032629346"
  4. local soundId = "rbxassetid://85155550378142"
  5.  
  6. -- Load the animation
  7. local animation = Instance.new("Animation")
  8. animation.AnimationId = animationId
  9. local animator = player.Character:FindFirstChildOfClass("Humanoid"):FindFirstChildOfClass("Animator")
  10. local animationTrack = animator:LoadAnimation(animation)
  11.  
  12. -- Load the sound
  13. local sound = Instance.new("Sound")
  14. sound.SoundId = soundId
  15. sound.Parent = player.Character
  16.  
  17. -- Adjust the playback speed of the sound to make it play faster
  18. sound.PlaybackSpeed = 4 -- Set sound playback speed to 4
  19.  
  20. -- Fire the Dribble remote event
  21. game:GetService("ReplicatedStorage").Packages.Knit.Services.BallService.RE.Dribble:FireServer()
  22.  
  23. -- Clone the visual effect
  24. local effects = ReplicatedStorage.Assets.Vfx.BigBangTrail.VFX:Clone()
  25. local football = player.Character:FindFirstChild("Football")
  26.  
  27. if football then
  28. effects.Parent = football
  29. else
  30. warn("Football not found in character.")
  31. return
  32. end
  33.  
  34. -- Play the sound and animation
  35. sound:Play()
  36. animationTrack:Play()
  37.  
  38. -- Adjust the speed of the animation to 4
  39. animationTrack:AdjustSpeed(4) -- Set animation speed to 4
  40.  
  41. -- Wait for the animation to finish
  42. animationTrack.Stopped:Wait()
  43.  
  44. -- Fire the Shoot remote event
  45. local args = { [1] = 200 }
  46. game:GetService("ReplicatedStorage").Packages.Knit.Services.BallService.RE.Shoot:FireServer(unpack(args))
  47.  
  48. -- Clean up the effects after the animation ends
  49. wait(12) -- Wait for the duration of the effect
  50. effects:Destroy()
  51. sound:Destroy() -- Optionally destroy the sound after use
Advertisement
Add Comment
Please, Sign In to add comment