Protect your script
Runtime variables
Globals the whitelist sets before your code runs — premium status, time left, Discord ID and more.
On this page
Available variables
After a successful activation — and before the first line of your code — the whitelist writes these into your script's environment:
| Variable | Type | Value |
|---|---|---|
SA_IsUserPremium | boolean | The key is Premium. |
SA_LinkedDiscordID | string | Linked Discord ID, "" if none. |
SA_ScriptName | string | The name of the obfuscated script. |
SA_TotalExecutions | number | How many times this key has loaded the script. |
SA_SecondsLeft | number | Seconds until the key expires; math.huge for lifetime keys. |
SA_UserNote | string | The key's Name from the dashboard, "Not specified" if empty. |
SA_ScriptVersion | string | The script's version, "1.0.0" by default. |
SA_SessionId | string | SantiAuth only: the server session ID. |
SA_SessionValid | boolean | SantiAuth only: turns false when the server rejects the session (key disabled, banned or expired, script disabled) or after 3 heartbeats in a row can't reach the server. |
Examples
Premium-only features
lua
if not SA_IsUserPremium then
return print("This feature is Premium only")
endShowing time left
lua
local left = SA_SecondsLeft == math.huge and "forever"
or ("%d hours"):format(SA_SecondsLeft // 3600)
print(("Welcome back! %d executions, key valid for %s"):format(SA_TotalExecutions, left))Stopping a loop when the session ends
lua
while SA_SessionValid do
-- farm
task.wait(1)
end