api you get is built for whatever game you’re currently in, so some parts of it change from game to game. There are two kinds of namespace.
Shared vs game-specific
Shared namespaces are there in every game:| Namespace | What it’s for |
|---|---|
| api.ui | Building your menu. |
| api.utility | Little helpers. |
| api.bind | The user’s keybinds. |
| api.client | You (your local player). The common stuff is everywhere, and each game adds a few of its own extras. |
| api.players | Everyone else. There whenever the game has a player API. What each player handle gives you depends on the game. |
| api.legitbot | Aim assist / triggerbot, in games that have one. |
| Namespace | Games |
|---|---|
| api.game | Every game has one, but what’s inside is totally different per game. Bloxstrike gives you bomb/hostage/gamemode/dropped item info, Rivals gives you match/environment/placeables, Apocalypse Rising 2 gives you world pings (inventory is on api.client). |
| api.ragebot | Bloxstrike, Rivals, and Apocalypse Rising 2. |
| api.autoloot | Apocalypse Rising 2. |
Reading the docs
The call tables in theapi.* pages are split by game so you can tell at a glance where something works:
- Shared: works in every game (as long as that namespace exists in your game).
- Bloxstrike: only when you’re in Bloxstrike.
- Rivals: only when you’re in Rivals.
- AR2: only when you’re in Apocalypse Rising 2.
Writing scripts that work in any game
api.client and api.players share the same core everywhere, and then each game piles its own extras on top (for example, Rivals adds api.client.getEnvironmentId(), isInDuel(), and getDisplayElo()). If something is game-specific, it just isn’t there in other games. It won’t error, so check that a call exists before you use it: