Advertisement
Sungmingamerpro13

EndingAnimationScript(STORY GAME)

Dec 18th, 2022 (edited)
1,473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.83 KB | None | 0 0
  1. local VictoryEvent = game.ReplicatedStorage.VictoryEvent
  2. local EndingFrame = script.Parent.EndingFrame
  3.  
  4. local TeleportService = game:GetService("TeleportService")
  5.  
  6. VictoryEvent.OnClientEvent:Connect(function(Player)
  7.     for _, player in pairs(game.Players:GetChildren()) do
  8.         spawn(function()
  9.             if Player ~= player then
  10.                 for _, Part in pairs(player.Character:GetChildren()) do
  11.                     if Part:IsA("BasePart") then
  12.                         EndingFrame:TweenPosition(UDim2.new(0,0,0,0),.1)
  13.                         Part.Transparency = 1
  14.                         for i,v in pairs(game.Players:GetPlayers()) do
  15.                             local Animnationscript = script.Parent.AnimationScript:Clone()
  16.                             Animnationscript.Parent = v.Character
  17.                         end
  18.                         EndingFrame.Leave.MouseButton1Click:Connect(function()
  19.                             TeleportService:Teleport(10525502237)
  20.                         end)
  21.                     end
  22.                 end
  23.             end
  24.         end)
  25.     end
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement