How do I make a Banning System with a UI which shows list of the banned players?

I know how to make a command to ban someone, however I dont know how to make a ban system.

The ban system I am making will have

  • A GUI which shows the list of banned players
  • A detailed overview GUI which shows why the user gets banned and who banned the user & also show the information of the user such as username, profile photo and user id. They can be unbanned via the gui

I have no clue on what script and what service do I use for the above and would appriciate any help.

I also wanted to make a custom ban message which is as follows:

You were banned by [AdminName] for [Reason]

3 Likes

here is the gui i made for it, if it will help

2 Likes

There are open-source admin panels that do this. Look in Community Resources.

1 Like

It’s pretty simple. When you ban someone, add their details to a database (i.e. userid, banned by, reason, date banned on). Then, when someone joins check the database and if their userid matches one of the entries, kick them from the game. As for displaying everyone who has been banned, just loop through the database and clone a template for every entry, editing the display name and username. You should also create some string values in the template to store the reason and banned by, and when the template is clicked on, change the text of the textboxes to the right to the content of the string values. This is obviously simplified but is the basic gist of things. Good luck.

Thanks

how do I get the name of Admin who banned the user? And as for cloning the template it has to be in ReplicatedStorage right?

1 Like

how do I get the name of Admin who banned the user?

Just save their username when you ban the person?

And as for cloning the template it has to be in ReplicatedStorage right?

Anywhere where the client can access, but yeah the best place would be replicated storage.

2 Likes

Never save usernames like this. Save the user ID. There is a way to get player usernames from user ID’s, and since usernames can change it is not a good way to store player-specific data.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.