api.universal lets your script teach universal mode about the game you’re in, so those features work in games that do things differently: custom character models, health stored outside the Humanoid, custom team systems, custom weapons, NPC enemies.
You’re in universal mode when api.getGame() returns "universal", so guard with if api.universal then ... end in scripts that also run elsewhere.
What universal mode assumes
By default it reads the game like this:- A player’s character is
player.Character. - Body parts are the character’s children, with standard R6 / R15 names.
- Health and death come from the Humanoid.
- Teams come from
player.Team. - Your weapon is the Tool you’re holding, and shots are fired with a mouse click.
set* call below replaces one of those assumptions with your own function. Everything you set is undone when your script unloads, and every set* call returns a handle with Release() to undo it early.
Players
Resolvers are pull-based: universal mode calls them when it needs a value, and
refresh tells it the answers changed. Watch the game’s own events from your script (with api.utility.connect) and call refresh from there, rather than calling it on a timer.Weapons
Reporting combat events
Universal mode ships hit feedback (hitmarkers, hit sounds, hit chams, hit skeletons, hit logs, death particles), bullet tracers, and impact effects, but it has no way of knowing when you hit someone or when a shot happens in a game it doesn’t understand. Your script watches the game and reports the events; the visuals, and the api.client.onHit /onKill signals, run off your reports.
Bots and NPCs
Register non-player enemies (NPCs, dummies, AI) so the ESP and aim assist treat them as targets.
The handle from
bots.add:
Example
A game that stores characters in a workspace folder, health in aNumberValue, and weapons in an attribute:
Client
Players
Legitbot
Game support
Types
UniversalHandle, UniversalHitReport, UniversalKillReport, UniversalWeapon, UniversalBotHandle.