ServerBan - Ban any user from a server

ServerBan is an easy-to-use module to ban any users from a server.

API

Properties

ServerBan.Config
The ServerBan configuration.

Functions

ServerBan:Banish(UserId)
Bans a player from the server.

ServerBan:Unbanish(UserId)
Unbans a player from the server.

ServerBan:IsBanned(UserId)
Returns whether or not the player is banned from the server.

ServerBan:GetList()
Returns the array of banned UserIds.

Example

local ServerBan = require(game:GetService("ServerStorage").ServerBan)
ServerBan:Banish(game:GetService("Players"):GetUserIdFromNameAsync("proxilom"))

Installation

Roblox Model

1 Like

That’s an interesting function, but it’s not needed when you can just store the player’s name on a table then kick them with a loop everytime they try to join the server. Though, I like the effort, good job.

2 Likes

can you make it a wally package too?