Documentation

Gatekept docs

Everything you need to ship a protected script: the loader, runtime variables, game scripts, live messages, error reports, leak tracing, ad networks and the developer API.

Quick start

  1. Create a project in the dashboard and upload your script (.lua or pasted source).
  2. Pick a key mode: checkpoints, manual keys or keyless.
  3. Add checkpoint links under Settings, then share the loader.
loadstring(game:HttpGet("https://gatekept.online/v1/loader/PROJECT_ID"))()

To skip the key prompt, set script_key before the loader. The key is also saved on the player's device after the first successful run.

script_key = "GK-XXXX-XXXX-XXXX-XXXX"
loadstring(game:HttpGet("https://gatekept.online/v1/loader/PROJECT_ID"))()

Runtime variables

Before your script runs, Gatekept sets these globals (through getgenv() when available). Use them for premium features or to greet buyers.

NameTypeDescription
GK_KEYstring or nilThe key used. nil in keyless mode.
GK_KEY_TYPEstring"checkpoint", "manual" or "keyless".
GK_PREMIUMbooleantrue for manual keys you issued (buyers, staff).
GK_NOTEstring or nilThe note on the key.
GK_DISCORD_IDstring or nilDiscord user ID linked to the key.
GK_EXPIRES_ATnumber or nilExpiry as a Unix timestamp. nil for lifetime keys.
GK_SECONDS_LEFTnumberSeconds until expiry. -1 for lifetime or keyless.
GK_EXECUTIONSnumber or nilTimes this key has run the script.
GK_SCRIPT_VERSIONnumberIncreases by one on every upload.
GK_SCRIPTstringName of the game script that was served, or "default".
GK_BUILDstringBuild ID of this copy. Show it in your UI so leaked screenshots can be traced too.
GKtableAll of the above in one table, plus GK.onMessage.
if GK_PREMIUM then
    print("Premium unlocked for " .. (GK_NOTE or "buyer"))
end
if GK_SECONDS_LEFT >= 0 and GK_SECONDS_LEFT < 3600 then
    warn("Your key expires in less than an hour")
end

Game scripts

One loader can serve a different script in every game. In the Script tab, add a game script and enter the place IDs or universe IDs it is for (Roblox game links are accepted). The loader reports the current game, and Gatekept serves the first matching game script. Players in any other game receive the default script, or a clear message if there is none.

Set a game script to Premium keys only to serve it only to manual keys; checkpoint keys fall back to the default script. Each game script has its own version, safety check and obfuscation.

Live messages

The Live tab shows how many copies are running and sends messages to them within about a minute. Messages can target everyone, premium keys, checkpoint keys or one key, and expire automatically.

  • Announcement shows a Roblox notification.
  • Update notice is delivered only to copies older than the current version.
  • Disconnect kicks players whose copy started before the message was sent. Players who re-run the script are not affected.

Handle messages in your own UI with GK.onMessage. Return true to suppress the default notification.

GK.onMessage(function(kind, text)
    if kind == "notice" then
        MyHub:Notify(text)
        return true
    end
end)

Error reports

Uncaught errors in your script, including errors in threads it starts, are sent to the Errors tab. Identical errors are grouped, with the line number, stack trace, number of players affected, executors and script version. Line numbers refer to your uploaded source; for obfuscated scripts they refer to the obfuscated output.

Mark an error as resolved after you ship a fix. Reports from copies running an older version do not reopen it; the same error in a newer version does. New error groups are posted to your execution log webhook. Each run sends at most 10 reports.

Leak tracing

Every copy players receive carries a build ID, written into the script as invisible whitespace and as GK_BUILD. When a copy is leaked, paste it (or just the build ID) into Security → Find the source of a leak to see the key, device, network and executor it was served to, then ban them in one click. The watermark survives copying and re-uploading; reformatting the code or stripping trailing whitespace removes it, but GK_BUILD remains unless it is edited out. Build IDs are kept for 30 days.

Shared-key protection flags or disables a key used from more networks than you allow within 24 hours. Mobile players can switch networks often, so start with flagging or a limit of 3 or more.

Ad networks

Each checkpoint can use a different network. Revenue goes to your own account; Gatekept verifies every completion server-side and refuses skipped or replayed steps.

work.ink

Paste your work.ink link. No token is needed.

Linkvertise

Create a link per checkpoint and set its target to the callback shown in Settings (https://gatekept.online/k/PROJECT_ID/cp?n=1 for checkpoint 1, and so on). Enable anti-bypassing and paste your anti-bypass token under Settings → Ad networks.

LootLabs and AdMaven

Paste the link and your API token (LootLabs: Profile → API Key; AdMaven: API key in the publisher panel). Gatekept encrypts a one-time destination for every visit with the Redirect API, so the return link cannot be shared or guessed.

Device reset, logs and blacklist

Player device reset. Under Security, choose how often players may move their key to a new device. A reset form appears on your key page.

Execution logs. Paste a Discord webhook from your own server. Each run is posted with the key, note, Discord ID, device ID, IP ID and executor, batched to respect Discord's rate limits. Refused attempts can be included.

Blacklist. Block a device ID (HWID) or a network. Networks are identified by an IP ID: a one-way hash unique to your project, so you can block a leaker without ever seeing a player's IP address. You can also enter a raw IP address, which is hashed before it is stored. The shield button in the keys table revokes a key and blocks its device in one step.

Obfuscator

Turn on Obfuscate on upload in the Script tab. Each upload is processed with the Prometheus Medium preset (string encryption, anti-tamper, a virtual machine, constant array and number expressions), targeting Luau. Your original source is scanned and stored privately; players only receive the obfuscated output. Scripts up to 1 MB are supported.

Based on Prometheus by Elias Oelschner, https://github.com/prometheus-lua/Prometheus

Developer API

Create a key under Account → Developer API and send it as a bearer token. All requests and responses are JSON. Limit: 120 requests per minute.

curl https://gatekept.online/v1/api/projects/PROJECT_ID/keys   -H "Authorization: Bearer gk_your_key"   -H "Content-Type: application/json"   -d '{"count": 1, "days": 30, "note": "Order #1042", "discord_id": "123456789012345678"}'
EndpointDescription
GET/v1/api/meYour plan, limits and active key count.
GET/v1/api/projectsAll projects.
GET/v1/api/projects/{id}One project.
PATCH/v1/api/projects/{id}Kill switch: {"enabled": false}.
GET/v1/api/projects/{id}/keysList keys. Query: search, state (active, unused, bound, expired, revoked), limit (max 1000).
POST/v1/api/projects/{id}/keysCreate keys: count (1–200), days (0 = lifetime), note, discord_id. Creator plan or higher.
GET/v1/api/keys/{key}One key.
PATCH/v1/api/keys/{key}Update note, discord_id, days (new expiry from now, 0 = lifetime) or revoked.
POST/v1/api/keys/{key}/resetClear the device lock.
DELETE/v1/api/keys/{key}Delete a key.
GET/v1/api/projects/{id}/blacklistList blocked devices and networks.
POST/v1/api/projects/{id}/blacklistBlock: {"kind": "hwid" | "ip", "value": "…", "note": "…"}.
DELETE/v1/api/projects/{id}/blacklist/{entry}Unblock.
GET/v1/api/projects/{id}/onlineCopies running now: {"online": 12}.
POST/v1/api/projects/{id}/messagesSend a live message: kind (notice, update, kick), text, audience (all, premium, free, key), key, ttl in minutes (15, 60, 360, 1440, 4320).
GET/v1/api/projects/{id}/errorsError groups. Query: status (open, resolved, all).

Key objects contain key, project, type, state, note, discord_id, hwid, ip_id, expires_at, executions, last_used and created. Times are Unix milliseconds. Errors return {"error": "…"} with a 4xx status.