# Luarmor User Manual & F.A.Q

{% hint style="success" %}
You can also use this documentation below, maintained by Stefanuk. :arrow\_down\_small:

<https://luarmor.mintlify.app/introduction>

:point\_up:
{% endhint %}

## ✅Quickstart Guide✅

If you just started using Luarmor, you should read this quick start guide. It will take you only 10 minutes to understand how Luarmor works.&#x20;

### 1️⃣ Create an account:

* In order to use Luarmor, you need to create an account. And for that, you need an "invite code". Invite codes can be purchased here --> [**https://luarmor.net#prices** ](https://luarmor.net/#prices)
* Alternatively, you can use an invite code to extend your membership for +30 extra days here    --> [**https://luarmor.net/profile**](https://luarmor.net/profile)

<div><figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FwTcvt5RnwpRb5kcdjCOq%2Fimage_2023-01-25_182739295.png?alt=media&#x26;token=fa76a0d8-043e-494c-9a5b-8a36d0d5d4c1" alt=""><figcaption><p>Step 1 - Sign Up at <a href="https://luarmor.net/signup">https://luarmor.net/signup</a></p></figcaption></figure> <figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FS5ThTJdT78ZgM2dqkBUt%2Fimage_2023-01-25_183438680.png?alt=media&#x26;token=95b517e4-a523-4473-b13d-3976f3cda1b2" alt=""><figcaption><p>Step 2 - Receive your login credential ('API Key')</p></figcaption></figure> <figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FZTqh1ur5uHNDWdOTCKRM%2Fimage_2023-01-25_183546988.png?alt=media&#x26;token=648d356f-7cbd-46ac-81db-60d173b063ca" alt=""><figcaption><p>Step 3 - Log in and access the dashboard at<a href="https://luarmor.net/login"> https://luarmor.net/login</a></p></figcaption></figure></div>

### 2️⃣ Upload your script:

{% hint style="info" %}
Luarmor has a feature called **project folders.** They can contain multiple scripts, allowing you to have a **script hub** with multiple games in it.
{% endhint %}

<div><figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FbBf4QDWKTPT1sobvR043%2Fimage_2023-01-25_190319592.png?alt=media&#x26;token=5be3f86a-9ce4-4bc6-b03f-7855dcf43961" alt=""><figcaption><p>Step 4 - Create a project at <a href="https://luarmor.net/projects">https://luarmor.net/projects</a></p></figcaption></figure> <figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FiC6ceytKlq0vj1QcOLSK%2Fimage_2023-01-25_191125441.png?alt=media&#x26;token=2b39db2e-6deb-400f-945b-8aefc465a913" alt=""><figcaption><p>Step 5 - Enter project details</p></figcaption></figure> <figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FbfEFUUk4Bb8MdOyD5WMn%2Fimage_2023-01-25_191317150.png?alt=media&#x26;token=b90960f9-e8f6-463c-8675-48a9e60c2098" alt=""><figcaption><p>Step 6 - Upload your script to the project</p></figcaption></figure></div>

<div><figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FUk6Y6yVYm1as5cpaMAre%2Fchrome_3ZSjM8lmhH.png?alt=media&#x26;token=635d793e-d2c4-4ade-8f72-96d2516a0ec0" alt=""><figcaption><p>Step 7 - Enter script details. Detailed descriptions can be found below</p></figcaption></figure> <figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FVlLQIf8XPJP1Oph5cKAr%2Fimage_2023-01-25_195902053.png?alt=media&#x26;token=023c1c2d-d593-4cc6-86e5-8bf837711f50" alt=""><figcaption><p>Step 8 - Download the loader file. Keep in mind that loader does not change, so you don't have to re-download it every time you update your script.</p></figcaption></figure></div>

### 3️⃣ Whitelist users:

<mark style="color:green;">**If you are migrating**</mark> from another whitelist service, or your own, you can easily import your users with 2 clicks. Skip to [**this part**](#mass-whitelist-import-users) for mass whitelisting details.

{% hint style="info" %}
There are **2 ways** to whitelist someone:

* Generate an empty key at [**https://luarmor.net/users**](https://luarmor.net/users) and give it to user. Alternatively, you can mass-generate keys and put them to your sellix / shoppy as "**serials"** for automated purchases.&#x20;

<img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FqkkUrRMrwbXz0LVoBHyg%2Fimage_2023-01-25_202758975.png?alt=media&#x26;token=338493e6-9b7b-4e67-a009-02aae8931e31" alt="" data-size="original">![Sellix / Shoppy integration](https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2Fen0BQfj4Tsvn9wNRoKqB%2Fchrome_l0Mon3N9Xa.gif?alt=media\&token=2d0ad816-92e0-4c38-9326-f3c1cf07f8a0)

* Or run `/whitelist` command via discord bot and user will be able to click on "get script" button on control panel

&#x20;![](https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FrfybAm8PmZ6bGkYWlO6F%2Fimage.png?alt=media\&token=43a7ec5d-b0a0-487f-8bd4-9a7e0ae0ed91)![](https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2Fl84R12IWP5xl36ajc6xH%2Fimage.png?alt=media\&token=51f31d14-ad61-4625-b5f8-6f8e9a863001)

( Bot invite will be DM'ed upon purchasing a Luarmor invite code. Join our discord server to buy an invite code: [**https://discord.gg/luarmor**](https://discord.gg/luarmor) )

{% endhint %}

Once the user is whitelisted, they can execute the script by adding **`script_key = "KEY HERE";`** on top of the script. Note that keys are **linked to user's HWID** and sharing the key with someone else won't work because they will have a different HWID.&#x20;

<figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FfBjyeDgTZgxLhrSdvg91%2Fimage.png?alt=media&#x26;token=511f8879-5e53-4d44-a6c5-004dec938c67" alt=""><figcaption><p>Tada! authenticated in 0.7 seconds ;D</p></figcaption></figure>

<div><figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FuQEwszPRHOroS8JDwAjL%2Fimage_2023-01-25_210655791.png?alt=media&#x26;token=2907ae4f-2ce8-45aa-9dc7-ca0ecd8b8d89" alt=""><figcaption><p>You will get this notification to your webhook.</p></figcaption></figure> <figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FnLExyFJ1VIt3yoiRJDxK%2Fimage_2023-04-24_053828785.png?alt=media&#x26;token=c9c86007-24f0-4bd5-b255-a71e35c8697c" alt=""><figcaption><p>script_key must be added on top of the script (except for FFA mode)</p></figcaption></figure></div>

### 4️⃣ Reset HWID:

In some cases, user's HWID might change on its own, when that happens, they must run **`/resethwid`** via discord bot and re-execute the script. It will automatically assign the new HWID upon execution.

<figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FBB3jMGry8o8RG3oCEK7q%2Fimage.png?alt=media&#x26;token=e3bb325b-bda8-416e-9056-c07a25dacb58" alt=""><figcaption><p>You can reset HWID like this. Users can reset their own HWIDs as well if you have the setting enabled.</p></figcaption></figure>

If you think someone might be sharing their key and using **`/resethwid`** for others, simply compare action fingerprint in the resethwid notification

<figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FuljL1wvCeZ7VHdfaK79X%2Fimage.png?alt=media&#x26;token=8a5aa076-6b5f-416e-b2f7-76b0a9ff9467" alt=""><figcaption><p>Reset HWID notification action fingerprints. If they're *mostly* similar, it's legit. If they're fully different, there's a high chance that user is sharing his key to someone else and /resethwid'ing on their behalf.</p></figcaption></figure>

## ⚡Runtime Variables⚡

Luarmor has runtime variables that allows you to access to user details such as discord id, total executions, script name, premium, user note etc..

They can be used for a lot of things. Check out this example:

<figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2Fy83stnYn8FsnqVUW8W8N%2Fimage.png?alt=media&#x26;token=3cde18b5-8266-4b8b-95ad-d89274c74a98" alt=""><figcaption><p>A script that utilizes runtime assigned variables.</p></figcaption></figure>

{% hint style="success" %}
You can see a full list of runtime variables here:

* **`LRM_IsUserPremium`** : if user is whitelisted or not. useful for FFA scripts, ('freemium')&#x20;
* **`LRM_LinkedDiscordID`** : linked discord id&#x20;
* **`LRM_ScriptName`** : name of the current script.&#x20;
* **`LRM_TotalExecutions`** : total executions of the user. it will be 0 by default.&#x20;
* **`LRM_SecondsLeft`** : seconds left until expiry. it will be math.huge if auth\_expire isn't set&#x20;
* **`LRM_UserNote`** : user note ('Not specified' by default)
* **LRM\_ScriptVersion**    : version of the script. Looks like "0.0.0.3" and is a string.
  {% endhint %}

## ⚙️ Discord Bot Configuration ⚙️

{% hint style="danger" %}
This documentation shows the setup for OLD BOT!. New bot looks different than this. It doesn't require a documentation to use the new bot.
{% endhint %}

You can automate everything using this discord bot. Or you can write your own bot using our [API documentation.](https://docs.luarmor.net/docs/luarmor-api-documentation)&#x20;

If you're a Luarmor buyer, <mark style="color:green;">**discord bot invite will be sent to you via DM**</mark>. After inviting the bot, run **`/login`** command and link the server.

<div><figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FuWBz18Z8ohj1f8EHkvXG%2Fimage_2023-01-25_230813231.png?alt=media&#x26;token=09a95d4c-8325-4439-bde7-c41bb6ef3b3d" alt=""><figcaption><p>Step 1 - Run /login [api key] command</p></figcaption></figure> <figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FlYXON01aS19MkgFsMfv3%2Fimage_2023-01-25_231000491.png?alt=media&#x26;token=00d08fa0-984b-4c9f-9c17-d0eb8c5efb40" alt=""><figcaption><p>Step 2 - Set a manager role. People with manager role can run basic management commands like /whitelist, /force-resethwid</p></figcaption></figure></div>

<div><figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FaA2BtuNuh95iENbdb4cA%2Fimage_2023-01-25_231142232.png?alt=media&#x26;token=fd71cef7-ba6a-4141-bdd0-77c13ddca497" alt=""><figcaption><p>Step 3 - Select a project. Once you do this, all management commands will be <br>applied to this project. </p></figcaption></figure> <figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FGcCxQHYAAHOdk7Hd1BRw%2Fimage_2023-01-25_231324241.png?alt=media&#x26;token=149646ee-3187-4053-8886-5341577dfcf6" alt=""><figcaption><p>Step 4 - Set a buyer role. This role will be automatically<br>assigned when a manager runs /whitelist [user] <br>or when a user runs /redeem [code] or /getrole</p></figcaption></figure></div>

<div><figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FMllxsRMEuK9cABhmYDmg%2Fimage_2023-01-25_231616781.png?alt=media&#x26;token=20fd5e8f-4525-42a7-8f1f-a8b8c81d308b" alt=""><figcaption><p>Step 5 - Set the script to DM to users when they run /script or a manager runs /whitelist</p></figcaption></figure> <figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FnMN7ARjCJTUZRhe0X1nw%2Fimage_2023-01-25_231732307.png?alt=media&#x26;token=45d3aac2-d71e-47b1-ada9-3031db3ea229" alt=""><figcaption><p>This is what the file should be like.</p></figcaption></figure></div>

## 👑 Mass Whitelist - Import Users 👑

If you already have users with a specific role, you can easily mass whitelist every single one of them with one command.&#x20;

<div><figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FUm27sD2D21W5JaSLvjbu%2Fimage_2023-01-25_222959552.png?alt=media&#x26;token=cbea7ab0-5001-4b41-bc33-6551acbb91b5" alt=""><figcaption><p>Your already existing users</p></figcaption></figure> <figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FI7xbMM0OPMQKQhlIiLEi%2Fimage_2023-01-25_223027579.png?alt=media&#x26;token=8df39f3d-8576-4738-9787-44f9682b1ae4" alt=""><figcaption><p>Command syntax</p></figcaption></figure></div>

<figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2Fy64koaVUlNbaX2qBdpt4%2Fimage.png?alt=media&#x26;token=17d54d71-2e13-46d7-871f-546598d54a90" alt=""><figcaption><p>Successfully imported users</p></figcaption></figure>

{% hint style="warning" %}
"Total failed" means their discord IDs are already registered, so in order to avoid duplicated entries, it will skip them.
{% endhint %}

**Alternatively**, you can import them as a JSON file.&#x20;

<div><figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FSjMjYmgk0BEgnfhDGpDx%2Fimage_2023-01-25_225318396.png?alt=media&#x26;token=3b424144-f8fc-4662-b017-eb97577c0a6a" alt=""><figcaption><p>Step 1 - Go to <a href="https://luarmor.net/users">https://luarmor.net/users</a> and click on gear icon</p></figcaption></figure> <figure><img src="https://3136584356-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwOpQH2LpMjsOwgeFM5gE%2Fuploads%2FLqANZP3mh4zJocKaPiNV%2Fchrome_KJh8Mi5E8e.png?alt=media&#x26;token=26e022a1-4033-4311-aa8c-d9dda9c36303" alt=""><figcaption><p>Step 2 - Upload your JSON file and confirm. That's it.</p></figcaption></figure></div>

{% hint style="success" %}
Once users are imported, all they need to do is to click on the "Get Script" button and the bot will respond to them with the script + key appended on top.&#x20;
{% endhint %}

## 📜 LRM\_INIT\_SCRIPT macro

This macro can be used to run a function **before** the obfuscated code. It can be useful for displaying a "Enter a key" GUI or running AC bypasses, or anything that must be executed before authentication.

{% hint style="danger" %}
Function passed into this macro will **not** be obfuscated, and **people can view it** as if it is raw. So don't pass critical code here.
{% endhint %}

**Example usage:**

{% code lineNumbers="true" %}

```lua
LRM_INIT_SCRIPT(function()
		local UI_lib = loadstring(.....)()
	
		local Completed = false;
		local enteredKey;

		UI_lib:AddTab({ 
			Title = "Enter a key", 
			Type = "InputBox", 
			OnClick = function(key) 
				enteredKey = key;
				Completed = true; -- Let it go
			end
		});

		UI_lib:Show()

	-- Pend / Block execution until key is entered.
		while not Completed do wait() end
		script_key = enteredKey

end)
```

{% endcode %}

To display an async key UI, execution must be blocked via a loop at the end of the INIT script otherwise it will continue running and kick the user with a "no key found".

To run a "bypass" or any code that doesn't require async execution, just add your code directly, without having to block the execution.

{% hint style="warning" %}
**LIMITATIONS:**&#x20;

* You can't reference upvalues inside an INIT script, because it will get extracted out of the obfuscated code, and there will be no upvalues there. So assume that it is a completely separate context, and put every helper function / variable inside, which will be used by the init script.
* There can be only **one** init script per script, you can't use this macro **more than once** in a single script.
* Whatever function you pass, must be a constant. Do not pass a variable e.g LRM\_INIT\_SCRIPT(handlerFn)
  {% endhint %}

**This works best when combined with the key check API below**.

## 🔑 Key Check Library

{% hint style="info" %}
In most cases, you don't need to check the key yourself because Luarmor protected scripts already come with the whitelist built inside them, which will kick them if a key is invalid.

But in certain cases where you want to check a key in advance (before whitelist), so the user doesn't get kicked if it is an invalid key, you can use our key checking library.
{% endhint %}

Ideally, you would want to run this library **before** the obfuscated code (luarmor loadstring) runs. So you can implement your custom logic to handle invalid / expired keys by displaying the error message to the user without kicking or crashing the client.

Here's how to import it:

```lua
local api = loadstring(game:HttpGet("https://sdkapi-public.luarmor.net/library.lua"))()
--> Returns a table with methods that you can use.
-- You must initialize it with the script ID first.

-- Put your own script ID Below:
-- You can find it in your loadstring URL or projects tab.
api.script_id = "f42f3746fb3eb60f837d3673581c14a6"

-- make the API request:
local status = api.check_key(script_key or textLabel1.Text); -- pass 32-char user key here
print(status) --> table {code:<string>, message:<string>, data?:<table>}

-- custom logic below:
if (status.code == "KEY_VALID") then

    -- fetch basic info about the key (only if KEY_VALID)
    ui:SetBanner("Welcome. Seconds left: " .. (status.data.auth_expire - os.time()))
    ui:UpdateTitle("Total executions: ", status.data.total_executions)
    
    print("Is key from ad system? " .. status.data.note == "Ad Reward" and "YES" or "NO")
    
    script_key = script_key or textLabel1.Text; -- SET THE KEY BEFORE LOADSTRINGING.
    
    api.load_script(); -- Executes the script, based on the script_id you put above.
    -- Alternatively, you can just put the loadstring you got from luarmor website.
    -- You must specify the script_key global either way.
    return
    
elseif (status.code == "KEY_HWID_LOCKED") then
    ui:Notify("Key linked to a different HWID. Please reset it using our bot")
    return
    
elseif (status.code == "KEY_INCORRECT") then
    ui:Notify("Key is wrong or deleted!")
    return    
else
    -- fallback to anything else e.g blacklisted, key empty/too short:
    player:Kick("Key check failed:" .. status.message .. " Code: " .. status.code)
end

-- You can see a full list of possible status codes and status messages below.
```

### Possible status codes:

| "code" \<string>                                     | "message" \<string>                                                                 | Meaning:                                                                                                                            |
| ---------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| <mark style="color:green;">KEY\_VALID</mark>         | The provided key is valid.                                                          | Key has no hwid assigned to it (reset state) **or** the assigned hwid matches client's hwid, and the key is not expired.            |
| <mark style="color:yellow;">KEY\_EXPIRED</mark>      | The provided key has expired.                                                       | Key is valid, hwid matches, but it has expired and can not be used.                                                                 |
| <mark style="color:red;">KEY\_BANNED</mark>          | The provided key is blacklisted.                                                    | Key is valid, hwid matches but it is blacklisted and can not be used. Blacklist reason is not exposed to the user via this library. |
| <mark style="color:orange;">KEY\_HWID\_LOCKED</mark> | The provided key has been locked to a different HWID. Reset your HWID to access it. | Key is valid, **hwid does not match** and needs to be reset via bot panel or ad page.                                               |
| <mark style="color:red;">KEY\_INCORRECT</mark>       | The provided key is incorrect / it does not exist.                                  | Key seems valid, but does not exist in the database. Could be deleted, or never generated.                                          |
| <mark style="color:red;">KEY\_INVALID</mark>         | The provided key is in an invalid format.                                           | Key is empty / too long / too short.                                                                                                |
| SCRIPT\_ID\_INCORRECT                                | The provided script ID is incorrect / it does not exist.                            | Script ID does not exist or has been deleted later.                                                                                 |
| SCRIPT\_ID\_INVALID                                  | The provided script ID is in an invalid format.                                     | Script ID is too short / too long / contains non-hexadecimal characters.                                                            |
| INVALID\_EXECUTOR                                    | HWID header contains invalid data. Executor might not be supported.                 | Executor not supported.                                                                                                             |
| SECURITY\_ERROR                                      | Request can not be validated by cloudflare                                          | Signature does not match.                                                                                                           |
| TIME\_ERROR                                          | Client time is invalid.                                                             | Request took too long to complete or os.time() is broken.                                                                           |
| UNKNOWN\_ERROR                                       | Unknown server error - contact gg/luarmor                                           | Upstream closed connection (outage or an API restart)                                                                               |

Response body will always be a JSON. In case of <mark style="color:green;">**KEY\_VALID,**</mark> an additional "data" field will be included in the table, with these fields:

<mark style="color:green;">KEY\_VALID</mark> "data" fields:

| Field Name        | Type                     | Value                                                                                                                                          |
| ----------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| auth\_expire      | number (32bit timestamp) | Expiry date of the key, could be -1 or 0 for lifetime keys.                                                                                    |
| note              | string                   | Note, can be accessed in the obfuscated script via LRM\_UserNote too. (Refer to [runtime ](#runtime-variables)[variables](#runtime-variables)) |
| total\_executions | number                   | Total executions made by this key. Could be any number.                                                                                        |

### Library Methods

You can see a full list of functions that are provided by the library.&#x20;

| method:                 | usage:                        | Meaning                                                                                                                                                                            |
| ----------------------- | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \<new index> script\_id | lib.script\_id = "PASTE ID"   | You have to assign your script ID to the table that library returns in order to check keys. Always do this first.                                                                  |
| check\_key(\<string>)   | lib.check\_key("JnX84B...Q1") | Make a call to fetch key data.                                                                                                                                                     |
| load\_script()          | lib.load\_script();           | Loadstrings the script ID that was previously assigned above. You can just use the default loadstring too. YOU MUST set the script\_key global before loadstringing or using this. |
| purge\_cache()          | lib.purge\_cache();           | Tries to delete the cached file in workspace folder that holds the last known obfuscated version of the script. You can force a purge with this.                                   |

## 🎁 Ad System (Rewards)

Refer to "[Ad System (Rewards)](https://docs.luarmor.net/ad-system-rewards)" page.
