Importing the Library
Twilight has many ways to import its library and use it into your own projects. This part of the documentation will showcase all the different ways.
From Source
This is the recommended method.
- Clone the project into your
packages/_index
folder:
⠀git clone https://github.com/Nebula-Softworks/Twilight-ESP.git packages/_index/Twilight
You can also download the source from GitHub manually and place it into your packages folder.
Add a loader module into your packages folder:
-- packages/twilight.luau
return require("./_index/Twilight/src/init.luau")At this point your project should look something like this:
Set the InterfaceName if you have not, to prevent Twilight From destroying your esp as others
getgenv().InterfaceName = "Twilight ESP Example" -- your project name here
You can now follow the rest of the guide by using a require to call the API.
-- Assuming you have luaurc file to call an @packages alias
local Twilight = require("@packages/twilight")
Prebuilt Releases
Twilight also has prebuilt luau
modules to easily import.
Via HTTP
This method will dynamically download the latest release using HttpGet.
getgenv().InterfaceName = "Twilight ESP Example"
local Twilight = loadstring(game:HttpGet("https://raw.nebulasoftworks.xyz/twilight"))()
Manual
This method is usually unstable on bundlers that get and compile dynamically like darklua,
but if it does work it will be faster than via HTTP since it is already included in source and not fetched via web.
- Download a valid release's
luau
module:
Twilight Releases - Place the module into your project (eg., under
packages/
)