Shut down all servers fix!

I just made this, because recently the Shut Down All Servers option in studio has been REALLY broken for no reason, and so I was like: “Yeah whatever lets do it it’s simple”

It’s really easy to setup, theres a table, called AllowedUsers, which you put the users userId’s which you wanna allow to have shut down server permissions.


After that, you only need to require it via another script, no functions, no anything, it will just load it and start listening to players which have the perms.

For someone which wants to shut down all servers, they can just type: “/shutdownAllServers” on chat, and boom, every single server will be wiped!

There’s also “/reconnectAllPlayers” which makes every single server teleport every single player into a new server;

I also have a little system, in the case that something goes wrong and the module can’t listen to shut down requests, it will move all players to a different server;



Just so you’re aware teleporting people, even everyone at the same time to the same game will (almost always) not create new servers and will just have people rejoin the game. To my knowledge this only can be achieved by teleporting them to private servers. Also if a new player joins after the kicking loop has ended (probably a possibility) they’d not be kicked and the server will remain so I would make sure that any new players will get kicked as well when shutting down. Also it’s probably not wise at all to teleport everyone to a new server if subscribing fails because it will fail again in a new server (most likely) and players will be rejoining the game continuously.

Yeah i know it’s a bit broken, I’m working in it.