This project is a comprehensive Roblox Admin Commands System based on the new BanAPI. It includes functionalities for banning and unbanning players, checking player ban history, and retrieving player IDs, all integrated with Discord for notification and logging purposes.
Features
Temporarily or permanently ban players with a reason.
Remove bans from players.
Retrieve the ban history log file of a player.
Retrieve a player’s ID based on their username.
Sends notifications to a Discord webhook for all actions.
Installation
Place AdminModule ModuleScript in the ReplicatedStorage.
Place AdminModuleCommandHandler ServerScript in the ServerScriptService.
Place AdminModule ScreenGui in the StarterGui.
Edit the Config ModuleScript.
Make sure that files are placed correctly, like in the screenshot:
Usage
/ban <PlayerID> <Duration> <Reason>
PlayerID - The ID of the player to be banned. [REQUIRED] Duration - The duration of the ban (e.g., 10s, 5m, 2h, 1d). Use -1 for permanent ban. [OPTIONAL] Reason - The reason for the ban. [OPTIONAL]
/unban <PlayerID>
PlayerID - The ID of the player to be unbanned. [REQUIRED]
/checkhistory <PlayerID>
PlayerID: The ID of the player whose ban history you want to check. [REQUIRED]
/getid <Username>
Username - The username of the player whose ID you want to retrieve. [REQUIRED]
Example
To ban a player with ID 12345 for 10 minutes with the reason Spamming, an admin would type:
Added Target's Roblox Profile link to all of the commands.
Also, I tried adding autocomplete as @emblazes requested above, but unfortunately I failed.
As far as I know, you can’t get user input text from Roblox’s new TextChatService.
If I’m wrong, correct me below and I’ll consider adding it.
If you have any requests on what to add to the module, please let me know and I will try to add it.
It looks good but I suggest adding the player photo and more info and change the ui, here is some discord webhook things to look at to help you, https://create.roblox.com/store/asset/17159429235/WebhookServices
pls note that this is no the best one out there, just search “webhook” on resources
Hey there, I just wanted you to know that you have a big security leak in your module. Exploiters can read the Config.lua file in ReplicatedStorage, thus getting your Config.WebhookURL variable.
With that, they can (for example) spam your Discord Server with messages, possibly getting your account/server terminated. (Discord doesn’t like Embed spams)
You can fix it by splitting the Config module into a server shared and client shared part. The server shared part should be somewhere in ServerStorage or ServerScriptService so the Exploiters can’t access it.