CCCPaste

EndingAnimationScript(STORY GAME)

local VictoryEvent = game.ReplicatedStorage.VictoryEvent
local EndingFrame = script.Parent.EndingFrame

local TeleportService = game:GetService("TeleportService")

VictoryEvent.OnClientEvent:Connect(function(Player)
	for _, player in pairs(game.Players:GetChildren()) do
		spawn(function()
			if Player ~= player then
				for _, Part in pairs(player.Character:GetChildren()) do
					if Part:IsA("BasePart") then
						EndingFrame:TweenPosition(UDim2.new(0,0,0,0),.1)
						Part.Transparency = 1
						for i,v in pairs(game.Players:GetPlayers()) do
							local Animnationscript = script.Parent.AnimationScript:Clone()
							Animnationscript.Parent = v.Character
						end
						EndingFrame.Leave.MouseButton1Click:Connect(function()
							TeleportService:Teleport(10525502237)
						end)
					end
				end
			end
		end)
	end
end)