A simple ban system to ban players.
Link: https://create.roblox.com/store/asset/18532330746/Ban-Module
Tutorial:
Unpack Ban Script to ServerScriptService.
Enable studio access to API Services in Game Settings
To ban or unban players you must call function of module from a server script
In my case i want to ban player if he clicks on the part
UserIds - you must put the id or ids in the arguments. There is no ids limit like in the roblox Ban API.
ApplyToUniverse - if false than player will get ban only on the server where you banned him
Duration - amount of time player banned for, put -1 if you want to ban player permanently
DisplayReason - a message that will appear to player after ban
PrivateReason - a message that will appear in the ban history describing the full reason for the ban
Unban:
GetBanHistory:
Ban history saves in the args in this format:
BanHistory = {
[1] = {
[“PlayerUsername”],
[“PlayerId”],
[“ApplyToUniverse”],
[“BanDuration”],
[“BanDate”],
[“DisplayReason”],
[“PrivateReason”]
}
}
ClearBanHistory:
Amount - set -1 if you want to delete all ban history
If you have any ideas to make this module better please tell in the comments.
If you found any errors please tell in the comments.