Skip to main content
Elements you define show up in the ESP builder, where the user places and toggles them. Your evaluate supplies the value for each entity.
evaluate runs once per entity every tick, but only while the user has the element switched on. You don’t draw anything yourself: return a value and the builder draws it.

Overview

Kinds

esp.enemy, esp.team, esp.dropped, context.

Elements

text, bar, icon, group.

Return values

Text and bar shapes.

Handles and helpers

enabled, preview, dispose, esp.health, esp.money.

Kinds

Each kind is a property of esp and decides which entities its elements see. They’re named exports too: import { enemy } from "@native/esp";.

context


Runs once per entity per tick, before the elements. Whatever it returns is the ctx every evaluate of the kind gets, so shared reads happen once. A throw hides all of the kind’s elements on that entity for the tick. Set it to null to remove it.

Elements

name is the element’s identity within the kind and type. Define the same one again and the new element takes over: same builder slot, same user layout, and the old handle goes dead. label, preview and enabled also take a function, a signal or a ui control, and follow it. Hand enabled a switch from your settings page and you’re done:
A throw inside evaluate, or a value of the wrong shape, hides the element on that entity for the tick and lands in the global error event. Once, not 128 times a second: you hear about it again only after it ran a clean tick.

text

A line of text. Return a string or number, a style object, or null to hide it.

bar

A bar. Return the fill as 0..1, a style object, or null to hide it.

icon

Works like text, but always drawn with the "weapon-icons" font: the text is the glyph. esp.weaponIcon finds it for you.

group


Several elements fed by one evaluate per entity. Return an object with a value per key; a missing key hides that element, null hides them all. Each key is a normal element with its own handle.

Return values

Returned keys override the user’s builder settings for that entity and tick. Keys you leave out keep what the user set.

Text style

For text and icon.

Bar style


Element handles

text, bar and icon return an EspElement. On a dead handle reads return null and writes throw ESTALE. A group’s handle has alive, elements (by key) and dispose(). kind.elements lists a kind’s live elements, kind.clear() and esp.clear() remove them, and unload removes everything anyway.

Helpers


Example

Name, health, weapon and money for enemies, ammo on dropped weapons.