Any way to improve Merely's soft shutdown script?

Hello, as of again, the title says it all, i want to know how can i improve merely’s soft shutdown script, i done some things, but it changed almost nothing, so i would like help with this.(Sorry for the randomness, and here is merely’s soft shutdown script: https://devforum.roblox.com/t/soft-shutdown-script/47588/https://github.com/MerelyRBLX/ROBLOX-Lua/blob/master/SoftShutdown.lua )

Here are the “improvements”:

--[[
	SoftShutdown 1.2
	Author: Merely
	Edited by PhoenixRessusection
	This system lets you shut down servers without losing a bunch of players.
	When game.OnClose is called, the script teleports everyone in the server
	into a reserved server.
	
	When the reserved servers start up, they wait a few seconds, and then
	send everyone back into the main place.
	
	I added wait() in a couple of places because if you don't, everyone will spawn into
	their own servers with only 1 player.
--]]

local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")

if (game.VIPServerId ~= "" and game.VIPServerOwnerId == 0) then
	-- this is a reserved server without a VIP server owner
	local TempMsg = Instance.new("Message")
	TempMsg.Text = "This is a temporary lobby. Teleporting back in a moment."
	TempMsg.Parent = workspace
	
	local waitTime = 5

	Players.PlayerAdded:Connect(function(plr)
		wait(waitTime)
		waitTime = waitTime / 2
		TeleportService:Teleport(game.PlaceId, plr)
	end)
	
	for _, plr in ipairs(Players:GetPlayers()) do
		TeleportService:Teleport(game.PlaceId, plr)
		wait(waitTime)
		waitTime = waitTime / 2
	end
else
	game:BindToClose(function()
		if (#Players:GetPlayers() == 0) then
			return
		end
		
		if (game:GetService("RunService"):IsStudio()) then
			return
		end
		
		local TempMsg = Instance.new("Message")
		TempMsg.Text = "Rebooting servers for update. Please wait"
		TempMsg.Parent = workspace
		
		wait(2)
		
		local reservedServerCode = TeleportService:ReserveServer(game.PlaceId)
		
		for _, plr in ipairs(Players:GetPlayers()) do
			TeleportService:TeleportToPrivateServer(game.PlaceId, reservedServerCode, { plr })
		end
		Players.PlayerAdded:Connect(function(plr)
			TeleportService:TeleportToPrivateServer(game.PlaceId, reservedServerCode, { plr })
		end)
		
		while (#Players:GetPlayers() > 0) do
			wait(1)
		end	
		
		-- done
	end)
end

What do you want to improve on it? Why does it need to be imporved? What did you improve? It get its job done afaik.

1- I would more likely want to make the 2 messages cooler, aka making it a Gui instead of the instance itself.
2- It doesn’t needs to be improved, i just want to, since i do alot of random things if you know who am i.
3- Check the original code and mine code, but i will tell some things:

Converted connect to Connect.
Converted pairs to ipairs.
And i honestly think thats it, reason why i asked for ways to improve it.

Alright, so if you want to put custom GUI. You can replace this part. This is basically where it shows the Message.

I know of that, i tried doing something, but it of course didn’t go well. I will try replicating what i did…

1 Like

Oh, i managed to do something, and it actually worked! I just need to use the AutoScale plugin, but besides that, i would want to deactivate all the CoreGuis features: Chat, Backpack etc. But i seen this can only be done in a localscript, what could be the solution for this?

Yes. Or look into this.

I wasn’t capable of finding which one is the solution for me. Do you mean using this?: game:GetService(‘Players’).LocalPlayer:WaitForChild(‘PlayerGui’):SetTopbarTransparency(1), that also uses a localscript, both of the solutions they gave, and also, :SetTopbarTransparency(1) is deprecated.

Oh. Well I see. You should be able to find something on Wiki.