StartShutdown.OnClientEvent:Connect(function()local Q,i=CreateTeleportScreen()i.BackgroundTransparency=.5 Q.Parent=game.Players.LocalPlayer:WaitForChild("\080\108\097\121\101\114\071\117\105")wait(1)local N=tick()local B=.5 while tick()-N<B do local Q=tick()-N local V=Q/B i.BackgroundTransparency=.5*(1-V)RenderStepped:Wait()end i.BackgroundTransparency=0 end)
--Set up event for when the server is shutting down.
StartShutdown.OnClientEvent:Connect(function()
	--Create the Gui and have it semi-transparent for 1 second.
	local Gui, Background = CreateTeleportScreen()
	Background.BackgroundTransparency = 0.5
	Gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
	wait(1)

	--Tween the transparency to 0.
	local Start = tick()
	local Time = 0.5
	while tick() - Start < Time do
		local Dif = tick() - Start
		local Ratio = Dif / Time
		Background.BackgroundTransparency = 0.5 * (1 - Ratio)
		RenderStepped:Wait()
	end
	Background.BackgroundTransparency = 0
end)
