--Set up teleport arrival.

TeleportService.LocalPlayerArrivedFromTeleport:Connect(function(Gui,Data)
	if Data and Data.IsTemporaryServer then
		--If it is a temporary server, keep showing the Gui, wait, then teleport back.
		Gui.Parent = Players.LocalPlayer:WaitForChild("PlayerGui",10^99)
		StarterGui:SetCore("TopbarEnabled",false)
		StarterGui:SetCoreGuiEnabled("All",false)
		wait(5)
		TeleportService:Teleport(Data.PlaceId,Players.LocalPlayer,nil,Gui)
	else
		--If the player is arriving back from a temporary server, remove the Gui.
		if Gui and Gui.Name == "SoftShutdownGui" then Gui:Destroy() end
	end
end)


