BanManager Library

This library facilitates the management of player bans within your Roblox game. With Roblox’s new ban system, you can efficiently ban or unban players for specific durations or permanently. It supports both Player objects and User IDs.

Link to the library: Ban API - Creator Store

How to Use the Library

  1. Import the Library:

    local BanManager = require(game.ServerScriptService.BanManagerModule)
    
  2. Ban a Player on the Current Server Only:

    BanManager:BanOnThisServer(playerOrUserId, "Ban reason", ban duration in seconds)
    

    This function bans a player on the current server instance only, specifying a ban reason and duration in seconds.

  3. Ban a Player Across All Places in the Universe:

    BanManager:Ban(playerOrUserId, "Ban reason", ban duration in seconds)
    

    This function bans a player across all places within the game universe, specifying a ban reason and duration in seconds.

  4. Permanently Ban a Player:

    BanManager:PermanentBan(playerOrUserId, "Ban reason")
    

    Use this function to permanently ban a player, providing a ban reason.

  5. Ban a Player for One Week:

    BanManager:WeekBan(playerOrUserId, "Ban reason", weeks)
    

    Bans the player for a specified number of weeks, providing a ban reason.

  6. Ban a Player for One Month:

    BanManager:MonthBan(playerOrUserId, "Ban reason", months)
    

    Bans the player for a specified number of months, providing a ban reason.

  7. Ban a Player for One Year:

    BanManager:YearBan(playerOrUserId, "Ban reason", years)
    

    Bans the player for a specified number of years, providing a ban reason.

  8. Unban a Player:

    BanManager:Unban(playerOrUserId)
    

    Use this function to unban a player, allowing them to re-enter the game.

3 Likes