Skip to main content

Getting Started

Now that we've imported the library into our project, let us create our first simply ESP using Twilight!
Let's start by taking a look at the API that Twilight returns when called.

The API

Quick Summary

PropertyTypeDescription
InstanceScreenGuiThe ScreenGUI that contains all our ESP Items excluding chams, allowing for easy toggling.
_connectionstable [READ ONLY]Contains all Connections to ensure proper destruction and memory savind.
settingstwilightSettings [READ ONLY]Configuration for the ESP.
MethodArgumentsReturnsDescription
SetOptionsoptions : twilightSettingsnilSets the ESP configuration with defaulting
FunctionArgumentsDescription
LoadnilLoads the ESP
UnloadDestroy? : booleanUnloads (and/or Destroy) the ESP.
EnablePlayerESPnilEnables ESP for players.

View the rest in the API References

Continuing...

And there are alot more methods and functions, but let us focus on these key well, returns.
We have a settings table (with the twilightSettings property list) that controls what runs and what doesn't in our ESP, as well as color choices.
So let's start with that!

-- Assuming you have the library called as Twilight somewhere above this snippet.

Twilight:SetOptions({
currentColors = {
boxNeutral = Color3.new(1, 1, 1), -- Twilight's unique and modern rounded corner boxes

boxOutlineNeutral = Color3.new(1, 1, 1), -- The Classic Drawing Box
},
boxEnabled = true, -- You can set this to false if you only want the classic sharp boxes.
outlineBoxEnabled = true, -- You can set this to false if you only want the corner boxes.
-- or you can enable both like the example here!

tracersEnabled = false, healthBarEnabled = false, -- we will come back to these later on in the API Reference.
})

You do not need to copy this script, this is just a quick example.

info

Another thing is the NoAnticheat getgenv variable. Currently, chams are super detected and easy to get banned from.
Defaulting to false, Chams will not be activated no matter what unless the NoAnticheat variable is set to true.
You Can toggle it yourself.

This should set our ESP to have both the corner boxes and classic boxes, with it being set to white.
Now let's call the Load function and see our ESP in action.

Twilight.Load()

If you've done everything right so far... nothing should popup.
Or at least for now, since we have not enabled the Player ESP yet. You might be wondering, why is the API this way, and well,
its to ensure equality in Twilight's convenience for everything an ESP Library can be used for!

Twilight:EnablePlayerESP()

And this is what we should have if you've done everything correctly so far!

imageimage

Let's continue the rest of our ESP Script by heading to the API Reference.
I sadly won't be going step by step anymore, but I hope you have gotten the gist of how Twilight works! Cya later.

API Reference pages with the most popular or important features/notes.

Full Copy And Paste

Twilight:SetOptions({
currentColors = {
boxNeutral = Color3.new(1, 1, 1),

boxOutlineNeutral = Color3.new(1, 1, 1),
},
boxEnabled = true,
outlineBoxEnabled = true,

tracersEnabled = false, healthBarEnabled = false,
})

Twilight.EnablePlayerESP()
Twilight.Load()