So… What is “moderationservice”, something new that hasn’t been added yet?
I asked the ROBLOX coding assistant to make a script that bans someone from all game servers for 12 hours to give me code, and it provided this:
local ModerationService = game:GetService("ModerationService")
-- Command to ban a player
local function banPlayer(player, targetPlayer)
-- Check if the player has the necessary permissions
if ModerationService:GetUserPermissionLevel(player.UserId) >= Enum.ModeratorLevel.Moderator then
-- Get the target player
local target = Players:FindFirstChild(targetPlayer)
if target then
-- Ban the player for 12 hours
ModerationService:BanUser(target.UserId, "Banned for 12 hours", 12)
print(target.Name .. " has been banned for 12 hours.")
else
print("Player not found.")
end
else
print("You don't have permission to ban players.")
end
end
-- Example command usage: !ban PlayerName
banPlayer("YourUsername", "PlayerName")
No idea what the hell ModerationService is, but I know that Roblox is working on a BanService which might be related to ModerationService (if it exists) ig.
im so confused bc i thought it would give me memorystore/datastore to ban them for 12 hours, but it gave me those 2 codes. i’m gonna actually file a bug report right now, and what the hell is banservice + moderationservice