Blueberry's best feature is that it comes with an API that you can use for your own scripts. With the Blueberry API, you can create your custom moderator panel or automate punishments. Blueberry allows you to set and remove account warnings and bans via the API.



Step 1: requiring the module


Blueberry allows you to access the API via a module script that you will want to require in order to start using it. Make sure to know the path of the Blueberry folder. As said in the set-up tutorial, the Folder will automatically parent itself to the ServerScriptService. 

local BlueberryAPI = require(game.ServerScriptService:WaitForChild("Blueberry").Data.API)


Step 2: using Blueberry functions


Once you have created a variable to store the required module script, you will be able to use it to trigger the API functions. You can currently use:


  • Creating warnings
  • Removing warnings
  • Creating temporary bans
  • Creating permanent bans
  • Removing permanent bans

This is how to properly call the Blueberry API functions:


Creating warnings:

BlueberryAPI:createWarning(username, reason, moderator)
  • username (mandatory) should be a string. It should contain the player's username, and not the player itself.
  • reason (optional) should be a string. It should contain the reason for the issued warning. If there is no reason specified, the default reason, added in the Settings, will be used instead.
  • moderator should be a string. It should contain the name/username of the moderator who issued the warning, and not the player itself. If there is no name specified, the moderator will be set to 'Blueberry Core' automatically.


This will add the warning to the DataStore (database) and the warning will be displayed once the warned user joins the game, or instantly if he is already inside the game.



Removing warnings:

BlueberryAPI:removeWarning(username, reason, moderator)
  • username (mandatory) should be a string. It should contain the player's username, and not the player itself.
  • reason (optional) should be a string. It should contain the reason for the warning removal. If there is no reason specified, it will be automatically set to 'No reason provided for this warning removal'.
  • moderator should be a string. It should contain the name/username of the moderator who removed the warning, and not the player itself. If there is no name specified, the moderator will be set to 'Blueberry Core' automatically.


This will remove the warning from the DataStore (database).



Creating temporary bans:

BlueberryAPI:tempBan(username, duration, reason, moderator)
  • username (mandatory) should be a string. It should contain the player's username, and not the player itself.
  • duration (mandatory) should be a number. It should contain the duration in minutes of how long the player should be banned. If not specified, it will be automatically set to 30 seconds.
  • reason (optional) should be a string. It should contain the reason for the warning removal. If there is no reason specified, it will be automatically set to 'No reason provided for this warning removal'.
  • moderator should be a string. It should contain the name/username of the moderator who removed the warning, and not the player itself. If there is no name specified, the moderator will be set to 'Blueberry Core' automatically.


This will add the to the DataStore (database), and automatically remove it once the player joins and the duration specified passed.




Creating permanent bans:

BlueberryAPI:permBan(username, reason, moderator)
  • username (mandatory) should be a string. It should contain the player's username, and not the player itself.
  • reason (optional) should be a string. It should contain the reason for the permanent ban. If there is no reason specified, the default reason, added in the Settings, will be used instead.
  • moderator should be a string. It should contain the name/username of the moderator who issued the ban, and not the player itself. If there is no name specified, the moderator will be set to 'Blueberry Core' automatically.


This will add the ban to the DataStore (database) and the ban will be displayed once the suspect joins the game, or instantly if he is already inside the game.



Removing permanent bans:

BlueberryAPI:removeBan(username, reason, moderator)
  • username (mandatory) should be a string. It should contain the player's username, and not the player itself.
  • reason (optional) should be a string. It should contain the reason for the ban removal. If there is no reason specified, it will be automatically set to 'No reason provided for this ban removal'.


This will remove the permanently banned user from the DataStore (database).



Kicking (server removing):

BlueberryAPI:kick(username, reason, moderator)
  • username should be a string. It should contain the player's username, and not the player itself.
  • reason should be a string. It should contain the reason for the moderation action.
  • moderator should be a string. It should contain the name/username of the moderator who removed the ban, and not the player itself. If there is no name specified, the moderator will be set to 'Blueberry Core' automatically.


This will remove the suspect's character, display the UI, mute them, and hide their chat, but not actually kick them out unless you have auto-kicking enabled.



Locking servers:

BlueberryAPI:slock(reason, group_id, minimum_rank, moderator)
  • reason should be a string. It should contain the reason for the action.
  • group_id should be a number. It should contain the ID of the group you use. If not specified, it will take the values from the configuration file. 
  • minimum_rank should be a number. It should contain the ID of the ROBLOX group role that will be able to join the server even if it is locked. If not specified, it will take the values from the configuration file.
  • moderator should be a string. It should contain the name/username of the moderator who removed the ban, and not the player itself. If there is no name specified, the moderator will be set to 'Blueberry Core' automatically.


This will lock the sever for everyone below the specified rank, making them unable to join the server.



Unlocking servers:

BlueberryAPI:unslock(moderator)
  • moderator should be a string. It should contain the name/username of the moderator who removed the ban, and not the player itself. If there is no name specified, the moderator will be set to 'Blueberry Core' automatically.


This will unlock the server, making everyone able to join the server again, no matter what their rank is.




You may use this in your own scripts to create your custom logic.


Note: the module can only be used in server-side scripts.