Forge

Script values

Forge sets these names when your script starts. They are locals in your script, never globals, so other scripts in the executor can't read them.

Names

NameValue
Forge_HasKeytrue when the player ran the script with a key, false on a keyless run
Forge_TierThe key's tier, such as "Pro". nil when the hub has no tiers
Forge_TierRankThe tier's rank, from 0 for the lowest
Forge_SecondsLeftSeconds until the key ends. math.huge for a key that never ends
Forge_ExecutionsThe key's executions, this one included. 0 on a keyless run
Forge_NoteThe key's note, or nil
Forge_DiscordIdThe Discord account linked to the key, or nil
Forge_ScriptNameThe script's name
Forge_ScriptVersionThe live version's number, such as 14

They are read once, when the script starts. forge holds the same values and changes while the script runs (see Updates and stops).

Example

main.lua
if Forge_TierRank >= 1 then
  Main:CreateToggle({ Name = "Kill aura" })
end

if not Forge_HasKey then
  print("Running without a key")
end

print(Forge_ScriptName, Forge_ScriptVersion)   -- "Fruit Hub"  14
print(Forge_SecondsLeft)                       -- math.huge for a key that never ends