FluxWare Scripting
Write your own FluxWare modules in Lua. They appear in the module list next to the built-in ones, with their own settings, keybind and config.
What it is
A FluxWare script is Lua that declares a module. Once loaded it is a module in every sense the client understands: it sits in the list under the category its author gave it, takes a keybind, shows up in the ArrayList, and its settings are saved into and restored from your config alongside everything else.
You write scripts in game, in the editor on the Scripts tab of the menu, and saving one puts it in your game straight away. To give a script to someone, share it and send them its code; they install it from the same tab. The getting started page walks through both.
An example
This is a complete, working script. It adds a module called Low Health Warning that flashes a border when you are hurt, with a threshold you can drag and a colour you can pick.
local m = module {
name = 'Low Health Warning',
category = 'render',
}
local threshold = m:setting('number', 'Threshold', 8, 1, 20)
local tint = m:setting('color', 'Tint', 0x60FF3B30)
m:on('render2d', function()
local hp = player.health()
if not hp or hp > threshold:get() then return end
local w, h = render2d.screenSize()
render2d.outline(0, 0, w, h, 6, tint:get())
render2d.text(string.format('%.1f HP', hp), 8, h - 20, 9, 0xFFFFFFFF)
end)The shape of a script
Every script is the same three moves. Declare the module, declare its settings, register callbacks.
local m = module { name = 'My Module', category = 'misc' }
local enabled = m:setting('boolean', 'Do the thing', true)
m:on('tick', function()
if enabled:get() then
-- runs twenty times a second while the module is on
end
end)Callbacks only fire while the module is switched on, so there is no need to check whether you are enabled. The full list of events is on the events page, and everything a callback can reach is under Reference in the sidebar.
Where to go next
If you have not written one yet, start with getting started: the editor, sharing and installing by code, and what to do when something breaks.
If you are looking for something specific, the reference pages list every function with its exact signature. They are generated from the client itself, so they describe the version you are running rather than what the API looked like when somebody last wrote the page by hand.