How Could I Make a Ban Gui?

Hello, I’m trying to make an Admin Gui for a game I’m making. In that Admin Gui, I have a Ban Panel. I would like to know how I could make a Ban Gui, something like this.

3 Likes

Send the user you want to ban alongside with the reason to the server through a RemoteEvent/RemoteFunction. On the server firstly, check if the client (player) is has access to ban people. Insert the player into a DataStore and kick the player. Create an PlayerAdded event (if you don’t have one already), and every time a player joins the game check if they are banned.

Resources you need:

3 Likes

But what if I want it only as a server ban?

For a server-ban I would create a table on the server and insert the player’s id in it. Each time a player joins I’ll check if the player is in the table. If the player is in the table, you can kick him.

3 Likes

For a Way to Check if the Player Has Access to the ban Panel is By

game.ReplicatedStorage.REMOTEEVENTNAME.OnServerEvent:Connect(function(plr)
if plr.UserId == urUserID or IfSomeoneElse then
else
plr:Kick("Exploiting")
end
end)