Twilight
This is the root class for the Twilight ESP Suite. It is what gets returned when the API is called, and contains the functions and interfaces for you to interact with as a developer and user.
This class is not creatable nor replicable.
Summary
Properties
Property | Type | Description |
---|---|---|
espObjects | Table [READ ONLY] | Contains all the espObject(s) of the library. |
settings | twilightSettings | The current configuration for the ESP. Set via the SetOptions method to provide defaults. |
Instance | ScreenGui | The GUI Instance that contains all the frames and UI components for the ESP. We do not use Drawing. |
espInstance | Table | The module that contains all the functions and values for the base ESP component (ESP Object). |
_connections | Table [READ ONLY] | A table containing all game connections related to Twilight. eg., RenderSteps |
unloaded | boolean [READ ONLY] | Whether the ESP is currently Unloaded. |
Methods
Method | Arguments | Returns | Description |
---|---|---|---|
SetOptions | options : twilightSettings | nil | Sets the current configuration for the ESP with defaults provided. |
BindESPToObject | object : Instance | nil | Creates a new ESP Instance and binds it to the given Object. |
EnablePlayerESP | nil | nil | Enables the Player ESP System. |
DisablePlayerESP | nil | nil | Disables the Player ESP System. |
Functions
Function | Arguments | Description |
---|---|---|
Load | nil | Loads and Initialises the ESP. |
Unload | Destroy? : boolean | Unloads (and/or Destroy) the ESP. |
Properties
espObjects
READ ONLY
⠀Table
This property contains all the objectESPs or playerESPs (that within contain espInstances) that have not been destroyed. They are in the espInstance class.
There is a subtable Players
which contains the ESP for Players seperately.
You can technically attempt to call the Update or Other Methods from the objects within the table, however it will be redundant as they are already called by the library.
print(table.concat(Twilight.espObjects, ", ")) --> { Players = {}, objectESP, objectESP... }
settings
twilightSettings
The current configuration of the ESP for the library to handle. Contains the currentColors, what is enabled, and other shared variables.
It is possible to set the configuration via this property, but it is recommended to use the :SetOptions
Method since the mentioned provides default values for those that are not passed. In short, you will have to re-set every variable within the settings if you do it from this property.
Twilight.settings = {
healthbarEnabled = true,
healthbarTeamCheck = false,
boxEnabled = true,
outlineBoxEnabled = true,
boxTeamCheck = false,
outlineBoxTeamCheck = false,
--> ... and so forth
}
print(typeof(Twilight.settings)) --> twilightSettings
Instance
Read Parallel
⠀ScreenGui
The physical ScreenGui that resides within the Protected/Hidden UI System of your exploit, or the Player's GUI if all are not possible to access.
Contains the actual visuals for the ESP, such as the boxes and tracers, with an exception of the chams as highlights reside within the object binded to the ESP.
ESP for players are stored within a seperate frame within the GUI instead of in it directly.
It is key to take note that unlike almost every other ESP Library, Twilight does not use the Drawing API of an executor.
We want to support Twilight's usage in all purposes, and using the Drawing API means that usage in an actual game or Bad Executors will not be possible.
It also has its advantages, such as being directly accessible to other scripts for your own customisability.
Drawing APIs can also be inconsistent, with some shapes having different properties across or not even existing.
espInstance
espInstance
An internal property for the library to use.
_connections
READ ONLY
⠀Table
A table containing active connections to the Roblox well uhh, engine (I suppose? I am not sure how connections actually work).
These are RBXScriptConnections, and what run every well Event they're binded to to update the ESP. Examples of updating include Position and sizing.
Examples of the events are RenderStepped and Changed. Storing them in a global table allows for easy disconnection on destruction.
Not disconnecting will mean the ESP will run until you leave the game even if you disable it, and/or potentially cause memory leaks.
unloaded
Boolean
Whether the ESP has been unloaded. Used to disable items outside the GUI like chams.
Methods
SetOptions
Sets the current ESP configurations (settings Property) to the given twilightSettings, with defaulting from the previous configuration.
Meaning you will not have to explicitly pass every single parameter.
Parameters
Parameter | Description |
---|---|
options : twilightSettings | The new configuration for Twilight to use. Check the twilightSettings page for details. Undefined variables will use the previous configuration's |
Returns : nil
BindESPToObject
Creates a new objectESP before binding it to the given object, essentially giving a part ESP that you might see in other scripts.
A root part will automatically be assigned if the given object is a model. Option to pass the root part explicitly will come soon.
Parameters
Parameter | Description |
---|---|
object : Instance | The object to bind the created objectESP to. |
Returns: nil
EnablePlayerESP
Enables the Player ESP system, showing the automatically created playerESPs for Players.
This includes the local player, however distance will not be shown for your player.
In a literal sense, it sets the chams to be parented to the character and the Player ESP frame within the GUI to be visible.
Returns: nil
DisablePlayerESP
Disables the Player ESP system, hiding the automatically created playerESPs for Players.
In a literal sense, it sets the chams to be parented to nothing and the Player ESP frame within the GUI to be invisible.
Returns: nil
Functions
Load
Loads and enables All ESP Instances and Objects.
Respects every bit of the configuration on what is enabled and hidden.
Unload
Unloads the ESP Instances and Objects temporarily or permanantly depending on whether Destroy was passed.
Parameters
Destroy? : boolean | If destroying, the ESP Objects will be deleted from the game's memory and cannot be reloaded until the Library is reran. |