Open in the app to sign in, vote and reply

Help · Done

Hi! I'm developing a game and I want bans and perms to work a specific way.

· · 15 votes · 3 comments · marked done by on 2026-11-13

I want bans to only ban individuals from public servers, and I want users to be able to access these commands in public servers:

And, if users purchase the donation developer product, I want them to have a custom tag appending or prepending their chat message.

How could I do this?

Solved by · See the solution

Comments

Team ·

Hey, just to make sure that I understand, first you want regular users to have these commands? This should be relatively easy via the ingame menu, if you want to code it in via Studio, please let us know! But in-game is generally preferred. Just go to the Dashboard -> Roles -> Player -> Commands -> From Names, and just select them!!
Tags are still something I am personally working on, and have personally ran into issues whilst coding so going to take a while in regard to that but I'll update you once there is an update to do this solely via HD Admin's command execution API to make it as simple and compact as possible!
And the Bans thing is a bit more tricky, actually. You could try to make a role which is below the given at the beggining one which the servers automatically lock, a custom ban command would then remove the user and give them that specific lower role, but that is speculation from my side on how to do so.

· · in reply to Mavreis

I feel like an option for bans to not affect private servers would actually be really helpful, especially for games where you still wish to punish, but don't want to completely restrict creativity. That's the philosophy that my game is built on.
Though, thank you for the in-game method! I was scratching my head trying to figure out how to do it in Studio without knowing! My bad. 😅

· Solution

@Mavreis is spot on for the commands: open the Player role and pick them under CommandsFrom Names, then select the ones you're after like ;fly, ;noclip, ;invisible, ;speed, ;jumpHeight, ;r6, ;r15 and ;to

Video: Discord_RF7eKIBFj4.mp4
Video: Discord_RF7eKIBFj4.mp4

two more things worth doing on the Player role: set Icon to Commands so players who can't chat can still run them from the panel, and if you want private servers to have more freedom, turn on Give ToPrivate Server Owner on whichever role you'd like those owners to get

for the tag, dev products can't be linked to a role the way gamepasses can since there's nothing to own (although that's a feature we're looking to build for the future), so for now it requires a small amount of programming via the API. create a role called Donor, then add this to your ProcessReceipt where the donation goes through:

local hd = game:GetService("ReplicatedStorage"):WaitForChild("HD Admin")
local ServerAPI = require(hd:WaitForChild("Core"):WaitForChild("ServerAPI"))

-- inside your ProcessReceipt
local success = ServerAPI.giveRoleAsync(receipt.PlayerId, "Donor")
if not success then
	return Enum.ProductPurchaseDecision.NotProcessedYet
end
ServerAPI.requestCommand(";chatTag(yellow) role(donor) Donor") -- shows it straight away

then run this once in-game, which gives every donor the tag whenever they join any server:
;permJoinChatTag(yellow) role(donor) Donor

if you're happy for it to be a gamepass instead, add the pass under the role's Give ToProducts and you can skip the code entirely

bans are the tricky one. time and perm bans go through roblox's ban api by default, which blocks the whole game including private servers, so there's no way to limit them to public servers right now. mav's role idea does work though with a short script. create a role called Banned, give it with ;givePermRole <user> banned, then put this in a Script in ServerScriptService:

local Players = game:GetService("Players")
local hd = game:GetService("ReplicatedStorage"):WaitForChild("HD Admin")
local ServerAPI = require(hd:WaitForChild("Core"):WaitForChild("ServerAPI"))

-- only private servers have an owner
if game.PrivateServerOwnerId == 0 then
	Players.PlayerAdded:Connect(function(player)
		if ServerAPI.hasRoleAsync(player, "Banned") then
			player:Kick("You're banned from public servers")
		end
	end)
end

happy to say we're also exploring improvements for private/reserved servers with new APIs like:

and a lot more support for this coming soon too:
https://forum.hdadmin.com/p/q4ep885k9nesksv#comment-tv3q217rfpgg0u8