Whitelist system | Completely customizable

I decided to create a whitelist system with several parameters

What can he do?

1.Kick players if their id does not match a list
2.Kick the player if he doesn’t have one of the friends Ids in the list
3. Customizable Kick Message
4.Instead of kicking a player, teleports it to another place (if teleportation fails he kicks the player)
5.When teleporting a GUI and localscript prevent the user from seeing the map / chat
6.You can check if a user has a certain rank in a group

What do the Settings look like?

This look like this

local Settings = {}

Settings.allowedUser = {--[[Put userId of player can join the game]]
	604793674, -- Med367367
	-1, -- Player1
Settings.allowedFriendWith = {---[[Put userId, if the user joins the game is friends with one of the userId]]
	604793674, -- Med367367
	-1, -- Player1
Settings.allowedGroups = {--[[Put groupId and rankID, if the user joins the game and is not in the group or don't have the rank he will get kicked / teleported to place]]
	{5707589,255}, -- Group Med Studio Rank Owner

Settings.GameIdRedirect = false --change false for a gameId and the person will teleport in the game corresponding to the ID instead of doing beging kicked.
Settings.kickMsg = "You are not authorized to join this game, please contact the owner"
return Settings

Get the script here

Tell me what you think, I know these are not a very complicated system to do

  • I like it
  • some things need to be fixed (please explain)
  • it is correct
  • i don’t like it

0 voters

I ask myself a question, which option you preferred the most in the script ?

  • the userId list
  • the userId friends list
  • the group system
  • teleport to a place instead of kick

0 voters

If you have any idea for the system, contact me or reply to this post


New Update
Now it is possible to add groups with specific ranks

How would this help developers in a substantial way? Ultimately, this is really simple to make, and wouldn’t take a long time making it. All you have to do is the following:

  1. Have a table of blacklisted/whitelisted players/groups/etc
  2. When a player joins, check their UserId
  3. If they match, they either get kicked out or get to join

The point of custom modules is to make life easier, not to script short code for them.

1 Like

Maybe, but for those just starting out it can be useful if he wants to have fun modifying it
Otherwise, I use the modules because I prefer to do this
And, it’s not easy for everyone to use a table, even if these simple

1 Like

I agree with @VegetationBush. This isn’t really a good community resource in my opinion because it is really simple to make. Most of the devs on the forum here would prefer intermediate/advanced tutorials or systems, which this does not fall under.

Yah I mean its simple to make but there are people who will find use for it. Not all devs in devforum are intermediate or advanced. Atleast, it will help someone


@VegetationBush @PepperGV3 personally I don’t see the need for either one of your comments.
This is a resource thread where the OP has created something for other developers to use, if you don’t find it useful. Don’t use it, others may find it helpful.

Back on topic, this whitelist system seems like it will help some people who don’t really know LUA but need a whitelist system but can’t really trust toolbox, for obvious reasons.

Thank you for contributing to DevForums @Med367367.


True, this might not help many advanced scripters, but it will help beginners or non-scripters who only want to allow friends or groups to join their game. It’s useful for things like showcases, where the creator doesn’t know how to script and needs to whitelist specific players.


Very nice! Even though I could code this in a few minutes this could help many new scripters who don’t want any other people joining their games.

1 Like

Hey dude, thanks for sharing your creation. Overall scripting style looks good, and this should be useful to a select number of group leaders limiting their game’s access. And it’s nice that you’re resource puts a whitelist system into context and backs up a teleporting UI. Found one error on a slight glance, so check that out.

White list groups only consider one group entry. You’re returning false if after checking the player’s status in the first group in the settings table. So remove the else statement on line 32.
Oh lol, also get the user’s actual rank in the group. It looks like your checking if the allowed rank is equal to the group’s id

But overall, this script does seem to accomplish a trivial and very specific task. I would look into modifying this resource to provide greater automation for a more diverse usage.

What if instead, you made a module which returned a series of functions automating whitelists in all sorts of scripts. Like design it so that scripts can create whitelist tables, add/remove elements in those tables. Other scripts could also call whitelist queries with both a user’s name or userid and get returned a bool value. Design it so that queries can be made with two whitelist tables using AND, OR operations to test if a player meets both. I think a SQL inspired whitelist/ blacklist database would be more used and seen.

1 Like

Thank you, I just solved the problem, it will teach me to go too fast x ')

I didn’t test yet, though, if it cant, could you make it so you can use names and userIds? (From what i know, names wasn’t added yet.)

1 Like


Only userIds, yes is possible to add userNames but it would be a little useless because if the user changes his name it does not work anymore.

No one is saying that it isn’t a resource, but the point they are making is that the resource might not be significant enough for this category. Per About the Community Resources category resources in the category “must be more substantial than small scripts or a few individual assets. Resources that are not significant enough, too specific / not useful to many people, or too low quality should be posted in a different forum category”.

Everything can be argued to be helpful to someone (since everyone starts with 0 knowledge at some point), but this section has a threshold so that resources of free collections of extremely simple assets, very basic scripts (ex: basic ban script), etc. are not posted which would clutter up the more significant resources posted.