# HD Admin HD Admin is the most installed admin system on Roblox. Over 35 million installs across over 1 million experiences since 2017, over 200 commands, a role system, moderation tools, 20+ themes and a web dashboard, free to install. Developers automatically earn 40% of the revenue from HD Admin products sold in their game. Built with some of the largest games on Roblox to scale past 100,000 live servers. Generated: 2026-11-16T22:50:12Z Pages: 23, each starting with a # heading, its Source URL and a Sections line of heading anchors # What's new in v2 Source: https://hdadmin.com/whats-new-in-v2/ Sections: Overview (#overview), Why use v2? (#why-use-v2), You earn from it (#you-earn-from-it), Built for the largest games (#built-for-the-largest-games), A small heads up (#a-small-heads-up), Upgrading an existing game (#upgrading-an-existing-game) Install (https://hdadmin.com/install/) Try in-game (https://www.roblox.com/games/start?launchData=%7B%22creatorStoreAssetId%22%3A857927023%7D&placeId=106966695720565) ### Overview v2 is a complete re-write we started writing back in 2020 (https://hdadmin.com/history/) with a modernised interface thanks to major help from ImAvafe (https://forum.hdadmin.com/p/d4evskhabkt2dkp). Its features include: - Live Edits: You can now configure everything live in-game as everything saves and syncs. - Roles: Roles replace v1's linear ranks. You can create, edit and reorder roles freely, and choose exactly which commands and permissions each one holds. - Commands: Commands can be customised and run entirely via the interface, meaning even players without chat permissions can run commands. - Tasks: Every command-run is now represented as a 'task' which can be viewed and cleaned up on a dedicated Tasks page. - Modifiers: You can attach modifiers to the front of any command to change how it runs. For example, ``;globalMessage Hello World!`` will broadcast a message to all servers. - Cmdbar: The new command bar includes live suggestions, autocompletes and run history to help you rapidly run commands. Press the Quote (``'``) or Semicolon (``;``) key to open it. - Moderation: Kick, warn and ban users, even when they're offline. Bans reach every server in seconds and can use Roblox's ban API to stop alts. - Themes: The panel now supports Themes, with over 20+ free to pick from, and a space to easily add and configure your own under the loader. ### Why use v2? I have 15 years of experience (https://devforum.roblox.com/u/foreverhd/summary) creating on Roblox, almost a decade making admin systems (https://hdadmin.com/history/). HD Admin v2 is my passion project which encompasses all of that: - **Memory cleanup and performance come first.** The UI only builds for players who can open it, pages load when first visited, and every command cleans up after itself. - **An interface-approach is essential.** Every command and feature must be configurable and runnable via UI so that they can be easily used by mobile players or players who can't chat. - **Type checks improve development.** Commands and configuration fully support typed Luau so that you benefit from autocompletes and type-warnings. See Creating Commands (https://hdadmin.com/custom-commands/). - **Feedback is essential.** It's your feedback which tells us (https://forum.hdadmin.com/) what's important or needs fixing and helps HD Admin to grow. ### You earn from it You can easily connect gamepasses, accessories, bundles, groups and more (https://hdadmin.com/monetisation/) to roles and commands for your players to unlock. There's minimal setup and everything can be configured in-game. Our top creators earn over $250,000 USD a year. ### Built for the largest games HD Admin now scales past 100,000 live servers thanks to improvements made after our partnership with do_small (https://www.roblox.com/users/2243026817/profile). Giving a permanent role or ban, or running a global command will now reach every live server in seconds. See Cross-Server (https://hdadmin.com/cross-server/) for more. ### A small heads up 1. v2 does not read or write from the same datastores as v1. You'll need to reconfigure your roles, bans, settings, etc. See DataStores (https://hdadmin.com/datastores/). 2. v2 commands are structured differently to v1. This provides them with more power, such as automatic cleanup and global broadcasting. See Creating Commands (https://hdadmin.com/custom-commands/). ### Upgrading an existing game v2 is published under the same HD Admin model (https://create.roblox.com/store/asset/857927023/HD-Admin) and MainModule (https://create.roblox.com/store/asset/3239236979/HD-Admin-MainModule). When you're ready to move, take the latest model, remove your old copy, and set up your roles. **Warning** Games running v1 today will keep running v1 when loaded via the MainModule (https://create.roblox.com/store/asset/3239236979/HD-Admin-MainModule), but support for v1 will be discontinued in 2028. Please ensure your game has moved over to v2 before then. # Install Source: https://hdadmin.com/install/ Sections: Install in seconds (#install-in-seconds) Get Model (https://create.roblox.com/store/asset/857927023/HD-Admin) Try in-game (https://www.roblox.com/games/start?launchData=%7B%22creatorStoreAssetId%22%3A857927023%7D&placeId=106966695720565) ### Install in seconds **New place** 1. Get the HD Admin model (https://create.roblox.com/store/asset/857927023/HD-Admin). 2. Click Open in Studio. 3. Publish your game via File > Publish to Roblox. 4. Set ``Enable Studio Access to API Services``, ``Allow HTTP Requests`` and ``Allow Third Party Sales`` to ``true`` within File > Experience Settings > Security if you'd like to test in studio, join the charts (https://www.roblox.com/games/94572088206087/HD-Admin-Charts) and earn from UGC (https://hdadmin.com/monetisation/#earn-from-ugc). **Existing place** 1. Get the HD Admin model (https://create.roblox.com/store/asset/857927023/HD-Admin). 2. Within Studio, open the toolbox via Window > Toolbox and head to Inventory > My Models. 3. Click HD Admin to insert into your place. 4. Set ``Enable Studio Access to API Services``, ``Allow HTTP Requests`` and ``Allow Third Party Sales`` to ``true`` within File > Experience Settings > Security if you'd like to test in studio, join the charts (https://www.roblox.com/games/94572088206087/HD-Admin-Charts) and earn from UGC (https://hdadmin.com/monetisation/#earn-from-ugc). **Info** You're fine to store HD Admin in ``Workspace``, ``ReplicatedStorage``, ``ServerStorage`` and ``ServerScriptService``. Its contents are moved instantly at runtime, so you never need to worry about server-side objects being replicated to clients. **Warning** Don't rename the model. The name ``HD Admin`` is used by commands, so changing it will break them. **Warning** Roblox occasionally inserts toolbox models in a sandboxed state that blocks their scripts from running. If the loader errors the moment you press play, check the Output window. The error includes copy-paste instructions for Studio's Command Bar (enabled via View > Command Bar) that undo the sandboxing. # History Source: https://hdadmin.com/history/ Sections: The interface over the years (#the-interface-over-the-years), Timeline (#timeline), We made an oopsie (#we-made-an-oopsie), Pushing for a fairer Creator Store (#pushing-for-a-fairer-creator-store) ### The interface over the years HD Admin is a project we began back in 2016 and one we've been lucky to be able to continue working on full-time since: - 2017: Credit to Muneeb for the graphic ### Timeline | Year | What happened | |---|---| | 2016 | Ben starts work on an admin panel for his "HD Minigames" | | 2017 | After repeated requests from friends, "HD Admin" is born and released to the Roblox Creator Store | | 2019 | The major Classic rebuild releases | | 2019 | The idea for a ground-up re-write forms at RDC 2019 | | 2020-2023 | The re-write begins, first called "HD Admin V3" and then called "Nanoblox" (yes confusing, apologies), growing into three years of full-time work. Development is paused in 2023 for financial constraints | | 2020-2024 | Consistent updates to Classic, including feature improvements, bug fixes and security patches, alongside advocacy to make Roblox's Creator Store ecosystem fairer for creators (https://hdadmin.com/history/#pushing-for-a-fairer-creator-store) | | 2024 | v1 releases in December, the start of six months spent modernising Classic | | 2025 | v1 is adopted by some of Roblox's largest games like "Steal a Brainrot". That income funds the finishing of the re-write, now named v2 | | 2026 | v2 Beta releases on 24 August | You can find these different versions at the HD Admin Store (https://store.hdadmin.com/models). ### We made an oopsie There have been four versions of HD Admin over the years... | Version | When | What it is | |---|---|---| | **Original** | 2016 to 2019 | The first system | | **Classic** | 2019 to 2024 | The 2019 rebuild which is what most people grew up with | | **v1** | 2024 onwards | Classic after its 2024 modernisation which will be supported until 2028 | | **v2** | 2026 onwards | The current system which is a complete re-write we started in 2020 | ... but we've referred to them by different names which has created some confusion. Our apologies 🙈 | The name you saw | What we call it today | |---|---| | HD Admin V1 | **Original** | | HD Admin v0 | **Original** | | HD Admin V2 | **Classic**, or **v1** from 2024 | | HD Admin V3 | **v2**. This was the first name for the re-write | | Nanoblox | **v2**. This was the next name for the re-write | "Nanoblox" is what we originally planned to call what is now "HD Admin v2", a complete re-write of HD Admin. We began it back in 2020, but it's only now that we finally had the funding and time to finish it. Over this time and from feedback from various people, it became clear that "Nanoblox" was a confusing rename of HD Admin, and that "HD Admin v2" was a clearer name. It also coincided with other applications like TopbarPlus (https://nanoblox.com/topbarplus/) and ZonePlus (https://nanoblox.com/zoneplus/) taking off, so we made the decision to use Nanoblox (https://nanoblox.com/) as the name of our company and collection of software instead of the name of the admin system. So what you might have come to know as Nanoblox is now fully complete and released as HD Admin v2. The v2 Beta came out on 24 August 2026. The version numbers changed for a similar reason. The 2019 rebuild was called "HD Admin V2" because it replaced the 2017 original, which made the re-write "V3". When we returned to it in 2025 we counted the system everyone was already running as v1, and that left v2 as the name for the re-write. **Info** If you see "HD Admin V3" or "Nanoblox" in an old post, it means HD Admin v2. If you see "HD Admin V2" in a post from before 2025, it means what we now call Classic. ### Pushing for a fairer Creator Store We love creating tools for the marketplace. We were fortunate early on to receive an income from HD Admin, which made it possible to work full-time on software and to create applications like TopbarPlus (https://nanoblox.com/topbarplus/) and ZonePlus (https://nanoblox.com/zoneplus/). Applications like these take thousands of hours to create and maintain, and Roblox's 2020 third-party-sales restrictions took away most of our ability to earn from them. We've spent the years since asking Roblox to change this, alongside many other marketplace creators. You can find our main proposals here: | | | |---|---| | 2020 | A whitelist for restricted services (https://devforum.roblox.com/t/a-whitelist-for-restricted-services/676386) | | 2022 | Roblox needs to provide reliable support and monetisation to incentivise the creation of high-quality assets within the Marketplace (https://devforum.roblox.com/t/roblox-needs-to-provide-reliable-support-and-monetisation-to-incentivise-the-creation-of-high-quality-assets-within-the-marketplace/1763092) | | 2022 | Extend Access Permissions for Reusable Packages so that they can be adopted by marketplace applications as an alternative to MainModules (https://devforum.roblox.com/t/extend-access-permissions-for-reusable-packages-so-that-they-can-be-adopted-by-marketplace-applications-as-an-alternative-to-mainmodules/1797331) | | 2022 | Provide a method for third-party applications to process receipts (https://devforum.roblox.com/t/provide-a-method-for-third-party-applications-to-process-receipts-eg-marketplaceserviceprocessspecificreceipts-arrayofproductids-callback/1802730) | | 2024 | Support PSAs to drive investment into the Creator Store (https://devforum.roblox.com/t/support-psas-to-drive-investment-into-the-creator-store/2806503) | | 2024 | Pay-as-your-scale plugins and packages (https://devforum.roblox.com/t/pay-as-your-scale-plugins-and-packages/2844666) | | 2025 | Adding a top Toolbox model to your experience will get you banned for 'Sexual Content' (https://devforum.roblox.com/t/adding-a-top-toolbox-model-to-your-experience-will-get-you-banned-for-sexual-content/3791538) | You can share your own memories of HD Admin on this forum post (https://forum.hdadmin.com/p/d4evskhabkt2dkp) ❤️ # FAQ Source: https://hdadmin.com/faq/ Sections: Is HD Admin free? (#is-hd-admin-free), Is HD Admin safe? (#is-hd-admin-safe), Can I earn money from an admin system? (#can-i-earn-money-from-an-admin-system), Do old school chat commands still work? (#do-old-school-chat-commands-still-work), Does HD Admin work on mobile? (#does-hd-admin-work-on-mobile), How do I install it? (#how-do-i-install-it), Why don't my commands work in another game? (#why-dont-my-commands-work-in-another-game), Can I turn off auto updates? (#can-i-turn-off-auto-updates), Does HD Admin have a web dashboard? (#does-hd-admin-have-a-web-dashboard), How does HD Admin make its money? (#how-does-hd-admin-make-its-money), Which admin system is best for a large game? (#which-admin-system-is-best-for-a-large-game), Where do I report a bug or suggest a feature? (#where-do-i-report-a-bug-or-suggest-a-feature), Which admin system do most Roblox games use? (#which-admin-system-do-most-roblox-games-use), When did HD Admin v2 release? (#when-did-hd-admin-v2-release), What happened to Nanoblox? (#what-happened-to-nanoblox), Is HD Admin v2 the same as "V3"? (#is-hd-admin-v2-the-same-as-v3) ### Is HD Admin free? It's 100% free to install and use in your Roblox game, including its 200+ commands and 20+ themes. ### Is HD Admin safe? HD Admin has a decade of history working closely with Roblox and top developers to ensure its safety and compliance. Its source code is public on GitHub (https://github.com/nanoblox/hd-admin) so you can read exactly what runs in your game. Its lead developer Ben (https://www.roblox.com/users/82347291/profile) has over 15 years of experience directly programming and developing on Roblox. ### Can I earn money from an admin system? With HD Admin, yes. You can very easily connect your own gamepasses, accessories and other products to roles and commands which other players can buy. There's minimal setup and everything can be configured in-game. Our top creators earn over $250,000 USD a year this way. See Monetisation (https://hdadmin.com/monetisation/) for more details. ### Do old school chat commands still work? Yep. Chat commands work as they always did. Our new interface and command bar means everything can now be easily configured and run via UI, which is ideal for mobile players or players who can't chat, but they don't replace traditional chat commands. ### Does HD Admin work on mobile? The panel fully supports mobile, so staff and players on phones get the same tools as on desktop. ### How do I install it? Take the HD Admin model (https://create.roblox.com/store/asset/857927023/HD-Admin) and drop it into ``Workspace`` or ``ServerScriptService``. That's the whole install. Installation (https://hdadmin.com/install/) walks through it. ### Why don't my commands work in another game? Roles are set per experience. Being the Owner of your game doesn't carry over to anyone else's, so the only way to use commands in another game is for its owner to give you a role there. ### Can I turn off auto updates? Auto updates are on by default. Each server loads the latest release at startup, so fixes reach your game without republishing, and the copy bundled inside the model still runs if an update can't be fetched. You can turn auto updates off by selecting the ``HD Admin`` model in Studio, going to the ``Attributes`` section of Properties, adding an attribute named ``AutoUpdate`` of type ``boolean``, and setting its value to ``false``. You'll miss security and performance fixes until you turn it back on, so we strongly recommend against it. **Warning** Modifying the MainModule, or running a modified copy, in any public experience violates the licence (https://github.com/nanoblox/hd-admin/blob/main/LICENSE.md). Private experiences are the one exception. ### Does HD Admin have a web dashboard? Yes, we have an additional dashboard.hdadmin.com (https://dashboard.hdadmin.com) where you can manage your HD Admin games remotely. ### How does HD Admin make its money? We earn from extensions like Themes (https://store.hdadmin.com/themes) and Commands (https://store.hdadmin.com/commands) that we sell via our store (https://store.hdadmin.com/), and paid plans (https://dashboard.hdadmin.com/pricing) that users can optionally upgrade to within their dashboard (https://dashboard.hdadmin.com). We also provide visual-upgrades in-game that players can unlock, such as cosmetics in About. 40% of this revenue goes directly to you the game developer, then 30% to us, 30% Roblox. ### Which admin system is best for a large game? HD Admin was built with some of the largest experiences on Roblox, including partnership with do_small, to run past 100,000 live servers. Bans, role grants and global commands reach every live server in seconds, and any server that starts later. Cross-Server (https://hdadmin.com/cross-server/) covers more details. ### Where do I report a bug or suggest a feature? At our new forum (https://forum.hdadmin.com/). You can post bugs on the Bugs board (https://forum.hdadmin.com/bugs), ideas on the Suggestions board (https://forum.hdadmin.com/suggestions) and questions on the Help board (https://forum.hdadmin.com/help). Sign in with your Roblox account and you'll get a notification when we reply or publish it. ### Which admin system do most Roblox games use? HD Admin. It's the most installed admin system on Roblox, with over 35 million installs across over 1 million experiences since 2017, and games that have used it serve over 190 billion visits between them. ### When did HD Admin v2 release? We released the v2 Beta on 24th August 2026 under the same HD Admin model (https://create.roblox.com/store/asset/857927023/HD-Admin) and share its release notes (https://forum.hdadmin.com/updates) on the forum. See What's new in v2 (https://hdadmin.com/whats-new-in-v2/) for what changed. ### What happened to Nanoblox? It released as HD Admin v2. "Nanoblox" is what we originally planned to call v2, a complete re-write of HD Admin that we began back in 2020. It became clear from feedback that the rename was confusing, so we kept the HD Admin name and now use Nanoblox (https://nanoblox.com/) as the name of our company and collection of software. See History (https://hdadmin.com/history/) for more details. ### Is HD Admin v2 the same as "V3"? Yes. The 2019 rebuild was called "HD Admin V2" at the time, which made the re-write "V3". We now name that 2019 system Classic, and v1 from its 2024 modernisation, so the re-write is v2. If an old post mentions "HD Admin V3" or "Nanoblox", it means today's v2. See Name history (https://hdadmin.com/history/#we-made-an-oopsie) for more info. Apologies for the confusion, we are still learning 🙉 Have a question or issue? Ask at our forum (https://forum.hdadmin.com/) where our team and other developers can answer. For business enquiries, contact ben@nanoblox.com. # Commands Source: https://hdadmin.com/commands/ Sections: Chat commands (#chat-commands), Panel commands (#panel-commands), Command bar (#command-bar), Targeting players (#targeting-players), Modifiers (#modifiers), Limits (#limits), Decide what loads (#decide-what-loads), Vet commands (#vet-commands), Tools (#tools) ### Chat commands You can run commands in chat. The default prefix is ``;``: ```lua ;fly me ;paint all red ``` Your prefix is personal to you and can be changed in the panel under ``You Settings`` (unless the game owner has locked it). To run a command without it appearing in the chat window, put ``/e`` in front: ```lua /e ;fly me ``` ### Panel commands The Commands page in the panel lists every command you can use, and clicking into each one opens its own run page where you can easily fill in its arguments. This is essential for players who can't chat, and also handy when you can't remember what a command expects. ### Command bar There's also an on-screen command bar with live suggestions and autocompletes to rapidly run commands. Your recent commands are also saved so re-running one takes a couple of keypresses. Press the Quote (``'``) or Semicolon (``;``) key to open it. It can only be opened if your role(s) grant Command Bar permission. ### Targeting players Most commands take a player. Part of a name is enough (``;fly ben`` finds Benjamin), or put ``@`` in front to search by username instead of display name, like ``;fly @ForeverHD`` (partial usernames match too). You can also swap the name for a qualifier: | Qualifier | Targets | |---|---| | ``me`` | you | | ``all`` | every player in the server | | ``others`` | everyone except you | | ``random`` | one random player | | ``role(mod)`` | players with those roles | | ``friends`` | players who are friends with you | | ``radius(20)`` | players within that many studs of you | | ``amount(5)`` | that many random players | | ``percent(50)`` | that percentage of the server | | ``team(red)`` | players on those teams | | ``group(123456)`` | players in those Roblox groups | | ``premium`` | players with Roblox Premium | ```lua ;jump others ;kill radius(20) ;give team(red) sword ``` Qualifiers chain with commas, so ``;fly me,role(admin)`` targets you and every admin. Targeting anyone other than yourself, and targeting several players at once, are role permissions too (``Targeting Others`` and ``Multiple Targets``). See Roles (https://hdadmin.com/roles/) for granting these. ### Modifiers Modifiers attach to the front of a command name and change how it runs: ```lua ;unfly me ;globalMessage hello ;permMusic 123456 ``` | Modifier | Effect | Permission | |---|---|---| | ``undo`` (or ``un``) | ends all tasks of this command and/or player | Neutral | | ``preview`` | opens the command's Run page instead of running it | Neutral | | ``random`` | picks one command at random from the statement | Neutral | | ``loop(10,2)`` | repeatedly re-runs, here 10 times with 2 seconds between runs | Abusive | | ``spawn`` | runs now and every time the player respawns | Abusive | | ``delay(5)`` | waits that many seconds before running | Abusive | | ``schedule(1767225600)`` | runs at the given epoch time | Abusive | | ``expire(30)`` (or ``until``) | ends after that many seconds | Abusive | | ``join`` | runs on players when they join this server | Global | | ``global`` | runs once on all servers | Global | | ``perm`` | runs on every server and future servers | Global | | ``permSpawn`` | runs now and every time the players respawn, on this server and every future server they join | Global | | ``permJoin`` | runs on players when they join, on every server and future servers | Global | | ``permLoop`` | repeatedly re-runs, on every server and future servers | Global | | ``permDelay`` | waits then runs, on every server and future servers | Global | | ``permSchedule`` | runs at the given epoch time, on every server and future servers | Global | | ``unperm`` | ends all permanent tasks of this command and/or player | Global | **Important** **Abusive** and **Global** modifiers require the ``Modifiers Abusive`` and ``Modifiers Global`` role permissions to be used. Be VERY careful who you grant these to, since a single global command can reach every server in your experience. ### Limits Commands are rate and size limited so that players can't overwhelm your server. Each role contains a ``Commands Per Minute`` and ``Requests Per Second`` and your highest value across the ones you own wins. A single request is also capped at the ``RequestSizeLimit`` game setting, 1000 characters by default. **Important** Roles with ``Bypass Limits`` skip these checks so be careful who you grant it to. ### Decide what loads You decide exactly which commands load into your game. Your loader's Config > Commands contains seven default modules (``Owner``, ``Dev``, etc) that pull in pre-built collections of commands through ``Internal.loadCommands``: ```lua -- Config/Commands/Admin local modules = script:FindFirstAncestor("HD Admin").Core.MainModule.Value.Modules local Internal = require(modules.Internal) return Internal.loadCommands({ modules = {"AdminPack"}, -- what collection to load (e.g. "AdminPack", "ModUtility", etc) exclude = {"LoadMap", "SaveMap"}, -- commands to be skipped from loading onlyInclude = {}, -- when not-empty, ONLY these commands load tag = script.Name, -- the tag added to every command loaded here which is then used in the 'From Tags' selector in role settings modify = { -- a way to change how a command is defined before it loads, keyed by command name map = function(command) command.config.loadMapOnStart = true end, }, }) ``` You can find these pre-built collections under MainModule > Value > Modules > Internal > Commands (e.g. ``"AdminPack"`` or ``"DevPack"``) and can even specify smaller collections like ``"ModUtility"``, ``"Movement"``, etc. If a module is never referenced via ``loadCommands``, its code is never required, client modules never loaded, and assets never replicated to clients. **Warning** Removing commands that a page depends on will disable its features. For example, if the ``ban`` command is never loaded, then the Ban page's 'Add Ban' features stop working. ### Vet commands We frequently add new commands to HD Admin, and although these get grouped under the most appropriate pack (therefore roles), developers have often asked for a second-say in what commands get added to their experience. To solve this, we've created a new ``Vet Commands`` section: Roles with the ``Vet Commands`` edit permission will see a new Vet button at the top of the Commands page. This opens the Vet section with three tabs: | Tab | What it holds | |---|---| | **Pending** | New commands awaiting a decision. Only vetters can run these, so you can safely test before approving | | **Approved** | Commands everyone with access can use | | **Disabled** | Commands nobody can run, not even the Owner. Like Pending, they're also hidden from the Commands page | See a list of all commands here (https://hdadmin.com/roblox-admin-commands/). **Tip** By default, "Auto Approve New" is set to ``true``, so you must toggle this in-game to ``false`` if you'd like new commands to always enter Pending. **Info** A majority of future commands will be published under ``ExtraPack``, meaning even if "Auto Approve New" is set to ``true``, you won't need to worry about these new commands being added randomly to your commands page, as the "Extra" tag is not by default used in any roles. Instead, you'll be notified anytime a new command is added, then you can decide to add it to an existing or new role or not. ### Tools You don't need to worry about setting up ``;give`` and ``;giveAll`` as HD Admin looks through ``ReplicatedStorage``, ``ServerStorage``, ``Lighting`` and ``StarterPack`` for every ``Tool`` instance. Those found are what show up on the Run page and command bar suggestions. If you'd rather keep them all in one place, drop them into HD Admin > Config > Tools. # Roles Source: https://hdadmin.com/roles/ Sections: Roles, not ranks (#roles-not-ranks), The default roles (#the-default-roles), Giving people roles (#giving-people-roles), Link commands to roles (#link-commands-to-roles), Permissions (#permissions), Previewing roles (#previewing-roles) ### Roles, not ranks v1 locked you into a fixed ladder of six ranks with limited permissions. v2 replaces them with named roles that you can create, reorder and edit freely so your structure can be whatever suits your game. Each role includes the commands its members can use, the permissions they hold, and the panel pages they can view or edit. **Info** The order of the roles list matters. A role's rank comes from its position rather than a fixed number, so dragging a role up the list makes it more senior. ### The default roles You start with six roles: | Role | What it can do | |---|---| | **Owner** | Has every permission. The game creator receives it automatically | | **Dev** | Can edit roles and game settings, and use global modifiers | | **Admin** | Can use admin commands, cancel tasks, and use abusive modifiers like ``loop`` | | **Mod** | Can use moderation commands and pages like Bans, Warns and Logs | | **Fun** | Can use fun commands, ideal as a sellable perk | | **Player** | Given to everyone, with minimal commands | ### Giving people roles There are three easy ways to give and take roles in-game: 1. **Automatic 'givers'.** See Link commands to roles (https://hdadmin.com/roles/#link-commands-to-roles) below for more info. 2. **Profile page.** Type ``;profile ``, or in the panel go to Menu > Roles > Server or Permanent and click into a user (or add a new one). Add a role, then choose whether it applies permanently or just for the current server. 3. **Commands.** For example: ```lua ;givePermRole @foreverhd mod ;giveServerRole @foreverhd mod ;takeRole @foreverhd ``` ### Link commands to roles After applying tags and deciding what commands to load (https://hdadmin.com/commands/#decide-what-loads) in-studio, or even after creating your own (https://hdadmin.com/custom-commands/), you can now easily link commands to roles in-game. Simply open the settings of your desired role and scroll down to Role Settings > Commands. You can then customise your role to inherit commands three ways: | Setting | What it grants | |---|---| | **From Roles Below** | The commands of every role ranked below this one | | **From Tags** | Any command carrying one of the chosen tags, such as the pack tags from your loader (``Admin``, ``Fun``, etc) | | **From Names** | Individually chosen commands | These stack, so a role holds the combined commands of all three. You can then click ``View Commands`` to see the full list of commands that role can use. ### Permissions Anyone with permission can view and change the settings of a role in-game, and edits save automatically and sync to every server within seconds: | Permission | What it does | |---|---| | **All command permissions** | Turns on every command permission below. It is only that, it never skips a role, rank or vetting check. Dangerous | | **Targeting Others** | Run commands on other players, not just yourself (like ``;jump @ForeverHD``) | | **Multiple Targets** | Target more than one player in a single run (like ``;fly others``) | | **Block Commands** | Lets members turn on the ``Block commands`` and ``Block prompts`` You Settings, which stop equal or lower roles acting on them | | **Modifiers Abusive** | Use potentially abusive modifiers like ``loop``, ``spawn`` and ``delay`` | | **Modifiers Global** | Use the cross-server modifiers ``global``, ``perm`` and ``join``. Extremely dangerous | | **Bypass Limits** | Ignore rate, size and command-specific limits. Dangerous | | **From Roles Below** | Use the commands of every role ranked below this one | | **From Tags** | Use any command carrying one of the listed tags | | **Commands Per Minute** | How many commands a member can run each minute | | **Requests Per Second** | How many requests a member can send each second | | **Preview Roles** | Preview and act as any role at or below this one | | **All view permissions** | Grants every view permission | | **Icon** | Whether the topbar icon shows, and which page it opens | | **Pages** | Which panel pages the role can open | | **Unavailable Commands** | Show commands the member can't use, buy or unlock | | **All edit permissions** | Grants every edit permission. Dangerous | | **Edit Roles** | Create, edit, delete and reorder roles below this one | | **Edit Tasks** | Pause, resume and cancel any running task | | **Edit You Settings** | Edit personal settings like theme, prefix and sound | | **Edit Game Settings** | Make universe-wide setting changes. Dangerous | | **All Prompts** | Show every notice to members | | **Warnings** | Show warning notices like invalid command or missing permission | | **Welcome** | Show the welcome notice on join | **Tip** Roles no longer have to inherit all commands below them, and you can customise permissions like 'can players of this role target other players'. ### Previewing roles Users with permission can preview other roles. This means they can act as any role at or below their own rank, to see exactly what a different role experiences. This is useful for example for testing what players can unlock after setting up gamepasses. Previewing never escalates anything. Safety checks always use your real roles, so previewing can't be used to slip past rank checks in either direction. # Monetisation Source: https://hdadmin.com/monetisation/ Sections: Sell roles with commands (#sell-roles-with-commands), Earn from UGC (#earn-from-ugc) ### Sell roles with commands You earn 100% (minus Roblox's cut) from gamepasses and products that you connect to HD Admin roles: 1. Create your asset. HD Admin supports gamepasses, accessories, bundles, emotes, library assets and groups. 2. In-game, open HD Admin Menu > Roles and click into (or create) the role you would like to connect the asset with. 3. In that role's settings, scroll down to Give To > Products (or Give To > Groups for groups) and add your product using its ID, then click confirm. Your asset will now be connected to the role. 4. Connect the commands you would like members of that role to use. See Link commands to roles (https://hdadmin.com/roles/#link-commands-to-roles) for more info. 5. All done! Anyone attempting to use these commands will now be prompted to purchase or join the product, and anyone who owns it is granted the role automatically. **Tip** Use the Preview feature (https://hdadmin.com/roles/#previewing-roles) to see how unlocking commands looks for normal players. ### Earn from UGC When a player runs an emote or wears a bundle through HD Admin, they'll have the ability to purchase the original UGC behind that item. 40% of that revenue goes straight to you with no-setup, 30% to its original creator, and 30% Roblox. Users can also purchase HD Admin's own UGC via the About page that come with minor visual effects. Ensure that you've enabled ThirdPartySales (https://hdadmin.com/install/#__tabbed_1_2) to earn from this. # Moderation Source: https://hdadmin.com/moderation/ Sections: Bans (#bans), Loader bans (#loader-bans), Warns (#warns), Commands (#commands) ### Bans Bans can be given in-game through the Moderation section or via the ban commands. They sync to every server within seconds and even reach players who are offline or have never joined your game before, applying the moment they arrive. Bans by default go through Roblox's Ban API to also catch a users alt accounts. **Important** HD Admin does not yet support an unlimited number of bans. For now, it only supports a few thousand, and we're aiming to improve this limit for a future release. ### Loader bans For bans you want to keep in Studio, add entries to ``Config > Bans`` keyed by UserId. ``reason`` is required and everything else is optional: ```lua return { [123456789] = { reason = "Example", }, [12345] = { type = "expire", bannedBy = 222333, expiresAt = 1767225600, reason = "Example", }, } ``` ``type`` can be ``"perm"`` (the default) or ``"expire"`` with a Unix time ``expiresAt``. Static bans never call Roblox's BanService. ### Warns **Coming soon** These can be handed out to players and stacked. They will trigger automatic actions such as a kick or ban at custom warn amounts. ### Commands HD Admin comes with commands to help moderate your experience. These include: | Command | Description | |---|---| | ``;kick `` | removes the player from the server with your reason shown on their screen | | ``;mute `` | blocks the player from chatting until the task ends or they leave | | ``;punish `` | removes the player's character, returning it when the task ends | | ``;follow `` | teleports you to the server that user is playing in | | ``;ban `` | bans the user, letting you pick between a Server, Time or Perm ban | | ``;serverBan `` | bans the user from this server only, clearing when the server shuts down | | ``;timeBan `` | bans the user everywhere for the given duration | | ``;permBan `` | bans the user everywhere until they're unbanned | | ``;unban `` | lifts the user's active bans | | ``;unServerBan `` | lifts a server ban issued on this server | The ban commands accept users who are offline or have never joined, and part of a name is enough to target someone in-server. Time and perm bans can also catch a user's alt accounts through Roblox's ban API. Each command has its own role permission, so you can for example grant mods ``;serverBan`` without giving them the game-wide bans. # Settings Source: https://hdadmin.com/settings/ Sections: You Settings (#you-settings), Game Settings (#game-settings), "Use Studio Defaults" (#use-studio-defaults) ### You Settings Each player gets their own 'You Settings' where they can customise personal settings like appearance, content scale, prefix, and volume sliders. Choices save to the player's profile and follow them between servers. Editing these require the ``You Settings`` Role Edit Permissions which the default Player role grants to everyone. You can lock any of these 'You Settings' via a toggle under Game Settings. While a switch is off, everyone uses the game default for that setting. Locking a You Setting doesn't delete anything. Each player's saved choice is kept and restores the moment you re-enable the switch. ### Game Settings Game settings apply to your whole game and can be edited from the Settings page by roles with ``Game Settings`` Edit Permissions. Every change is validated on the server before it lands, then saved and synced like everything else. This covers the majority of game settings from v1, including the default prefix, theme, primary colour, volumes and minimum age. **Info** A few settings cannot be configured in-game, including ``Partitions`` and ``DataGroupName``. They must instead be set in-studio via Config under the HD Admin model. ### "Use Studio Defaults" In-game edits are stored as changes on top of these defaults, never as replacements. The two Use Studio Defaults switches on Roles and Game Settings revert your game to the Config files without deleting anything. Flip one back off and your live edits return. # Cross-Server Source: https://hdadmin.com/cross-server/ Sections: Everything syncs (#everything-syncs), Built for the biggest games (#built-for-the-biggest-games), The Partitions setting (#the-partitions-setting) ### Everything syncs Bans, warns, role grants, role edits, setting changes and saved permanent commands all replicate to every running server within seconds. Given roles and bans reach players who are offline or have never joined your game, and their profiles prepare in advance and apply the moment they join a server. ### Built for the biggest games HD Admin was built with help from do_small and some of the largest games on Roblox to make sure it scales from the smallest games right up to those with over 100,000 live servers. It keeps one source of truth in DataStores, notifies servers over MessagingService, and moves the actual data through MemoryStore partitions. When servers start-up, they read from MemoryStore snapshots instead of the actual DataStores, so that even tens-of-thousands of servers restarting at once won't exhaust your experience's data budgets. ### The Partitions setting A single partition comfortably supports experiences with 20,000 live servers. If your experience may exceed 100,000 live servers, raise the partition limit in the ``Settings`` module of your loader's ``Config``: ```lua ["SystemSettings"] = { Partitions = 5, -- the default is 5, which comfortably covers 100,000 live servers } ``` **Info** All of this happens automatically and the defaults suit the vast majority of games, so you'll probably never need to touch this setting. # DataStores Source: https://hdadmin.com/datastores/ Sections: Only changes are saved (#only-changes-are-saved), Safe by design (#safe-by-design), Resetting data (#resetting-data) HD Admin keeps all of its saved data in a single DataStore called ``HDAdmin``: This is organised through two paths, ``PlayerStore`` and ``GameStore``: ...which contain the following data: | Data | Key | |---|---| | A player's profile | ``HD/PlayerStore/[USER_ID]/Profile`` | | Game-wide data (roles, game settings, vetted commands, etc) | ``HD/GameStore/Game`` | | Bans | ``HD/GameStore/Bans`` | | Permanent role members | ``HD/GameStore/Members`` | | Warns | ``HD/GameStore/Warns`` | | Logs | ``HD/GameStore/Logs`` | ### Only changes are saved v1 wrote a player's entire dataset on every save. v2 instead tracks the difference against defaults and saves only what actually changed. If a player never changes a setting, gains a role, or receives a ban, nothing is ever written for them. Game-wide edits work the same way too, where only the fields you change are stored, while the defaults are filled back in at startup. **Info** This keeps profiles small, write-requests minimal, and reduces what HD Admin adds to your DataStore budget. ### Safe by design We've designed the way HD Admin handles data to mirror the best practises of top games: | Feature | What it does | |---|---| | **Session locking** | Player profiles are session-locked, so two servers can never write over each other's changes if a player hops servers quickly or appears in two at once | | **Self-cleaning** | Expired time-bans, server-scoped entries and stale records are dropped automatically when data loads, so old junk never builds up in storage | | **GDPR ready** | Player data is saved with the player's UserId attached, so Roblox's right-to-erasure tooling tracks it automatically | | **Studio friendly** | If Studio API access is disabled, HD Admin falls back to defaults with a single console notice instead of erroring | ### Resetting data Config > Settings comes with a setting called ``DataGroupName`` (default ``"HD"``) that you can change to fully reset all data from HD Admin, including player profiles, roles and bans. **Tip** The old data is untouched if you change ``DataGroupName``, so switching back to its original value will restore all previous data. # Dashboard Source: https://hdadmin.com/dashboard/ The Dashboard (https://dashboard.hdadmin.com) is HD Admin's web app. It connects to the model running in your games, enabling you to manage HD Admin and run commands remotely without opening Studio or joining a server. Linking takes seconds: you simply run ``;linkDashboard `` in-game. Its main benefit is keeping your HD Admins synced across multiple games. Your linked games form a Network, and roles, settings, moderation and custom commands can all sync across it, so you set things up once and every game follows. Ban someone in one game and they're banned in all of them. It also tracks revenue and command usage over time, lets you run commands and handle bans from the browser, and stores custom commands that sync into every game's loader. Dashboard (https://dashboard.hdadmin.com) # Using the API Source: https://hdadmin.com/using-the-api/ Sections: Getting the API (#getting-the-api), Reference pages (#reference-pages) HD Admin's internals are constantly changing so it's essential your game code never touches anything directly within the MainModule. This is where the APIs come in handy. They wrap useful behaviours behind functions that remain the same so that your code never breaks in future updates. ## Getting the API From a server ``Script``: ```lua local hd = game:GetService("ReplicatedStorage"):WaitForChild("HD Admin") local ServerAPI = require(hd.Core.ServerAPI) ``` From a client ``LocalScript``: ```lua local hd = game:GetService("ReplicatedStorage"):WaitForChild("HD Admin") local ClientAPI = require(hd.Core.ClientAPI) ``` From a command module (Config > Commands): ```lua local CommandAPI = require(script:FindFirstAncestor("HD Admin").Core.CommandAPI) ``` This works, no matter where your model is located, because HD Admin moves its shared files into ReplicatedStorage when the game starts. **Tip** If you'd like type checking and autocompletes when using the API, move your HD Admin model into ReplicatedStorage ## Reference pages | | | |---|---| | Task API (https://hdadmin.com/task-api/) | The task object your commands receive | | Command API (https://hdadmin.com/command-api/) | Everything a command module can safely reference | | Server API (https://hdadmin.com/server-api/) | Commands, roles, moderation, emotes, prompts and settings from server Scripts | | Client API (https://hdadmin.com/client-api/) | The panel, prompts and settings from LocalScripts | **Info** If you'd like another API function/event added, share it with us on the Suggestions board (https://forum.hdadmin.com/suggestions). # Custom Commands Source: https://hdadmin.com/custom-commands/ Sections: Commands (#commands), Create your own (#create-your-own), Client commands (#client-commands), Command fields (#command-fields), Custom arguments (#custom-arguments), Args (#args), Persistence (#persistence), Buffs (#buffs), Networking (#networking), Prompts (#prompts) **Tip** You can browse for bonus commands here (https://store.hdadmin.com/commands). ### Commands Commands are simply tables of information describing what they are and how they should run. They've been designed their way for a few key reasons: | | | |---|---| | **Memory** | When a command is run, it can now be represented as a 'task' which staff can easily view and cancel. They automatically clean themselves up so that memory is never leaked, and designed so that you don't even have to write a separate ``undo`` function. | | **Reach** | Because tasks are no-longer dependent on a specific player running the command (i.e. the caller), any command can work with any modifier, meaning commands you write are instantly broadcastable to all servers. | | **Safety** | Arguments are validated before ``run`` is ever called, so a ``Player`` argument arrives as a real Player, a ``Number`` always arrives within its allowed range, etc. Your code never handles raw text, and callers can never run a command their roles can't use. | | **Interface** | The Run page, command bar suggestions and autocompletes are generated automatically from your ``args``, so every command you write is instantly usable by players who can't chat. | | **Typed** | Commands are fully typed, so annotating your commands with ``CommandAPI.Commands`` gives you autocompletes and type warnings as you write. | ### Create your own Under Config > Commands, simply extend upon the existing ``Custom`` module, or add your own module with as many command tables as you like: ```lua --!strict -- LOCAL local TAGS = {"CoolCommands"} local StarterPlayer = game:GetService("StarterPlayer") local CommandAPI = require(script:FindFirstAncestor("HD Admin").Core.CommandAPI) local getHumanoid = CommandAPI.getHumanoid local getHRP = CommandAPI.getHRP -- COMMANDS local commands: CommandAPI.Commands = { -------------------- { name = "Jump", args = {"Player"}, tags = TAGS, run = function(task: CommandAPI.Task) local target = task.target local humanoid = getHumanoid(target) if not humanoid then return end humanoid.Jump = true end, }, -------------------- { name = "Fire", args = {"Player"}, tags = TAGS, run = function(task: CommandAPI.Task) local target = task.target local hrp = getHRP(target) if not hrp then return end task:keep("UntilTargetRespawns") local fire = task.janitor:add(Instance.new("Fire")) fire.Parent = hrp end, }, -------------------- } return commands ``` ### Client commands Command code by default is only available and run on the server, whereas may need it to run on the client. To overcome this, a ModuleScript named ``Client`` can be added under the command module, with command tables containing ``name`` values that match the commands on the server: **Server** ```lua --!strict -- LOCAL local TAGS = {script.Name} local CommandAPI = require(script:FindFirstAncestor("HD Admin").Core.CommandAPI) -- COMMANDS local commands: CommandAPI.Commands = { -------------------- { name = "Flash", args = {"Player"}, tags = TAGS, run = function(task: CommandAPI.Task) local target = task.target task.client:run(target) end, }, -------------------- } return commands ``` **Client** ```lua --!strict -- LOCAL local CommandAPI = require(script:FindFirstAncestor("HD Admin").Core.CommandAPI) local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") -- COMMANDS local clientCommands: CommandAPI.ClientCommands = { -------------------- { name = "Flash", run = function(task: CommandAPI.Task) local localPlayer = Players.LocalPlayer local playerGui = localPlayer:FindFirstChildOfClass("PlayerGui") if not playerGui then return end local screenGui = Instance.new("ScreenGui") screenGui.Name = "HDCustomFlash" screenGui.IgnoreGuiInset = true screenGui.DisplayOrder = 999 local frame = Instance.new("Frame") frame.BackgroundColor3 = Color3.new(1, 1, 1) frame.Size = UDim2.fromScale(1, 1) frame.Parent = screenGui screenGui.Parent = playerGui local tween = TweenService:Create(frame, TweenInfo.new(1), {BackgroundTransparency = 1}) tween.Completed:Once(function() screenGui:Destroy() end) tween:Play() end, }, -------------------- } return clientCommands ``` **Info** You don't replicate anything yourself. The framework detects any child module named ``Client`` and moves it to players automatically. ### Command fields Every field except ``name`` is optional: | Naming | | |---|---| | ``name`` (Shared) | The command title displayed and what players type after their prefix. It doubles as the undo name, so ``;speed`` ends with ``;unspeed`` | | ``aliases`` (Server) | Other names that trigger this command`` | | ``undoAliases`` (Server) | Names that undo the command instead of running it (e.g. ``NoClip`` uses ``{"Clip"}``) | | ``description`` (Server) | A sentence shown under the command on its run page | | ``credit`` (Server) | Who to credit for the command (e.g. ``{"GigsD4X"}``) | | Running | | |---|---| | ``args`` (Server) | The arguments your command takes (e.g. ``"Player"``, "Text", ``"Number"``, etc. You can find the full list under MainModule > Value > Modules > Parser > Args | | ``run`` (Shared) | Your command's code. On the server, it's given a task and the validated arguments, while on the client its given a task then what the server passed to it in ``task.client:run`` | | ``replication`` (Client) | A function where data returned from the server lands. Your client calls ``task.server:replicate``, the server's ``task.client.replicator`` picks who receives it, then this runs on their client| | ``config`` (Server) | Default values game devs can change through ``modify`` when they load internal commands | | ``cooldown`` (Server) | Seconds to wait after the command finishes before it can run again | | ``stackable`` (Server) | Typically only one command can be active on any player/server at once, but when this is ``true``, it enables several at once | | ``groups`` (Server) | Commands sharing a group undo each other on the same player (e.g. ``Fly`` and ``NoClip`` are both in group ``"Flight"``, so starting one ends the other) and share a ``cooldown``. Two groups have extra meaning: ``"Prompt"`` marks message style commands, which spend the one a minute text limit even with nothing typed and are filtered by the Block prompts setting, and ``"Map"`` marks commands that edit the map, so the first one to run quietly keeps a copy for ``;clearmap`` | | Reach | | |---|---| | ``tags`` (Server) | The tags this command will inherit, which is then used by roles to decide what commands to inherit | | ``disableModifiers`` (Server) | Prevents Modifiers (https://hdadmin.com/commands/#modifiers) being used on the command | | ``disableGlobalModifiers`` (Server) | Prevents the global modifiers (e.g. ``global``, ``perm``, ``join``, etc) being used on the command | | Interface | | |---|---| | ``order`` (Server) | Its position on the commands page. Lower numbers come first | | ``hide`` (Server) | Hides the command from the Commands page | | ``autoPreview`` (Server) | When a command is run via chat or the quick-preview button, it opens the Run page instead of running the command (e.g. ``Ban`` uses this to confirm the details first) | ### Custom arguments The built-in arguments (under MainModule > Value > Modules > Parser > Args) cover most arguments you'll need, but if you'd ever like to create your own, you can do so under ``Config > Args``: ```lua return function(Args) return { ["Radius"] = Args.createAliasOf("Number", { display = "Radius", min = 0, max = 500, step = 1, default = 50, }), } end ``` **Warning** Make sure the name you choose doesn't match any of HD Admin's built-in arguments, otherwise it'll warn on startup and one will win over the other. If you'd like to modify the argument(s) of a single command, you can alternatively swap its arg name for an arg table: **Arg Table** ```lua args = { "Player", {arg = "Number", display = "Speed", default = 50, min = 0, max = 1000, step = 1, logarithmic = true}, }, ``` **Arg Name** ```lua args = { "Player", "Number", }, ``` **Tip** This is useful when you want to update the constraints of an arg without replacing its behaviour entirely: **Text that other players see** Roblox's age safety policies limit text a player shows to others to one a minute. HD Admin filters every text arg and spends a one-minute limit for its type which every command of that type shares: | Arg | Use it for | |---|---| | ``"Text"`` | Anything shown as a message, hint, notice, alert or poll | | ``"SurfaceText"`` | Names, titles and labels shown over a player or in the world | | ``"ChatText"`` | Chat tags and chat names | | ``"Reason"`` | Kick and ban reasons | To pick the type yourself, add ``textSurface`` to an arg table, like ``{arg = "Text", textSurface = "SurfaceText"}``. Use ``"None"`` for text that only sometimes shows to others then call checkTextLimit (https://hdadmin.com/command-api/#checktextlimit-server) at the moment it does. ### Args To retrieve a commands arg, use ``task:getArg()`` and specify either its name or index: **Name** ```lua args = {"Player", "Number"}, run = function(task: CommandAPI.Task) local target = task:getArg("Player") local number = task:getArg("Number") -- ... end ``` **Index** ```lua args = {"Player", "Number"}, run = function(task: CommandAPI.Task) local target = task:getArg(1) local number = task:getArg(2) -- ... end ``` **Note** Retrieving an arg via its index is necessary when a command has two or more of the same arg: ``{"Player", "Number", "Number"}`` When ``"Player"`` is used as the first arg, its command is run separately on every player that was targeted. In this scenario, you can use ``task.target`` to refer to the ``"Player"``: ```lua args = {"Player", "Number"}, run = function(task: CommandAPI.Task) local target = task.target local number = task:getArg("Number") -- ... end ``` ### Persistence A task is destroyed the moment ``run`` finishes. This is fine for commands like ``;jump`` which end instantly... but less desirable for commands such as ``music`` which want their effects to remain. As a result, any command that we wish to keep alive must go through ``task:keep``: ```lua task:keep("UntilTargetRespawns") ``` | Persistence | The task ends when | |---|---| | ``"UntilTargetRespawns"`` | the target respawns or leaves | | ``"UntilTargetLeaves"`` | the target leaves | | ``"UntilCallerRespawns"`` | whoever ran the command respawns or leaves | | ``"UntilCallerLeaves"`` | whoever ran the command leaves | | ``"Indefinitely"`` | someone ends it with ``;un``, or the player leaves | **Tip** You can combine multiple 'keeps' together. For example, doing ``task:keep("UntilTargetLeaves")`` and ``task:keep("UntilCallerLeaves")`` will end the command when either its caller or target leave the server. ### Buffs Changing properties, such as ``WalkSpeed`` in humanoids, is typically a straightforward job. You just set set its property to your desired value and all done. This becomes slightly more complex when multiple commands are involved. Lets pretened your health is ``100``, and you run ``;health me 500`` then ``;god me``. ``;health`` initially sets your health to ``500``, then ``;god`` changes it to ``99999``. This works fine... but what if you then want to remove the ``god`` task while keeping ``health``? In a lot of admin systems, the undoing of ``god`` would just reset your health back to ``100``, ignoring the still-applied ``health`` task. This is undesirable, and where buffs come in handy: ```lua task:buff(target, "WalkSpeed", function(hasEnded: boolean, original: any) local humanoid = getHumanoid(target) local before = if humanoid then humanoid.WalkSpeed else StarterPlayer.CharacterWalkSpeed if humanoid then humanoid.WalkSpeed = if hasEnded then original else task:getArg("Number") end return before end) ``` A buff is just your code plus the group it belongs to (such as ``"WalkSpeed"`` in this example). Every time a task in that group starts or ends, all of its buffs are run again in order, so your property always lands on whatever the final command wants. You can also return an original value, meaning the value that gets remembered by the earliest buff in the group. When the last buff is removed, your property can be set back to this original value, so your health returns to ``100`` rather than whatever the previous command happened to leave behind. ### Networking To reach our client commands from the server, we utilise ``task.client``: **Server** ```lua local part = Instance.new("Part") task.client:expose(target, part) task.client:run(target, part , "Hello this is a part from the server") ``` **Client** ```lua run = function(task: CommandAPI.Task, part, message) print("part, message =", part, message) end ``` **Important** Using ``task:expose`` is essential for newly created instances/models on the server that we want to share with clients, otherwise there's a possibility they won't be received There are often times when the client would also like to share information with the server, or even other clients. For example, when using ``;laserEyes``, we want other clients to see our laser beams and where we're pointing them. To achive this, we utilise ``task.server``: **Client sends** ```lua -- The client's device knows something that others don't task.server:replicate(targetCFrame, lookCFrame) ``` **Server decides** ```lua -- Your chance to pick who sees it, and to throw out anything dodgy task.client.replicator = function(replicateTo, targetCFrame, lookCFrame) if typeof(targetCFrame) ~= "CFrame" or typeof(lookCFrame) ~= "CFrame" then return end for _, player in getTargets("OthersNearby", target, 100) do replicateTo(player, target, targetCFrame, lookCFrame) end end ``` **Others receive** ```lua -- Runs on every client the server chose in the same client module replication = function(target: Player, targetCFrame: CFrame, lookCFrame: CFrame) -- Show it happening on their screen end, ``` **Important** It's important you check the values within the replicator are what you expect as the client is always capable of sending malicious or different values **Info** Nothing reaches another player unless your ``replicator`` sends it, so a client can't quietly broadcast whatever it likes. The amount of replication-requests is also capped internally, and over potential abuses from clients accounted for ### Prompts Running commands is one thing... but tweaking them while they run is even nicer. This is where you can use ``task:bindPrompt`` to give the caller a card they can adjust: ```lua local function applyLaserColour() local colour = task:getArg("Color") -- set the beam colours, eye colours, etc end applyLaserColour() task:bindPrompt({ args = {"Color"}, onChange = applyLaserColour, }) ``` You can also add ``buttons`` for one-off actions: ```lua task:bindPrompt({ title = "Teleport", text = `Click to teleport to '{placeName}'`, deactivate = false, endOnClose = true, -- dismissing the card ends its task buttons = { { label = "Teleport", onActivate = onActivate, }, }, }) ``` Every key the card accepts, including ``confirm`` buttons, extra toggles and the Re-run button, is listed under task:bindPrompt (https://hdadmin.com/task-api/#taskbindprompt-server). For plain notices and messages see prompt (https://hdadmin.com/command-api/#prompt-shared). You can learn more details on tasks and their available methods at Task API (https://hdadmin.com/task-api/). # Custom Themes Source: https://hdadmin.com/custom-themes/ Sections: Themes (#themes), Add your own (#add-your-own), Keep it simple (#keep-it-simple) **Tip** You can browse for bonus themes here (https://store.hdadmin.com/themes). ### Themes HD Admin comes with over 20 free themes, from ``Dark`` to``Light``, to ``Cyberpunk``, ``Cafe`` and ``Tycoon``. Every game and player (if permitted) can pick their own from the Settings (https://hdadmin.com/settings/) page. ### Add your own Simply add a ModuleScript under ``Config > Themes`` with any of the following values: ```lua return { Color = { Primary = Color3.fromRGB(92, 124, 255), Neutral = Color3.fromRGB(39, 39, 42), NeutralDark = Color3.fromRGB(17, 17, 18), NeutralContent = Color3.fromRGB(61, 61, 63), NeutralStroke = Color3.fromRGB(49, 49, 52), NeutralContentMain = Color3.fromRGB(212, 212, 216), NeutralContentDark = Color3.fromRGB(161, 161, 170), Base = Color3.fromRGB(24, 24, 27), BaseContent = Color3.fromRGB(255, 255, 255), Success = Color3.fromRGB(34, 197, 94), Error = Color3.fromRGB(239, 68, 68), Warning = Color3.fromRGB(251, 191, 36), Info = Color3.fromRGB(34, 211, 238), }, Font = { Body = "rbxasset://fonts/families/BuilderSans.json", Heading = "rbxasset://fonts/families/BuilderSans.json", }, FontWeight = { Light = Enum.FontWeight.Light, Regular = Enum.FontWeight.Regular, Body = Enum.FontWeight.SemiBold, Bold = Enum.FontWeight.Bold, Heading = Enum.FontWeight.Heavy, }, TextSize = { Title = 22, Subtitle = 18, Body = 16, Label = 14, Small = 12, }, Layout = { CornerRadius = 6, StrokeThickness = 1, Spacing = 18, Padding = 16, Sizing = 16, ContentScale = 1, }, Sound = { Hover = "rbxassetid://10066936758", Click = "rbxassetid://16480549841", Focus = "rbxassetid://16480549841", Switch = "rbxassetid://9119713951", }, Settings = { LayoutOrder = 100, -- its position in the themes list ShowInYouSettings = true, -- players can pick it as their personal theme LockPrimaryColor = false, -- stop players changing the primary colour over this theme LockFont = false, -- stop players changing the font over this theme }, } ``` ### Keep it simple A theme builds from the base ``Dark`` theme, so you only need to include the changes that you want: ```lua return { Settings = { LayoutOrder = 20, ShowInYouSettings = true, }, Color = { Neutral = Color3.fromRGB(255, 255, 255), NeutralDark = Color3.fromRGB(200, 200, 206), NeutralContent = Color3.fromRGB(210, 210, 216), NeutralStroke = Color3.fromRGB(200, 200, 206), NeutralContentMain = Color3.fromRGB(82, 82, 91), NeutralContentDark = Color3.fromRGB(145, 145, 155), Base = Color3.fromRGB(234, 234, 239), BaseContent = Color3.fromRGB(55, 55, 65), }, } ``` # Task API Source: https://hdadmin.com/task-api/ Sections: Methods (#methods), task:keep (Server) (#taskkeep-server), task:getArg (Server) (#taskgetarg-server), task:setArg (Server) (#tasksetarg-server), task:buff (Server) (#taskbuff-server), task:updateBuffs (Server) (#taskupdatebuffs-server), task:redo (Server) (#taskredo-server), task:bindPrompt (Server) (#taskbindprompt-server), task.client:run (Server) (#taskclientrun-server), task.client:expose (Server) (#taskclientexpose-server), task.server:replicate (Client) (#taskserverreplicate-client), task:tween (Shared) (#tasktween-shared), task:createSound (Shared) (#taskcreatesound-shared), task:onEnded (Shared) (#taskonended-shared), task:onEndedForGood (Shared) (#taskonendedforgood-shared), task:destroy (Shared) (#taskdestroy-shared), Scheduling (Shared) (#scheduling-shared), Properties (#properties), task.target (Server) (#tasktarget-server), task.qualifiers (Server) (#taskqualifiers-server), task.caller (Server) (#taskcaller-server), task.janitor (Shared) (#taskjanitor-shared), task.config (Server) (#taskconfig-server), task.extra (Shared) (#taskextra-shared), task.isActive (Shared) (#taskisactive-shared), task.commandKey (Shared) (#taskcommandkey-shared), task.isReplay (Server) (#taskisreplay-server) Every time a command runs, it creates a task for every target. This task is then passed through to ``run``, and is responsible for how long the command lives for, networking, cleanup and much more. ## Methods #### task:keep (Server) ```lua task:keep(persistence: Persistence?) ``` Keeps the task alive after ``run`` returns, otherwise it's destroyed straight away. Your options are ``"UntilTargetRespawns"``, ``"UntilTargetLeaves"``, ``"UntilCallerRespawns"``, ``"UntilCallerLeaves"`` and ``"Indefinitely"``. Call it more than once and the conditions combine, so the task ends on whichever happens first. See Persistence (https://hdadmin.com/custom-commands/#persistence). #### task:getArg (Server) ```lua task:getArg(nameOrPosition: string | number, ignoreDefault: boolean?): any ``` Reads the validated value of the given arg name or position. This value can be determined by its arg's ``default``, the validated value given by the caller, a validated value a prompt changed it to, or a value set with ``task:setArg()``. Pass ``true`` as the second argument to receive ``nil`` when the caller never gave the arg and its value only came from the arg's ``default``. This is handy for optional args where you want to fall back to your own behaviour, like how ``;message`` works out a duration from the text length unless one was typed. #### task:setArg (Server) ```lua task:setArg(nameOrPosition: string | number, value: any) ``` Changes the value of the given arg name or position. #### task:buff (Server) ```lua task:buff(player: Player, group: string, priority: number?, callback: (hasEnded: boolean, original: any) -> any) ``` Changes a property, re-applies the changes to that property when buffs in the same group change, then resets the property to its original value when the task ends. See Buffs (https://hdadmin.com/custom-commands/#buffs). #### task:updateBuffs (Server) ```lua task:updateBuffs(player: Player?, group: string?) ``` Re-runs the buffs for that player and group. This is handled automatically for most scenarious, so only useful when you forcefully want to update everything in that group. #### task:redo (Server) ```lua task:redo(player: Player?, callback: () -> ()) ``` Runs your callback right away, then again every time the player respawns while the task is alive. Useful for effects which would otherwise vanish on respawn. #### task:bindPrompt (Server) ```lua task:bindPrompt(config) ``` Gives the caller an action prompt tied to the command, such as the slider on ``;speed`` or the eye colour on ``;laserEyes``: ```lua run = function(task: CommandAPI.Task) task:keep("UntilCallerLeaves") task:bindPrompt({ title = "Dangerous Script", text = "This script uses HttpService, are you sure you want to load it?", audience = task.caller, duration = 20, deactivate = false, endOnClose = true, buttons = { { label = "Load", onActivate = function() --loadScript() task:destroy() end, }, { label = "Cancel", style = "Neutral", onActivate = function() task:destroy() end, }, }, }) end, ``` **Config** | Key | Type | What it does | |---|---|---| | ``title`` | string | The prompt's heading, defaults to the command's name | | ``text`` | string | The body text | | ``subtext`` | string | A smaller line under the text | | ``audience`` | Player | Who sees the prompt, defaults to ``task.target`` | | ``duration`` | number | Seconds before the prompt dismisses itself. Defaults to ``0`` which represents an infinite duration | | ``args`` | table | The command args to expose as controls, see Controls (https://hdadmin.com/task-api/#controls) | | ``onChange`` | function | ``function(argName, value)``, runs after a control changes an arg | | ``toggle`` | table | An extra on/off switch which isn't tied to an arg, ``{label = "Trails", value = true, onChange = function(isOn) end}`` | | ``buttons`` | table | One-off action buttons, see Buttons (https://hdadmin.com/task-api/#buttons) | | ``deactivate`` | boolean | Defaults to ``true``, which gives the prompt a switch that pauses and resumes the command, and a Stop button which ends it. Set ``false`` for a prompt that's only buttons | | ``rerun`` | boolean | Adds a re-run button which cleans up and runs the command again. Only shows when ``deactivate`` is ``false`` | | ``endOnClose`` | boolean | Closing the prompt by default ends the task. Setting this to ``false`` keeps it running until the client dismisses it | **Controls** {: #controls } To make an arg controllable by the action prompt, add its name to ``args`` within ``bindPrompt``. A ``Number`` becomes a slider, a ``Color`` a colour picker, a ``Bool`` a toggle, etc. Whenever the client changes one, the arg updates and your ``onChange`` fires, so just call ``task:getArg`` again to read the new value. No need to validate anything either, every value is checked exactly as if it were typed in chat: ```lua run = function(task: CommandAPI.Task) local function applySpinSpeed() local speed = task:getArg("Number") -- spin the character at this speed end applySpinSpeed() task:bindPrompt({ args = {"Number"}, onChange = applySpinSpeed, }) end, ``` **Buttons** {: #buttons } Buttons are just as easy. Give each one a ``label`` and an ``onActivate`` function, and that function runs on the server whenever the client pressed it. It's fine to yield here too (a purchase prompt, a datastore call, etc) as the button simply shows a spinner until you're done: | Key | Type | What it does | |---|---|---| | ``label`` | string | The text on the button | | ``onActivate`` | function | What happens when it's pressed | | ``style`` | string | ``"Primary"`` by default, or ``"Neutral"`` for a greyed out look, ideal for Cancel | | ``confirm`` | boolean | Adds a ``Confirm?`` step so it only fires when pressed twice, handy for anything powerful like a ban confirmation | A button can end its own task with ``task:destroy()`` which is what single-use command prompts like ``;teleport`` do. #### task.client:run (Server) ```lua task.client:run(player: Player?, ...) task.client:runAll(...) task.client:runOthers(originPlayer: Player, ...) task.client:runNearby(originPlayer: Player?, radius: number, ...) ``` Runs your matching client command on players' devices, passing anything extra straight through. ``run`` targets one player, ``runAll`` everyone, ``runOthers`` everyone but the originPlayer, and ``runNearby`` those within ``radius`` studs. See Networking (https://hdadmin.com/custom-commands/#networking). #### task.client:expose (Server) ```lua task.client:expose(player: Player, instances: Instance | {Instance}) task.client:exposeAll(instances: Instance | {Instance}) ``` Makes sure its instances have actually reached the player before your client code goes looking for them. Streaming can hold things back, so anything you create on the server and use on the client should go through here first. #### task.server:replicate (Client) ```lua task.server:replicate(...) ``` Sends values from a client command back up to the server, where they land on the same task. Set ``task.client.replicator`` on the server to choose who they go on to, then they arrive in that command's ``replication`` function. See Networking (https://hdadmin.com/custom-commands/#networking). #### task:tween (Shared) ```lua task:tween(instance: Instance, tweenInfo: TweenInfo, properties: {[string]: any}): Tween ``` Plays a tween which is cleaned up with the task, so it never outlives the command. #### task:createSound (Shared) ```lua task:createSound(soundType: SoundType?): Sound ``` Creates a Sound which the task owns and cleans up. This sounds Volume and Pitch can then be configured by all players under their YouSettings. The ``SoundType`` defaults to ``"Command"`` if it's not set. #### task:onEnded (Shared) ```lua task:onEnded(callback: () -> ()) ``` Runs your callback every time the task ends. This is equivalent to doing ``task.janitor:add(callback)``. #### task:onEndedForGood (Shared) ```lua task:onEndedForGood(callback: () -> ()) ``` Runs your callback only when the task has ended, AND if no identical task is created right afterwards. This is useful for commands like ``;serverLock Admin`` which displays a notice when the command is run (``"This server has been locked for Admins"``) and finishes (``"This server has been unlocked"``), except if we were to then run ``;serverLock Mod``, we don't want the previous command to run its 'finish' notice, we only want to prompt the new 'run' notice. #### task:destroy (Shared) ```lua task:destroy() ``` Ends the task forcefully and cleans up everything it owns. This is what ``;un`` calls behind the scenes. #### Scheduling (Shared) ```lua task.spawn(callback: () -> ()) task.defer(callback: () -> ()) task.delay(seconds: number, callback: (() -> ())?) task.wait(seconds: number?) task.iterate(count: number, callback: (index: number) -> ()) task.loop(callback: (stop: () -> (), index: number) -> ()) ``` These are task-aware wrappers of Roblox's own ``task`` scheduling. These are essential so that the command can be kept alive while active, or so that they can be automatically cancelled when their task is cleaned up (such as someone calling ``undo`` before the task ends). Just use them as you'd normally use Roblox's task methods and HD Admin handles the rest internally. ## Properties #### task.target (Server) ```lua task.target: Player ``` The player the command is running on. If your first argument is ``Player`` then there's always one, because HD Admin splits the run into a separate task for each matched player, so you can use it without checking. Commands which take a collective ``Players`` argument aren't split this way, so it's left empty. ``task.targetUserId`` holds their UserId and is there even while they're offline. #### task.qualifiers (Server) ```lua task.qualifiers: {[string]: {string}} ``` Who the caller targetted in their original command string. ``;clone others`` gives you ``{others = {}}``, while a bare ``;clone`` gives you an empty table. It's always a table, so it's safe to read directly. #### task.caller (Server) ```lua task.caller: Player? ``` Whoever ran the command, or ``nil`` when the server did (or if within a server receiving a global command where the caller is not in your server). ``task.callerUserId`` is always present, so use this instead if you need their UserId. #### task.janitor (Shared) ```lua task.janitor:add(item): typeof(item) ``` A Janitor object (https://github.com/howmanysmall/Janitor) which you can give instances, connections and functions to aid in their automatic cleanup. For example: ```lua local fire = task.janitor:add(Instance.new("Fire")) fire.Parent = targetsHumanoidRootPart ``` #### task.config (Server) ```lua task.config: {[string]: any} ``` The command's own ``config`` table, including anything a pack changed through ``modify`` in ``Config > Commands``. This is how a command reads a setting the game owner is meant to be able to change, like ``;insert``'s allow and deny lists. #### task.extra (Shared) ```lua task.extra: {[string]: any} ``` A table of additional information that you can add to that outlives deactivation until a task is completely ended. #### task.isActive (Shared) ```lua task.isActive: boolean ``` ``true`` while the task is running, ``false`` once it starts ending. Use this within loops so your effect can stop right away if it was for example forcefully ended. #### task.commandKey (Shared) ```lua task.commandKey: string ``` The lowercased name of the command this task is running. #### task.isReplay (Server) ```lua task.isReplay: boolean ``` ``true`` when a saved permanent command is being replayed as a server starts, instead of someone running it right now. Useful for limiting prompts in perm commands that we dont want the caller to see automatically again (such as a ;music prompt when joining each new server). # Command API Source: https://hdadmin.com/command-api/ Sections: Loading (#loading), loadCommands (Server) (#loadcommands-server), Prompts (#prompts), prompt (Shared) (#prompt-shared), Character (#character), getHumanoid (Shared) (#gethumanoid-shared), getHRP (Shared) (#gethrp-shared), getHead (Shared) (#gethead-shared), getNeck (Shared) (#getneck-shared), getTorso (Shared) (#gettorso-shared), loadCharacter (Server) (#loadcharacter-server), Players (#players), getUserInfoAsync (Shared) (#getuserinfoasync-shared), getNameFromUserIdAsync (Shared) (#getnamefromuseridasync-shared), teleportAsync (Server) (#teleportasync-server), getAllowedTargets (Server) (#getallowedtargets-server), unequipTools (Server) (#unequiptools-server), Tasks (#tasks), getTasks (Shared) (#gettasks-shared), getTasksByCallerId (Shared) (#gettasksbycallerid-shared), Chat (#chat), systemMessage (Shared) (#systemmessage-shared), checkTextLimit (Server) (#checktextlimit-server), forceBubbleChat (Shared) (#forcebubblechat-shared), Outfits (#outfits), getDescription (Server) (#getdescription-server), applyDescription (Server) (#applydescription-server), outfitBuff (Server) (#outfitbuff-server), setFakeBodyParts (Server) (#setfakebodyparts-server), clearFakeBodyParts (Server) (#clearfakebodyparts-server), runBundleId (Server) (#runbundleid-server), Assets (#assets), registerSound (Shared) (#registersound-shared), setAnchored (Shared) (#setanchored-shared), setTransparency (Shared) (#settransparency-shared), promptPurchaseAsync (Server) (#promptpurchaseasync-server), ownsAssetAsync (Server) (#ownsassetasync-server), isTypeAsync (Server) (#istypeasync-server), loadAssetCommand (Server) (#loadassetcommand-server), getToolsInfoAsync (Server) (#gettoolsinfoasync-server), Utility (#utility), getTargets (Server) (#gettargets-server), setCameraSubject (Client) (#setcamerasubject-client), runPromptCommand (Server) (#runpromptcommand-server), runEmoteId (Server) (#runemoteid-server), createEmoteCommand (Server) (#createemotecommand-server), createBundleCommand (Server) (#createbundlecommand-server), bindEmotePrompt (Server) (#bindemoteprompt-server), openProfile (Server) (#openprofile-server), openPage (Server) (#openpage-server), openEmotes (Server) (#openemotes-server), colourRoleName (Shared) (#colourrolename-shared), isTableEmpty (Shared) (#istableempty-shared), round (Shared) (#round-shared), Types (#types), Commands (#commands), Command (#command), Task (#task), ClientCommands (#clientcommands), ClientCommand (#clientcommand), UserInfo (#userinfo), ToolInfo (#toolinfo), PromptType (#prompttype), PromptOptions (#promptoptions), PromptHandle (#prompthandle) Everything a command can safely reference lives in ``CommandAPI``: ```lua local CommandAPI = require(script:FindFirstAncestor("HD Admin").Core.CommandAPI) ``` ## Loading #### loadCommands (Server) ```lua CommandAPI.loadCommands(details): Commands ``` This is what the pack modules under ``Config > Commands`` use to load, tag and modify their command sets. Open any of the packs there to see it in action. ## Prompts #### prompt (Shared) ```lua -- In a server command module CommandAPI.prompt(promptType: PromptType, player: Player, text: string, options: PromptOptions?): PromptHandle -- In a client command module CommandAPI.prompt(promptType: PromptType, text: string, options: PromptOptions?): PromptHandle ``` Shows a notice, message or card. For action prompts with buttons, see bindPrompt (https://hdadmin.com/task-api/#taskbindprompt-server). | Prompt type | What it shows | |---|---| | ``"info"`` ``"success"`` ``"warn"`` ``"error"`` | A sidebar notice with a sound effect | | ``"message"`` | A centre-screen message used for example in ``;message`` | | ``"hint"`` | A small bar at the top of the screen used for example in ``;hint`` | | ``"privateMessage"`` | A sticky sidebar notice which opens the full message when clicked | | ``"alert"`` | A sticky sidebar notice that loops a sound until muted and opens the full message when clicked | | ``"action"`` | A sidebar notice with buttons and controls. Create these with task:bindPrompt (https://hdadmin.com/task-api/#taskbindprompt-server) | ```lua CommandAPI.prompt("success", task.caller, "Quest complete!", {duration = 5}) ``` It returns a connection that you can disconnect ``connection:Disconnect()`` to end the prompt. You can add these for example to a task's janitor to end it as soon as the command ends: ```lua task.janitor:add(CommandAPI.prompt("hint", task.target, "You're frozen until an admin releases you", {duration = 0})) -- 0 means "infinite" ``` **Options** All of these are optional and work on every prompt type unless the row says otherwise: | Option | Type | What it does | |---|---|---| | ``title`` | string | The heading above the text. ``privateMessage`` and ``alert`` set their own | | ``duration`` | number | Seconds before the prompt dismisses itself. Leave it out and one is worked out from the text length. ``0`` keeps it on screen until it's dismissed or disconnected | | ``subtext`` | string | A smaller line under the text | | ``icon`` | string | An ``rbxassetid://`` image which replaces the notice's icon | | ``color`` | Color3 | Tints the text of a ``hint`` | | ``dismissable`` | boolean | ``false`` hides the close button, so only ``duration`` or the handle can remove it | | ``openPage`` | string | Clicking the notice opens the panel on this page, like ``"Commands"``, ``"Roles"``, ``"Settings"`` or ``"About"`` | | ``openProfile`` | boolean | Clicking the notice opens the player's own profile | | ``openImage`` | table | ``{image = "rbxassetid://...", title = "Map", ratio = 16/9}``. Clicking the notice opens the image centre-screen | | ``linkButtons`` | table | Small buttons along the foot of the notice. ``{label = "Roles", page = "Roles"}`` opens a page and ``{label = "Profile", profile = true}`` opens their profile. Add ``style = "Neutral"`` for a muted button, and ``hideAfterPress = true`` to close the notice once pressed. From a ``LocalScript`` through the Client API (https://hdadmin.com/client-api/#prompt-shared), ``{label = "Shop", onActivate = function() ... end, icon = "rbxassetid://..."}`` runs your own function instead | | ``roleBadges`` | table | Role badges under the title, ``{{name = "Admin", color = Color3.fromRGB(255, 170, 0)}}`` | | ``countdown`` | number | Counts down live from this many seconds wherever ``%TIME%`` appears in the text | | ``fromUserId`` | number | Shows that user's avatar, name and top role as the sender of a ``message``, ``privateMessage`` or ``alert`` | | ``userText`` | boolean | Shows the text exactly as written without rich text tags etc | ```lua CommandAPI.prompt("info", task.caller, "You've unlocked the VIP role", { title = "New role", openPage = "Roles", roleBadges = {{name = "VIP", color = Color3.fromRGB(255, 170, 0)}}, }) ``` For action prompts with buttons, see bindPrompt (https://hdadmin.com/task-api/#taskbindprompt-server). ## Character #### getHumanoid (Shared) ```lua CommandAPI.getHumanoid(player: Player?): Humanoid? ``` The player's Humanoid, or ``nil`` if their character isn't present. #### getHRP (Shared) ```lua CommandAPI.getHRP(player: Player?): BasePart? ``` The player's HumanoidRootPart, or ``nil``. #### getHead (Shared) ```lua CommandAPI.getHead(player: Player?): (BasePart?, Model?) ``` The player's Head and their character, or ``nil``. #### getNeck (Shared) ```lua CommandAPI.getNeck(player: Player?): Motor6D? ``` The player's neck joint, or ``nil``. Works for both R6 and R15 rigs. #### getTorso (Shared) ```lua CommandAPI.getTorso(player: Player?): Instance? ``` The player's torso, or ``nil``. Works for both R6 and R15 rigs. #### loadCharacter (Server) ```lua CommandAPI.loadCharacter(player: Player?) ``` Respawns the player's character. Always use this over ``player:LoadCharacter()`` so HD Admin's tasks know the respawn was intentional. ## Players #### getUserInfoAsync (Shared) ```lua CommandAPI.getUserInfoAsync(userId: number | string): (boolean, UserInfo | string) ``` Returns ``true`` and the UserInfo (https://hdadmin.com/command-api/#userinfo) for any user, even offline ones, or ``false`` and a reason. Results are cached, so repeat calls are free. #### getNameFromUserIdAsync (Shared) ```lua CommandAPI.getNameFromUserIdAsync(userId: number | string): (boolean, string) ``` Returns ``true`` and the user's name, or ``false`` and a reason. Works for offline users. #### teleportAsync (Server) ```lua CommandAPI.teleportAsync(player: Player?, cframe: CFrame): (boolean, string) ``` Moves the player's character to the given CFrame, unseating them first so they don't drag their seat along. #### getAllowedTargets (Server) ```lua CommandAPI.getAllowedTargets(task: Task, options: {players: {Player}?}?): ({Player}, {Player}) ``` The players a command can act on, which is by default everyone in the server *minus* those with **Block commands** enabled in their You Settings. #### unequipTools (Server) ```lua CommandAPI.unequipTools(player: Player?): (boolean, string) ``` Moves the player's equipped tool back into their backpack. ## Tasks #### getTasks (Shared) ```lua CommandAPI.getTasks(commandKey: string?, targetUserId: number?): {Task} ``` Returns the running tasks, optionally filtered by command and target. These are the same task objects the Task API (https://hdadmin.com/task-api/) describes. #### getTasksByCallerId (Shared) ```lua CommandAPI.getTasksByCallerId(callerUserId: number): {Task} ``` Every running task started by the given caller. ## Chat #### systemMessage (Shared) ```lua -- In a server command module CommandAPI.systemMessage(player: Player, text: string) -- In a client command module CommandAPI.systemMessage(text: string) ``` Sends a system-styled message into the player's chat. #### checkTextLimit (Server) ```lua CommandAPI.checkTextLimit(task: Task, textKind: "Message" | "SurfaceText" | "ChatText" | "Reason"): (boolean, number?) ``` HD Admin limits the sending of message-related featured due to Roblox's age safety policies, so this provides a way to see that cooldown. It returns ``true`` when text can be shown, otherwise ``false`` with the cooldown time remaining. ```lua args = {"Player", "Leaderstat", {arg = "String", textSurface = "None"}}, run = function(task) local stat = task:getArg("Leaderstat") local text = task:getArg("String") if stat:IsA("StringValue") then if not CommandAPI.checkTextLimit(task, "SurfaceText") then return end end stat.Value = text end, ``` | Kind | Shared by | |---|---| | ``"Message"`` | Messages, hints, notices, alerts, private messages and polls | | ``"SurfaceText"`` | Names, titles, team names and stats | | ``"ChatText"`` | Chat tags and chat names | | ``"Reason"`` | Kick and ban reasons | #### forceBubbleChat (Shared) ```lua CommandAPI.forceBubbleChat(target: Player | Model, text: string) ``` Shows a chat bubble above the player's character, or above any model or part you pass instead. ## Outfits #### getDescription (Server) ```lua CommandAPI.getDescription(humanoid: Humanoid): HumanoidDescription ``` The humanoid's current HumanoidDescription. #### applyDescription (Server) ```lua CommandAPI.applyDescription(humanoid: Humanoid?, description: HumanoidDescription?, properties: {[string]: any}?): HumanoidDescription? ``` Applies the HumanoidDescription safely, retrying when Roblox rejects the first attempt. Pass ``properties`` to tweak fields on top of the base description. #### outfitBuff (Server) ```lua CommandAPI.outfitBuff(target: Player, properties: {[string]: any}) ``` Applies HumanoidDescription properties as a buff which undoes itself when the task ends, so commands like ``;wormify`` clean up on their own. #### setFakeBodyParts (Server) ```lua CommandAPI.setFakeBodyParts(character: Model, info: {[string]: any}): (() -> ())? ``` Swaps body parts for command-made stand-ins and returns a function that restores the originals. #### clearFakeBodyParts (Server) ```lua CommandAPI.clearFakeBodyParts(character: Model) ``` Removes those stand-ins again. #### runBundleId (Server) ```lua CommandAPI.runBundleId(task: Task, bundleId: number, properties: {[string]: any}?) ``` Dresses the task's target in a catalog bundle, restoring their own outfit when the task ends. ## Assets #### registerSound (Shared) ```lua CommandAPI.registerSound(sound: Sound) ``` Required for any Sound your command creates, so the game's volume and pitch settings apply to it. #### setAnchored (Shared) ```lua CommandAPI.setAnchored(instance: Instance, anchored: boolean) ``` Anchors or unanchors every part under the instance. #### setTransparency (Shared) ```lua CommandAPI.setTransparency(instance: Instance, transparency: number) ``` Fades every part under the instance. #### promptPurchaseAsync (Server) ```lua CommandAPI.promptPurchaseAsync(assetId: number, player: Player?, infoType: Enum.InfoType?) ``` Prompts the player to purchase the asset, routing to the right purchase flow for its type. #### ownsAssetAsync (Server) ```lua CommandAPI.ownsAssetAsync(assetId: number, player: Player?): boolean ``` Whether the player owns the asset. #### isTypeAsync (Server) ```lua CommandAPI.isTypeAsync(assetId: number, assetType: Enum.AssetType | Enum.BundleType): (boolean, string?) ``` Verifies the asset is of the given type. Returns ``true``, or ``false`` and the reason. #### loadAssetCommand (Server) ```lua CommandAPI.loadAssetCommand(assetType: Enum.AssetType, task: Task, assetId: number, callback: (item: Instance) -> ()) ``` Verifies the asset is of the given type and permitted, inserts it, then hands it to your callback to place. This powers ``;gear``. #### getToolsInfoAsync (Server) ```lua CommandAPI.getToolsInfoAsync(): (boolean, {ToolInfo} | string) ``` Returns ``true`` and the ToolInfo (https://hdadmin.com/command-api/#toolinfo) of every tool available to ``;give``, or ``false`` and a reason. ## Utility #### getTargets (Server) ```lua CommandAPI.getTargets(targetType: "All" | "Others" | "Nearby" | "OthersNearby", originPlayer: Player?, radius: number?): {Player} ``` Resolves a qualifier into the players it covers right now. ``"Nearby"`` and ``"OthersNearby"`` measure from the origin player, using ``radius`` studs (50 by default). #### setCameraSubject (Client) ```lua CommandAPI.setCameraSubject(newSubject: Instance) ``` Points the local player's camera at a new subject, like another player's Humanoid for ``;view``. #### runPromptCommand (Server) ```lua CommandAPI.runPromptCommand(promptType: PromptType, task: Task, targets: {Player}, text: string, options: PromptOptions?) ``` The engine behind ``;message``, ``;hint`` and similar prompts. It filters the text, shows the prompt to every target, and keeps the task alive until the prompt expires. #### runEmoteId (Server) ```lua CommandAPI.runEmoteId(task: Task, emoteId: number, speed: number?, looped: boolean?) ``` Plays the emote animation on the task's target, ending it when the task ends. #### createEmoteCommand (Server) ```lua CommandAPI.createEmoteCommand(emoteName: string, emoteId: number, properties: {[string]: any}?): Command ``` Returns a complete emote command, ready to drop into your commands array. ``properties`` overrides any field on the generated command. #### createBundleCommand (Server) ```lua CommandAPI.createBundleCommand(commandName: string, bundleId: number, properties: {[string]: any}?): Command ``` The same behaviour for bundle commands like ``;ratdance``. #### bindEmotePrompt (Server) ```lua CommandAPI.bindEmotePrompt(task: Task, target: Player, emoteId: number, emoteName: string?, isLooped: boolean?) ``` Binds the emote action card to the task, so the target can favourite the emote or view it in the catalog. #### openProfile (Server) ```lua CommandAPI.openProfile(player: Player?, userId: number) ``` Opens the given user's profile popup for the player. #### openPage (Server) ```lua CommandAPI.openPage(player: Player?, pageId: string, tabLabel: string?) ``` Opens the player's panel straight onto the given page, optionally onto one of its tabs. #### openEmotes (Server) ```lua CommandAPI.openEmotes(player: Player?) ``` Opens the emotes popup for the player. #### colourRoleName (Shared) ```lua CommandAPI.colourRoleName(role): string ``` The role's name wrapped in its colour, for rich text. #### isTableEmpty (Shared) ```lua CommandAPI.isTableEmpty(tbl: {[any]: any}): boolean ``` Whether the table has no entries at all, including keyed ones ``#tbl`` misses. #### round (Shared) ```lua CommandAPI.round(number: number, decimalPlaces: number?): number ``` Rounds a number to the given decimal places, or to a whole number by default. ## Types #### Commands ```lua type Commands = {Command} ``` The array a command module returns. #### Command One command table within ``Commands`` (name, args, run, and so on). Custom Commands (https://hdadmin.com/custom-commands/) covers every field. #### Task The task object passed into every ``run`` function, covered in full by the Task API (https://hdadmin.com/task-api/). #### ClientCommands The client-half equivalent of ``Commands``, returned by the ``Client`` module. #### ClientCommand One client-half command table within ``ClientCommands``. #### UserInfo ```lua type UserInfo = { userId: number | string, userName: string, userImage: string, userDisplayName: string, userTopRole: {key: string, name: string, color: Color3}?, } ``` ``userTopRole`` is only present for players in this server. #### ToolInfo ```lua type ToolInfo = { name: string, textureId: string, tool: Tool?, } ``` #### PromptType ```lua type PromptType = "info" | "success" | "warn" | "error" | "message" | "hint" | "privateMessage" | "alert" | "vote" | "voteResults" | "action" ``` The prompt type strings. See prompt (https://hdadmin.com/command-api/#prompt-shared) for what each one shows. #### PromptOptions The options table ``prompt`` accepts, listed in full under prompt (https://hdadmin.com/command-api/#prompt-shared). #### PromptHandle The handle ``prompt`` returns, which dismisses the prompt early with ``handle:Disconnect()``. # Server API Source: https://hdadmin.com/server-api/ Sections: Commands (#commands), requestCommand (Server) (#requestcommand-server), getTasks (Server) (#gettasks-server), endTasks (Server) (#endtasks-server), canUseCommandAsync (Server) (#canusecommandasync-server), disableCommands (Server) (#disablecommands-server), enableCommands (Server) (#enablecommands-server), Roles (#roles), giveRoleAsync (Server) (#giveroleasync-server), takeRoleAsync (Server) (#takeroleasync-server), getRolesAsync (Server) (#getrolesasync-server), getTopRoleAsync (Server) (#gettoproleasync-server), hasRoleAsync (Server) (#hasroleasync-server), getRole (Server) (#getrole-server), getAllRoles (Server) (#getallroles-server), Moderation (#moderation), banAsync (Server) (#banasync-server), unbanAsync (Server) (#unbanasync-server), getBanAsync (Server) (#getbanasync-server), Prompts (#prompts), prompt (Shared) (#prompt-shared), Text (#text), filterTextAsync (Server) (#filtertextasync-server), Info (#info), getSetting (Shared) (#getsetting-shared), getVersion (Shared) (#getversion-shared), Isolation (#isolation), isolateServer (Server) (#isolateserver-server), isServerIsolated (Server) (#isserverisolated-server), Restriction (#restriction), restrictServer (Server) (#restrictserver-server), isServerRestricted (Server) (#isserverrestricted-server), Emotes (#emotes), getEmoteById (Server) (#getemotebyid-server), getEmoteByName (Server) (#getemotebyname-server), getRandomEmote (Server) (#getrandomemote-server), addEmoteAsync (Server) (#addemoteasync-server), Types (#types), Role (#role), BanRecord (#banrecord), Task (#task), Emote (#emote) Everything here lives in Core > ServerAPI and runs from a server ``Script``: ```lua local hd = game:GetService("ReplicatedStorage"):WaitForChild("HD Admin") local ServerAPI = require(hd.Core.ServerAPI) ``` ## Commands #### requestCommand (Server) ```lua ServerAPI.requestCommand(message: string, fromPlayer: Player?): (boolean, {any}, {Task}) ``` Runs a command message exactly as if it was chatted. When no player is given, a Server User takes the caller's place, so commands can fire from anywhere in your game code without permission checks. When a player is provided, their roles, permissions and rate limits all apply, and any caller notices are sent to them. Returns whether approved, the notices produced, and the tasks (https://hdadmin.com/task-api/) it created. ```lua -- Run as the server ServerAPI.requestCommand(";fly all") -- Or on behalf of a player ServerAPI.requestCommand(";fly me", player) ``` #### getTasks (Server) ```lua ServerAPI.getTasks(commandName: string?, target: Target?): {Task} ``` Returns the running tasks (https://hdadmin.com/task-api/). Both filters are optional. ``ServerAPI.getTasks()`` returns every task, ``ServerAPI.getTasks("fly")`` every fly task, and ``ServerAPI.getTasks("fly", player)`` only that player's fly tasks. #### endTasks (Server) ```lua ServerAPI.endTasks(commandName: string?, target: Target?): number ``` Ends the matching tasks and returns how many were ended. This is ``;unCommand`` in code form, with the same optional filters as ``getTasks``. ```lua -- End every fly in the server ServerAPI.endTasks("fly") -- Clear everything running on one player ServerAPI.endTasks(nil, player) ``` #### canUseCommandAsync (Server) ```lua ServerAPI.canUseCommandAsync(target: Target, commandName: string): (boolean, string?) ``` Whether the target's roles allow them to run the given command. Returns ``true``, or ``false`` and the reason. #### disableCommands (Server) ```lua ServerAPI.disableCommands(player: Player) ``` Blocks the player from running any new commands until ``enableCommands`` is called or they rejoin. Useful while they're inside a minigame round or a cutscene. Their already-running tasks (https://hdadmin.com/task-api/) carry on, so pair this with ``endTasks`` if you want those cleared too. It's safe to call straight from ``PlayerAdded``. #### enableCommands (Server) ```lua ServerAPI.enableCommands(player: Player) ``` Lets the player run commands again. ## Roles Role names are matched case-insensitively, so ``"VIP"`` and ``"vip"`` reach the same role. #### giveRoleAsync (Server) ```lua ServerAPI.giveRoleAsync(target: Target, roleName: string, options: ActionOptions?): (boolean, string?) ``` Gives the role to the target and returns ``true``, or ``false`` and the reason it couldn't. Permanent grants save, travel cross-server, and work for offline targets too. | Option | What it does | |---|---| | ``scope`` | ``"perm"`` saves forever (the default), ``"server"`` lasts this server only, ``"expire"`` removes itself after ``duration`` | | ``duration`` | Seconds, required for scope ``"expire"`` | | ``reason`` | The reason for giving | | ``callerUserId`` | A UserId of the person who gave it and to rank-check against | ```lua -- Reward a purchase forever ServerAPI.giveRoleAsync(player, "VIP") -- A 24 hour trial, granted by an offline head admin ServerAPI.giveRoleAsync(player, "Mod", { scope = "expire", duration = 24 * 3600, callerUserId = 1234567, }) ``` #### takeRoleAsync (Server) ```lua ServerAPI.takeRoleAsync(target: Target, roleName: string, options: ActionOptions?): (boolean, string?) ``` Takes the role from the target, including permanent grants made on other servers or while they were offline. ``options`` accepts ``scope`` (``"perm"`` or ``"server"``) and ``callerUserId``, matching ``giveRoleAsync``. #### getRolesAsync (Server) ```lua ServerAPI.getRolesAsync(target: Target): (boolean, {Role} | string) ``` Returns ``true`` and the target's roles ordered highest rank first, or ``false`` and a reason. The target must be in this server. ```lua local success, roles = ServerAPI.getRolesAsync(player) if success then for _, role in roles do print(role.name, role.rank) end end ``` #### getTopRoleAsync (Server) ```lua ServerAPI.getTopRoleAsync(target: Target): (boolean, (Role | string)?) ``` Returns ``true`` and the target's most senior role (``nil`` if they hold none), or ``false`` and a reason. The target must be in this server. #### hasRoleAsync (Server) ```lua ServerAPI.hasRoleAsync(target: Target, roleName: string): boolean ``` Whether the target currently holds the role. The target must be in this server. #### getRole (Server) ```lua ServerAPI.getRole(roleName: string): Role? ``` Returns the Role (https://hdadmin.com/server-api/#role) for the given name, or ``nil`` if no role matches. #### getAllRoles (Server) ```lua ServerAPI.getAllRoles(): {Role} ``` Returns every role in the game's configuration. ## Moderation #### banAsync (Server) ```lua ServerAPI.banAsync(target: Target, options: BanOptions): (boolean, string?) ``` Bans the target for entering your game, and kicks them if they're currently in any server. Returns ``true`` and the new ``banId``, or ``false`` and the reason it couldn't. Offline targets work too. | Option | What it does | |---|---| | ``reason`` | Required, shown to the player when they try to join | | ``scope`` | ``"perm"`` (the default), ``"server"`` for this server only, or ``"expire"`` | | ``duration`` | Seconds, for scope ``"expire"`` | | ``expiresAt`` | An absolute epoch which overrides ``duration`` | | ``banAlts`` | Defaults to ``true``, banning alt accounts through Roblox's BanService | | ``callerUserId`` | A UserId to credit the ban to and rank-check against. Leave it out for a system ban with no restrictions | ```lua -- A 7 day ban issued by your own anti-cheat ServerAPI.banAsync(player, { reason = "Exploiting", scope = "expire", duration = 7 * 24 * 3600, }) ``` #### unbanAsync (Server) ```lua ServerAPI.unbanAsync(target: Target, banId: string?, options: UnbanOptions?): (boolean, string?, number?) ``` Clears the target's bans and returns ``(success, failReason, totalBansCleared)``. Pass a ``banId`` to clear one specific ban, or ``nil`` to clear them all. ``options`` accepts ``scope`` and ``callerUserId``. #### getBanAsync (Server) ```lua ServerAPI.getBanAsync(target: Target): (BanRecord?, string?) ``` Returns the target's active BanRecord (https://hdadmin.com/server-api/#banrecord) and its ``banId``, checking offline records too, or ``nil`` if they aren't banned. ```lua local ban, banId = ServerAPI.getBanAsync(userId) if ban then print(`Banned for '{ban.reason}' by {ban.bannedBy}`) end ``` ## Prompts #### prompt (Shared) ```lua ServerAPI.prompt(promptType: PromptType, player: Player, text: string, options: PromptOptions?): PromptHandle ``` Shows a notice, message or card to the player using HD Admin's own UI, from any server ``Script``. This is the same function as the Command API's prompt (https://hdadmin.com/command-api/#prompt-shared), which covers every prompt type, the full list of options, and the action cards with buttons and sliders. ```lua ServerAPI.prompt("success", player, "Quest complete!", {duration = 5}) ``` ## Text #### filterTextAsync (Server) ```lua ServerAPI.filterTextAsync(text: string, author: Target, viewer: Target?): (boolean, string) ``` Runs the text through Roblox's filter and returns ``true`` and the filtered text, or ``false`` and the reason. Leave out ``viewer`` to filter for everyone, which is right for anything every player can see and for text you save. Pass a ``viewer`` to filter for that one player instead. The author must be in this server, because Roblox's filter refuses to run for anyone who isn't. Text that comes back as nothing but hashtags counts as a failure, so you never display an empty result. ```lua local success, result = ServerAPI.filterTextAsync(petName, player) if success then nameLabel.Text = result else ServerAPI.prompt("warn", player, "That name can't be used") end ``` ## Info #### getSetting (Shared) ```lua ServerAPI.getSetting(settingName: string, player: Player?): any ``` Returns the value of a game setting, like ``ServerAPI.getSetting("Prefix")``. Pass a player to also apply their own You Settings, so you get the exact value that player experiences. #### getVersion (Shared) ```lua ServerAPI.getVersion(): string ``` The running HD Admin version, like ``"v2.0.0"``. ## Isolation #### isolateServer (Server) ```lua ServerAPI.isolateServer() ``` Cuts this server off from saving data and sending anything to other servers. Everything will still *appear* to work as normal, such as perm bans, role edits, game settings, global commands and global votes, except none of it actually saves or reaches other servers, so it all disappears when the server ends. Saved data is still read as normal, so the server starts with your real roles, bans, settings, etc. Each player's own preferences, such as their You settings and favourite emotes, still save because they only affect that player. This is useful for private servers or reserved servers where you want to grant someone "Owner" without having any impact on the rest of your universe. ```lua local hd = game:GetService("ReplicatedStorage"):WaitForChild("HD Admin") local ServerAPI = require(hd:WaitForChild("Core"):WaitForChild("ServerAPI")) ServerAPI.isolateServer() ``` #### isServerIsolated (Server) ```lua ServerAPI.isServerIsolated(): boolean ``` Returns ``true`` once isolateServer (https://hdadmin.com/server-api/#isolateserver-server) has been called in this server. ## Restriction #### restrictServer (Server) ```lua ServerAPI.restrictServer(options: RestrictOptions?) ``` This restricts all game-wide features including game settings, role edits, perm roles, perm bans and unbans, vetting, saved tasks, and the perm, global and join modifiers. Commands belonging to the roles in ``commandsInRoles`` or named in ``commands`` are also restricted. Everything still *appears* as normal in the panel until the actual feature or command is used where an error notice is instead displayed. Anyone holding a role in ``bypassRoles`` skips every restriction. Unlike isolateServer (https://hdadmin.com/server-api/#isolateserver-server), data still saves and still reaches other servers. The HD Admin Hub (https://www.roblox.com/games/106966695720565/Try-HD-Admin) uses it for example to grant every player "Dev" to showcase the admin panel, but restricts a lot of the abusive commands and features to prevent servers being destroyed. | Option | What it does | | --- | --- | | ``commandsInRoles`` | Role names or keys whose commands are refused | | ``commands`` | Command names or keys refused on top of those | | ``bypassRoles`` | Role names or keys that skip every restriction | | ``warning`` | Replaces "This is restricted in this game", the notice shown whenever something is refused | ```lua local hd = game:GetService("ReplicatedStorage"):WaitForChild("HD Admin") local ServerAPI = require(hd:WaitForChild("Core"):WaitForChild("ServerAPI")) ServerAPI.restrictServer({ commandsInRoles = {"Dev", "Owner"}, commands = {"BuildingTools", "Music"}, bypassRoles = {"Owner"}, warning = "This is restricted in this demo", }) ``` #### isServerRestricted (Server) ```lua ServerAPI.isServerRestricted(): boolean ``` Returns ``true`` once restrictServer (https://hdadmin.com/server-api/#restrictserver-server) has been called in this server. ## Emotes #### getEmoteById (Server) ```lua ServerAPI.getEmoteById(emoteId: number): Emote? ``` Returns the registered Emote (https://hdadmin.com/server-api/#emote) with the given id, or ``nil``. #### getEmoteByName (Server) ```lua ServerAPI.getEmoteByName(emoteName: string, matchLength: boolean?): Emote? ``` Returns the registered Emote (https://hdadmin.com/server-api/#emote) matching the given name, or ``nil``. #### getRandomEmote (Server) ```lua ServerAPI.getRandomEmote(): Emote? ``` #### addEmoteAsync (Server) ```lua ServerAPI.addEmoteAsync(emote: IncompleteEmote, dontRegister: boolean?): (boolean, Emote | string) ``` Registers a new emote from an emote animation asset, so it can be played by ``;emote`` and appear in the emotes menu. Only ``emoteId`` is required, and the missing details are fetched for you. Returns ``true`` and the completed Emote (https://hdadmin.com/server-api/#emote), or ``false`` and the reason it couldn't. ## Types #### Role The full role configuration table, exactly as defined under Config > Roles. See Roles (https://hdadmin.com/roles/). #### BanRecord ```luau type BanRecord = { type: "perm" | "expire" | "server", source: "admin" | "loader", bannedBy: number | string, bannedAt: number, expiresAt: number?, grantedOnJobId: string?, -- only present on server-scope bans reason: string, banAlts: boolean, } ``` The ``banId`` isn't part of the record itself, so ``getBanAsync`` hands it to you as a second return value. #### Task See Task API (https://hdadmin.com/task-api/). #### Emote ```luau type Emote = { name: string, originalName: string?, order: number, animationId: number, emoteId: number, } ``` # Client API Source: https://hdadmin.com/client-api/ Sections: Prompts (#prompts), prompt (Shared) (#prompt-shared), Info (#info), getSetting (Shared) (#getsetting-shared), getVersion (Shared) (#getversion-shared), Panel (#panel), getAppIcon (Client) (#getappicon-client), openProfile (Client) (#openprofile-client), openPage (Client) (#openpage-client), openPanel (Client) (#openpanel-client), closePanel (Client) (#closepanel-client), isPanelOpen (Client) (#ispanelopen-client) Everything here lives in Core > ClientAPI and runs from a client ``LocalScript``: ```lua local hd = game:GetService("ReplicatedStorage"):WaitForChild("HD Admin") local ClientAPI = require(hd.Core.ClientAPI) ``` ## Prompts #### prompt (Shared) ```lua ClientAPI.prompt(promptType: PromptType, text: string, options: PromptOptions?): PromptHandle ``` Shows a notice or message to the local player using HD Admin's own UI, from any ``LocalScript``. This is the same function as the Command API's prompt (https://hdadmin.com/command-api/#prompt-shared), which covers every prompt type and option, just without the ``player`` arg: ```lua ClientAPI.prompt("success", "Quest complete!", {duration = 5}) ``` ## Info #### getSetting (Shared) ```lua ClientAPI.getSetting(settingName: string, player: Player?): any ``` Returns the value of a game setting, like ``ClientAPI.getSetting("Prefix")``. Pass the local player to also apply their You Settings, so you get the exact value they experience. Only the local player's You Settings are available on the client. #### getVersion (Shared) ```lua ClientAPI.getVersion(): string ``` The running HD Admin version, like ``"v2.0.0"``. ## Panel #### getAppIcon (Client) ```lua ClientAPI.getAppIcon(): Icon ``` Returns HD Admin's topbar icon, a TopbarPlus (https://docs.nanoblox.com/topbarplus/api/) ``Icon``, so you can restyle, move or hide it with the full TopbarPlus API. ```lua local icon = ClientAPI.getAppIcon() icon:align("Right") ``` #### openProfile (Client) ```lua ClientAPI.openProfile(userId: number) ``` Opens a user's profile popup, like selecting them on the Moderation page. #### openPage (Client) ```lua ClientAPI.openPage(pageName: string) ``` Opens the panel straight onto the given page, for example: ```lua ClientAPI.openPage("Commands") ``` #### openPanel (Client) ```lua ClientAPI.openPanel() ``` Opens the HD Admin panel for the local player, as if they'd selected the topbar icon. #### closePanel (Client) ```lua ClientAPI.closePanel() ``` Closes the panel if it's open. #### isPanelOpen (Client) ```lua ClientAPI.isPanelOpen(): boolean ``` # Roblox Admin Commands Source: https://hdadmin.com/roblox-admin-commands/ Sections: Roblox Admin Commands: Full List and How to Add Them (#roblox-admin-commands-full-list-and-how-to-add-them), How to run a command (#how-to-run-a-command), Add to your game (#add-to-your-game) # Roblox Admin Commands: Full List and How to Add Them Admin commands are short text commands you type into chat, or run from a panel, that do things a normal player can't: fly, teleport, change the time of day, kick or ban someone, hand out a role. On Roblox they come from an admin system the game's creator has installed. HD Admin is the most installed one, running in over a million experiences since 2017, and every command it comes with is listed here. Get the model (https://create.roblox.com/store/asset/857927023/HD-Admin) Try in-game (https://www.roblox.com/games/start?launchData=%7B%22creatorStoreAssetId%22%3A857927023%7D&placeId=106966695720565) ### How to run a command Type the prefix, the command name, then its arguments. The default prefix is ``;``: ```lua ;fly me ;kick Ben spamming ;time 18 ``` - ``;cmds`` opens the Commands page, which lists every command you can use in that game and lets you run each one from a form instead of typing it. - Press ``'`` or ``;`` to open the command bar, which suggests commands and arguments as you type. - A player argument takes part of a name (``;fly ben``), an ``@username``, or a qualifier like ``me``, ``all``, ``others`` or ``random``. - Put ``un`` in front of a command to end it, like ``;unfly me``. ### Add to your game Take the free HD Admin model (https://create.roblox.com/store/asset/857927023/HD-Admin), insert it into your game in Studio, and publish. As the creator you get the Owner role and every command below. Install guide (https://hdadmin.com/install/) --8<-- "data/commands-list.md" Get the model (https://create.roblox.com/store/asset/857927023/HD-Admin) Try in-game (https://www.roblox.com/games/start?launchData=%7B%22creatorStoreAssetId%22%3A857927023%7D&placeId=106966695720565) # Press Kit Source: https://hdadmin.com/press/ Sections: Boilerplate (#boilerplate), The numbers (#the-numbers), Getting it right (#getting-it-right), Logos and images (#logos-and-images), Contact (#contact) Everything on this page is accurate as of July 2026 and free to quote. If you need anything else, or want a fact checked before you publish, email ben@nanoblox.com. ### Boilerplate > HD Admin is the most installed admin system on Roblox, with over 35 million installs across over 1 million experiences since 2017. It gives games over 200 commands, a role system, moderation tools and a web dashboard, and developers automatically earn 40% of the revenue from HD Admin products sold in their game. It's built by nanoblox, led by Ben (ForeverHD on Roblox), and has been updated continuously for close to a decade. ### The numbers | Figure | What it is | |---|---| | 35M+ | Installs of the HD Admin model (https://create.roblox.com/store/asset/857927023/HD-Admin) since 2017 | | 1.2M+ | Experiences actively using HD Admin | | 190B+ | Visits across games that have run HD Admin | | 3M+ | Members of the HD Admin Roblox group | | 8.5M+ | Favourites across HD Admin UGC | | 200+ | Commands | | 100,000+ | Live servers HD Admin is built to scale past | | 40% | Share of HD Admin product revenue that goes to the game's developer | ### Getting it right - The name is HD Admin. Not HDAdmin, HD admin or Hd Admin. - HD Admin is made by nanoblox. Ben, known on Roblox as ForeverHD, leads it. - The current version is HD Admin v2. Its Beta released on 24 August 2026. - "Nanoblox" and "HD Admin V3" were working names for v2. It isn't a separate or unreleased product. History (https://hdadmin.com/history/) has every name HD Admin has gone by. - It's free with no paywalled core. Revenue comes from optional cosmetics and products, and 40% of every sale goes to the developer of the game it sold in. - It scales. HD Admin was built with some of the largest experiences on Roblox, in partnership with do_small, to run past 100,000 live servers. ### Logos and images - HD Admin logo, the mark to use when writing about HD Admin - HD Admin v2 panel, the panel and a command running in game - HD icon, rounded - HD logo on gradient (https://dashboard.hdadmin.com/hd_logo_gradient.png) ### Contact Email ben@nanoblox.com, or ask on the Forum (https://forum.hdadmin.com/) for anything quick. The full story is on History (https://hdadmin.com/history/). # Privacy Policy Source: https://hdadmin.com/privacy/ Sections: Who we are (#who-we-are), What we collect (#what-we-collect), Where your data lives (#where-your-data-lives), How long we keep things (#how-long-we-keep-things), Your rights (#your-rights), Children (#children), Business transfers (#business-transfers), Changes (#changes) *Effective 16 November 2026* ### Who we are nanoblox makes open tools for Roblox developers: HD Admin, TopbarPlus and ZonePlus. For anything privacy related, email ben@nanoblox.com and we'll get back to you. ### What we collect **Emails.** Adding an email on your Account page needs a Roblox sign-in, and we store the address you give us against that account along with the page you added it from. What we send is up to the switches on that page: waitlist launches, news and updates, replies and mentions on your forum posts, and a monthly summary of activity on them. We check that an address can receive mail when you type it, and when a message bounces or is reported as spam we stop sending to that address. Emails are sent through Cloudflare, which keeps a record of each delivery for a short time. Every email includes a one-click way to opt out or to remove an address that isn't yours, you can change your email or any switch any time by signing back in, and your address isn't shared or sold. **Accounts.** If you sign in to the dashboard with Roblox, we store your Roblox user ID, username, display name and avatar so we can show who you are and which games you manage. Signing in never gives us your Roblox password. If you create an account with an email address instead, we store that email. **Game registrations.** Games running HD Admin can register their experience ID with our charts service. An experience ID identifies a game, not a person. **Game stats.** Games linked to the dashboard send us aggregate stats such as player counts, visits, command usage and the Robux earned through HD Admin. These describe a game, not a person. We use them to run the dashboard for you, and in combined, anonymised form (totals and averages across many games) to improve our tools and share overall statistics, like how much revenue HD Admin generates across all games. We never publish numbers about an individual game without its owner's permission. **Forum posts.** If you post on the forum, we store what you write, the images and videos you attach, votes and reactions, and the Roblox username and avatar shown next to them. Posts are public. Attachments are checked automatically before anyone else sees them, which means each image, or a few still frames of each video, is sent to an AI service (Claude, by Anthropic) for that check. It isn't used to train the service. If something you post is refused, we keep a note of that against your account for a week so repeated problems add up. **Discord.** Our Discord server is bridged to the forum. If you start a thread in one of the server's forum channels, or post in its announcements channel, our bot reads that message and stores its text as a post on the forum under your name, and syncs votes and reactions between the two. Only those channels are read, never general chat or direct messages. If you connect your Discord account on your forum profile, we store your Discord user ID so posts and votes you make on the server count as you, and so the server can mark you as verified. Disconnecting removes the ID and the verified mark. **Standard server logs.** Like nearly every website, our infrastructure briefly records request data (such as IP addresses) to keep things running and fend off abuse. These logs are transient and not used to profile anyone. ### Where your data lives Our database runs on a server in the EU (Hetzner, Germany). Traffic passes through Cloudflare, which also serves our websites and sends our emails. Images and videos attached on the forum are stored and served by Cloudflare, which keeps copies around the world so they load quickly. We don't use advertising or cross-site tracking, and we don't sell data to anyone. ### How long we keep things Emails are kept while we send updates, or until you unsubscribe or ask us to remove yours. Forum posts stay up until you delete them or we remove them. When we take a post or comment out of sight, it stays hidden for 30 days and is then deleted for good, along with anything attached to it, so a wrong call can be undone and nothing lingers. Videos on posts that have been resolved may be removed after a couple of months to save space, the post itself stays. Server logs rotate away on their own. ### Your rights You can ask what we hold about you, ask us to correct it, or ask us to delete it. Email ben@nanoblox.com and we'll sort it within 30 days. If you're in the UK or EU you also have the right to complain to your data protection authority, though we'd appreciate the chance to fix things first. ### Children Our websites, the waitlist and the forum are aimed at game developers and aren't directed at children under 13. Please don't submit your email or post on the forum if you're under 13. ### Business transfers We don't sell your data, and we never will. Separately from that, if nanoblox itself is ever acquired by or merged into another company, the data our services run on may transfer to the new owner as part of that deal. If that happens, this policy continues to apply, and we'll tell you before anything about how your data is handled changes. ### Changes If this policy changes in a way that matters, we'll update the date at the top and, where it affects something you've signed up for, tell you directly. # Terms of Service Source: https://hdadmin.com/terms/ Sections: What this covers (#what-this-covers), Using our services (#using-our-services), Your content and data (#your-content-and-data), Things you post and upload (#things-you-post-and-upload), Reporting abuse (#reporting-abuse), No warranty (#no-warranty), Roblox (#roblox), Changes (#changes), Contact (#contact) *Effective 5 September 2026* ### What this covers These terms cover the nanoblox websites (hdadmin.com, nanoblox.com and their subdomains, including the dashboard at dashboard.hdadmin.com and the forum at forum.hdadmin.com), the charts service, and the dashboard waitlist. The HD Admin, TopbarPlus and ZonePlus modules themselves are licensed separately under the licence in each project's repository. ### Using our services Use them honestly. Don't attempt to break, overload, or abuse our services, submit data that isn't yours to submit, register games you don't operate, or use our services to harass anyone. We may remove data or block access where something is being abused. ### Your content and data Data you submit stays yours. You give us permission to store and process it to run the services, as described in our Privacy Policy (https://hdadmin.com/privacy/). ### Things you post and upload The forum lets you post text, images and short videos. Whatever you post stays yours. You give us a worldwide, royalty-free licence to store, copy, resize, transcode and display it so the forum can show it, for as long as it's on the site. Only post things you have the right to post. Screenshots and clips of games you play are fine, other people's private details or private messages are not. We don't allow sexual content, real-world violence, hate, harassment, spam or anything unlawful, and nothing at all involving the sexual abuse of children. Every upload is checked automatically before anyone else can see it, and posts and comments can be held for a person to look at. If something is refused, your account is paused from posting for a short while, longer if it keeps happening, and we may ban accounts that don't stop. We can remove anything at any time, and videos may be taken off old posts once they've been resolved. Uploads are hosted by Cloudflare rather than on our own servers. The Privacy Policy (https://hdadmin.com/privacy/) says what that means for your data. ### Reporting abuse If you see something on the forum that shouldn't be there, use the Flag button on the post, or email ben@nanoblox.com with "abuse" in the subject and a link to it. Copyright complaints go to the same address with details of the work and where it appears. We act on reports quickly, remove anything illegal on sight, and report child sexual abuse material to the authorities. ### No warranty Our websites and services are provided as-is, free of charge, without warranties of any kind. We work hard to keep everything reliable, but we can't promise uninterrupted or error-free operation, and we aren't liable for losses arising from your use of the services to the maximum extent the law allows. ### Roblox nanoblox isn't endorsed by or affiliated with Roblox Corporation. When you use our services, including signing in with your Roblox account, you agree to also follow Roblox's Terms of Use (https://en.help.roblox.com/hc/en-us/articles/115004647846-Roblox-Terms-of-Use). Your agreement here is with nanoblox alone, not with Roblox, and Roblox isn't responsible for our services. To the maximum extent the law allows, you waive any claims against Roblox Corporation arising from your use of our services. ### Changes We may update these terms as the services evolve; the date above tells you when they last changed. ### Contact For general help, suggestions and bugs, create a post at the forum (https://forum.hdadmin.com/). For business enquiries, contact ben@nanoblox.com.