One lineto run it.

How to put a Roblox script behind Deflua: make a project, hand out keys, and give buyers the line they paste into their executor. The rest is detail for when you need it.

Your loader line0 of 2
lua · paste into the executor

Nothing you type here leaves this page. Buyers only ever need these two lines.

Get started

Quick start

From an invite code to a buyer running your script, in five steps.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. Hand out the loader line

    Give each buyer their key and the two lines below. That is the whole install.

Get started

The loader line

The buyer sets their key, then loads your project. The loader does the rest.

lua
script_key = "PASTE-YOUR-KEY-HERE"
loadstring(game:HttpGet("https://api.deflua.net/v3/loaders/YOUR_PROJECT_ID.lua"))()
  • script_key must 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.
On the first run, the key binds to that buyer's device. See Devices & resets for what happens when they change PC.
Get started

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.

HandshakeSpeaks our protocol, from a real executor, or is dropped.
IdentityThe key exists, belongs to this project and is not expired, suspended or banned.
DeviceThe machine matches the one the key is bound to.
MomentA single-use pass, valid for seconds, tied to that key and device.
SealYour script is sealed for this run alone and delivered.

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.

Your shop

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.

Your shop

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

StateWhat it meansUndo
ActiveRuns normally.—
SuspendedPaused. Runs are refused, nothing else changes. Good for a chargeback under review.Unsuspend
BannedBlocked, either for good or until a date you set, with a reason. A ban returns an unban_token.Unban, or the token
ExpiredPast 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.

Your shop

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.
Your shop

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, contains or exact. Their users see This executor is not supported.
IP whitelist/security
For private or staff builds: only the listed addresses may run the project.
Your shop

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.

#shop-adminonly you and your staffDeflua bot
Deflua · commandsin order

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.

#buyer-panelAutofarm Hub · keys, script & rolesLive in Discord
DefluaAPPToday at 21:45
Autofarm Hub Control Panel

If you're a buyer, click on the buttons below to redeem your key, get the script or get your role.

Hover a button to see what the buyer gets back.

Most admin commands need Discord's Administrator permission or your manager role. Buyers can't use any button until they redeem a key.

Your shop

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:

WebhookPosts when
ExecutionA key runs your script. Set an interval so a busy key does not flood the channel.
BanA key is banned, by you or automatically.
SuspiciousSomething looks off: a key on a new device, a refused bypass attempt.
ResetA 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.

In your script

Runtime variables

Your script can read who is running it. Use any of these names and Deflua fills them in on each run.

NameTypeValue
DEFLUA_KEYstringThe buyer's key.
DEFLUA_DISCORD_IDstringDiscord ID attached to the key, or empty.
DEFLUA_NOTEstringThe note on the key.
DEFLUA_EXECUTIONSnumberHow many times this key has run the script.
DEFLUA_EXPIRESnumberExpiry as a Unix timestamp.
DEFLUA_SECONDS_LEFTnumberSeconds until the key expires.
DEFLUA_KEY_TYPEstringThe key's type, lifetime unless you set another.
DEFLUA_IS_PREMIUMbooleantrue for a real key, false when someone runs it through FFA mode without one.
DEFLUA_SCRIPT_NAMEstringYour script's name.
DEFLUA_VERSIONstringThe version you set on the script.
lua · your 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.")
end

If you prefer text placeholders, %%KEY%%, %%DISCORD_ID%%, %%NOTE%%, %%EXPIRES%%, %%VERSION%% and the rest work the same way inside strings.

In your script

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.

lua · your script
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.

REST API

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:

http
X-API-Key: YOUR_API_KEY
# or
Authorization: Bearer YOUR_API_KEY

Bodies 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).

Your API key can do everything you can. Keep it on your server, never in a script you hand out, and contact us to replace it if it ever leaks.
REST API

Endpoints

Keys are called users in the API. {project} is your Project ID.

Projects
GET/v3/projectsYour projects.
GET/v3/projects/{project}One project with its scripts and key count.
PATCH/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.
Keys
GET/v3/projects/{project}/usersList keys. Filter with user_key, discord_id or identifier; page with limit (max 500) and offset.
POST/v3/projects/{project}/usersCreate a key. Optional user_key, key_days or auth_expire (Unix time), discord_id, note. Returns user_key.
PATCH/v3/projects/{project}/usersChange a key by user_key: note, discord_id, auth_expire (-1 for never), max_resets, status.
DELETE/v3/projects/{project}/usersDelete a key. Body {"user_key": "…"}.
POST/v3/projects/{project}/users/resethwidReset a key's device. Respects your cooldown.
POST/v3/projects/{project}/users/suspendPause a key. /unsuspend resumes it.
POST/v3/projects/{project}/users/blacklistBan a key, with optional reason and ban_expire (Unix time). Returns an unban_token.
GET/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.
GET/v3/projects/{project}/users/history?user_key=…A key's recent runs (up to 200).
Scripts
PUT/v3/projects/{project}/scripts/{script}Replace a script's source. Body {"script_content": "…"}. Ship an update from your build pipeline.
PUT/v3/projects/{project}/scripts/{script}/initReplace the script's init script.
Rules
GET/v3/projects/{project}/executor-blacklistList blocked executors. POST with pattern and match_type (prefix, contains, exact) to add; DELETE with pattern to remove.
GET/v3/projects/{project}/ip-whitelistList allowed IPs. POST with ip and an optional note; DELETE with ip.
Script webhooks
GET/v3/projects/{project}/webhooksSaved aliases for DEFLUA_SEND_WEBHOOK. POST with alias and webhook_url to add.
DELETE/v3/projects/{project}/webhooks/{alias}Remove an alias.
Service
GET/v3/statusPublic health of the service, no key needed. The same data drives uptime.deflua.net.
REST API

Examples

A buyer pays in your shop; your server makes them a 30-day key and sends it.

bash
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"}'
json · response
{ "success": true, "message": "Success!", "user_key": "9f3c…e1" }

Same thing from Node, then a device reset when the buyer asks:

javascript
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."
Help

What buyers see

When a run is refused, the buyer gets one plain sentence. Here is what each means and what fixes it.

Buyer seesWhyFix
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.