An Express-based API that can be used to moderate your ROBLOX game remotely.
Before you can do anything you need to have Node.js and RethinkDB installed on your VPS.
- Clone this repository into a directory on your VPS.
- Run
npm install
to install the required dependencies. - Create a RethinkDB database called whatever you want (e.g.
Sphere
orF3X
) - Within that database, create a table called
bans
. - Configure the ModSystem.js file to your likings. Be sure to change the token and keep it to yourself! Otherwise people can access your API and start messing around with it! Key things that you should change: TOKEN, RethinkDB database name, and port where the API is available.
- Do
node ModSystem.js
to confirm that your API is not erroring out or anything. If you get a message returningconsole.log("Listening on port 9000…");
, it probably means your API is ready to use. However, your API may or may not work if you didn't set up your tables correctly. - When you exit out of your SSH session, the node process running the API will shut down. To prevent that from happening you need a process manager like PM2. Install PM2 on your VPS by running
npm install pm2@latest -g
. When you have PM2 installed, run the ModSystem.js file by doingpm2 start ModSystem.js
. Make sure that you're in the same directory as your API; otherwise, it will not work.
- Clone the ModerationManager.lua script into your ServerScriptService.
- Because the ModerationManager script uses the TryLibrary by The F3X Team, you'll have to make it a child of the script. In order to do that, copy the script from here into the the ModerationManager.lua script.
- Configure the ModerationManager.lua script to your likings. Change the
BaseURL
to the IP address/domain name to your server + the port number. So if your domain name is https://api.sphere.io and you're running the API on port 9000, you'd make theBaseURL
equal to"https://api.sphere.io:9000"
. The other thing you can change is the kick/ban message , found on line 25, that pops up on a user's screen if they've been banned.