Quick start
From an invite code to a buyer running your script, in five steps.
- Create your account
Sign-up is by invite. Paste your code at deflua.net/register. Your plan (how many projects, scripts and keys you get) comes with the code.
- Make a project
A project is one product you sell, with its own keys and settings. Open Projects in the dashboard and create one. It gets a Project ID, the 32-character code you will put in the loader line.
- Add your script
Open Scripts, add a script to the project and paste your Lua source. It is stored on our servers and is never handed out readable; every run gets its own sealed copy.
- Make keys
Generate keys in Keys, import them from a file, create them from the REST API, or let buyers redeem them themselves through your Discord panel.
- Hand out the loader line
Give each buyer their key and the two lines below. That is the whole install.
The loader line
The buyer sets their key, then loads your project. The loader does the rest.
script_key = "PASTE-YOUR-KEY-HERE"
loadstring(game:HttpGet("https://api.deflua.net/v3/loaders/YOUR_PROJECT_ID.lua"))()script_keymust be set before the second line. If it is missing, the loader stops with[Deflua] script_key not set before loading this script.- The line is the same for every buyer of the project; only the key changes. You can post it publicly, a key is what unlocks it.
- When you update your script, buyers keep the same line. The next run picks up the new version.
What happens on a run
Between the buyer pressing execute and your code starting, every request passes five checks. Fail one and nothing is sent.
Requests that try to skip a check, replay an old pass or swap keys halfway are refused, logged as security events, and repeat offenders are blocked for a while. You can watch refusals and runs live on deflua.net/realtime.
Projects & scripts
A project holds your keys and rules; its scripts are what gets delivered.
Each script has a few switches, set per script in Scripts or with /scripts in Discord:
- Activeactivate / deactivate
- Turn a script off and runs stop at the door, without touching keys. Useful while you fix a broken update.
- Heartbeatrecommended
- Running copies keep checking in. Suspend, ban or expire a key and every session using it stops, not just the next run.
- FFA modefree for all
- Anyone can run it, no key needed. Handy for a free week or a public tool; can be set to end on a date.
- Silent mode
- Hides Deflua's own console output, so buyers only see what your script prints.
- Version
- Shown to your script as
DEFLUA_VERSION. Bump it when you ship, so you can tell which build a buyer is on.
An optional init script runs before your main script on every run. Use it for shared setup such as UI libraries or config, kept separate from the code you change often.
Keys
One key per buyer. It decides whether a run is allowed, for how long, and on which device.
Lifetime
A key can last forever, a number of days from when you create it, or until a fixed date. Change it later with extend or set expiry; an expired key gets This key has expired.
States
| State | What it means | Undo |
|---|---|---|
| Active | Runs normally. | — |
| Suspended | Paused. Runs are refused, nothing else changes. Good for a chargeback under review. | Unsuspend |
| Banned | Blocked, either for good or until a date you set, with a reason. A ban returns an unban_token. | Unban, or the token |
| Expired | Past its expiry date. | Extend |
Notes and Discord IDs
Attach a note (an order number, a username) and the buyer's Discord ID to any key. Both are searchable, show up in your logs, and are passed to your script as DEFLUA_NOTE and DEFLUA_DISCORD_ID.
Moving keys
Export a project's keys to a file, import a list, or transfer a key to a new Discord user when a buyer changes account. Each key keeps a history of runs, resets and state changes.
Devices & resets
A key binds to the first machine that runs it. Another PC gets This key is bound to a different device.
When a buyer genuinely changes PC, the key needs a reset, which clears the binding so the next run binds again. Resets can be done by:
- The buyer, with the Reset HWID button on your Discord panel.
- You, from the key in the dashboard, with
/keys force-hwid-reset, or through the API.
You set the limits per project, so a shared key cannot hop between machines all day:
- Cooldown/project-settings cooldown
- Minimum time between two resets of the same key. A reset during the cooldown is refused with the time left.
- Max resets/project-settings max-resets
- How many resets a key gets in total. Can be raised for a single key.
- Resets enabled/project-settings resets-enabled
- Turn self-service resets off completely; only you can reset then.
Who may run it
Beyond the key, three rules narrow where and how your script runs.
- Game lockplace / game IDs
- List the games your script is for. Anywhere else, it stays silent and the buyer sees This game is not supported. Leave empty to allow every game.
- Executor filter/security
- Turn away executors by name, matching by
prefix,containsorexact. Their users see This executor is not supported. - IP whitelist/security
- For private or staff builds: only the listed addresses may run the project.
Discord bot
Run the whole shop from your server. Connect your account, publish a panel, and buyers serve themselves.
For you: six commands to open shop
Type / in your server and the bot lists everything it can do. These six, in order, take you from nothing to a working panel. Click one to copy it.
For buyers: the panel
/panel publish posts this. Every buyer gets the same five buttons and each one answers privately, at any hour, without you. Hover a button to see what it does.
Most admin commands need Discord's Administrator permission or your manager role. Buyers can't use any button until they redeem a key.
Logs & webhooks
Every run, reset and refusal is logged in your dashboard, and can be posted to Discord the moment it happens.
Each project has four event webhooks, set in the dashboard, with /webhooks or through the API. Each can be switched on and off on its own:
| Webhook | Posts when |
|---|---|
| Execution | A key runs your script. Set an interval so a busy key does not flood the channel. |
| Ban | A key is banned, by you or automatically. |
| Suspicious | Something looks off: a key on a new device, a refused bypass attempt. |
| Reset | A device reset happens, with who asked for it. |
Only Discord webhook URLs (https://discord.com/api/webhooks/…) are accepted. Per-project charts for runs, keys, devices and countries are in Analytics.
Runtime variables
Your script can read who is running it. Use any of these names and Deflua fills them in on each run.
| Name | Type | Value |
|---|---|---|
DEFLUA_KEY | string | The buyer's key. |
DEFLUA_DISCORD_ID | string | Discord ID attached to the key, or empty. |
DEFLUA_NOTE | string | The note on the key. |
DEFLUA_EXECUTIONS | number | How many times this key has run the script. |
DEFLUA_EXPIRES | number | Expiry as a Unix timestamp. |
DEFLUA_SECONDS_LEFT | number | Seconds until the key expires. |
DEFLUA_KEY_TYPE | string | The key's type, lifetime unless you set another. |
DEFLUA_IS_PREMIUM | boolean | true for a real key, false when someone runs it through FFA mode without one. |
DEFLUA_SCRIPT_NAME | string | Your script's name. |
DEFLUA_VERSION | string | The version you set on the script. |
-- greet the buyer and warn them before their key runs out
local days = math.floor(DEFLUA_SECONDS_LEFT / 86400)
print(("Welcome back! Run #%d of %s v%s"):format(DEFLUA_EXECUTIONS, DEFLUA_SCRIPT_NAME, DEFLUA_VERSION))
if days < 3 then
warn("Your key expires in " .. days .. " days. Renew in our Discord.")
endIf you prefer text placeholders, %%KEY%%, %%DISCORD_ID%%, %%NOTE%%, %%EXPIRES%%, %%VERSION%% and the rest work the same way inside strings.
Sending to Discord
Post from your script to your own Discord channel without putting the webhook URL in the code.
Save a webhook under a short name (an alias) in your project, then call DEFLUA_SEND_WEBHOOK with that name. The real URL stays on our side, so nobody can lift it from your script and spam your channel.
DEFLUA_SEND_WEBHOOK("drops", {
content = "%%DISCORD_ID%% found a rare drop!",
embeds = {{ title = "Legendary Sword", description = "Key %%KEY%%" }},
})The payload is a normal Discord webhook body. %%KEY%%, %%DISCORD_ID%%, %%HWID%% and %%LOADER%% inside it are filled in on our side. Calls never throw, so a Discord outage cannot crash your script.
Authentication
Everything in the dashboard can be done from your own code: a shop backend, a payment hook, your own bot.
Base URL https://api.deflua.net. Send your account's API key, from Settings → API key, in a header on every request:
X-API-Key: YOUR_API_KEY
# or
Authorization: Bearer YOUR_API_KEYBodies are JSON. Every response has success and a message; errors use the usual status codes: 400 bad input, 401 missing or wrong API key, 403 plan limit reached, 404 not your project, 429 too soon (for example a reset in cooldown).
Endpoints
Keys are called users in the API. {project} is your Project ID.
/v3/projectsYour projects./v3/projects/{project}One project with its scripts and key count./v3/projects/{project}/settingsWebhook URLs and toggles: webhook_url, webhook_ban_url, webhook_suspicious_url, webhook_reset_url, the matching *_enabled flags, webhook_exec_interval./v3/projects/{project}/usersList keys. Filter with user_key, discord_id or identifier; page with limit (max 500) and offset./v3/projects/{project}/usersCreate a key. Optional user_key, key_days or auth_expire (Unix time), discord_id, note. Returns user_key./v3/projects/{project}/usersChange a key by user_key: note, discord_id, auth_expire (-1 for never), max_resets, status./v3/projects/{project}/usersDelete a key. Body {"user_key": "…"}./v3/projects/{project}/users/resethwidReset a key's device. Respects your cooldown./v3/projects/{project}/users/suspendPause a key. /unsuspend resumes it./v3/projects/{project}/users/blacklistBan a key, with optional reason and ban_expire (Unix time). Returns an unban_token./v3/projects/{project}/users/unban?unban_token=…Lift a ban with its token. Needs no API key, so you can hand the link to a support bot./v3/projects/{project}/users/history?user_key=…A key's recent runs (up to 200)./v3/projects/{project}/scripts/{script}Replace a script's source. Body {"script_content": "…"}. Ship an update from your build pipeline./v3/projects/{project}/scripts/{script}/initReplace the script's init script./v3/projects/{project}/executor-blacklistList blocked executors. POST with pattern and match_type (prefix, contains, exact) to add; DELETE with pattern to remove./v3/projects/{project}/ip-whitelistList allowed IPs. POST with ip and an optional note; DELETE with ip./v3/projects/{project}/webhooksSaved aliases for DEFLUA_SEND_WEBHOOK. POST with alias and webhook_url to add./v3/projects/{project}/webhooks/{alias}Remove an alias./v3/statusPublic health of the service, no key needed. The same data drives uptime.deflua.net.Examples
A buyer pays in your shop; your server makes them a 30-day key and sends it.
curl -X POST https://api.deflua.net/v3/projects/YOUR_PROJECT_ID/users \
-H "X-API-Key: $DEFLUA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"key_days": 30, "discord_id": "123456789012345678", "note": "order 1042"}'{ "success": true, "message": "Success!", "user_key": "9f3c…e1" }Same thing from Node, then a device reset when the buyer asks:
const api = (path, body, method = "POST") =>
fetch(`https://api.deflua.net/v3/projects/${process.env.PROJECT_ID}${path}`, {
method,
headers: { "X-API-Key": process.env.DEFLUA_API_KEY, "Content-Type": "application/json" },
body: JSON.stringify(body),
}).then(r => r.json());
const { user_key } = await api("/users", { key_days: 30, note: "order 1042" });
const reset = await api("/users/resethwid", { user_key });
if (!reset.success) console.log(reset.message); // e.g. "HWID reset is on cooldown. Try again in 3h 12m."What buyers see
When a run is refused, the buyer gets one plain sentence. Here is what each means and what fixes it.
| Buyer sees | Why | Fix |
|---|---|---|
| No valid key found. | Wrong key, a typo, or a key from another project. | Check the key and the Project ID in the line. |
| This key is bound to a different device. | The key is in use on another PC. | Reset the device. |
| This key has expired. | Past its expiry. | Extend the key. |
| This key has been suspended. | You paused it. | Unsuspend. |
| This key has been permanently banned. | Banned with no end date. | Unban, if you choose to. |
| This key has been temporarily banned. | Banned until a date. | Wait, or unban. |
| This game is not supported. | Game lock is on and this game is not listed. | Add the game, or run it in a listed one. |
| This executor is not supported. | The executor is on your filter. | Use another executor. |
| Too many requests. Please wait and try again. | Too many runs too fast, or the address was briefly blocked after suspicious requests. | Wait a few minutes. |
| Service subscription expired. | The seller's Deflua plan has lapsed. | The seller renews. |
| Unable to connect to the authentication server. | No connection, or the service is down. | Check uptime.deflua.net, then retry. |
Ship it locked.
Sign-up is by invite. No code yet? Ask in our Discord.