Forge

Updates and stops

While your script runs, the loader checks in about every 5 minutes and updates the same forge table.

Callbacks

forge.onUpdate = function(forge)
  -- The tier, the expiry or the broadcast changed.
  -- An upgrade shows as forge.tier.rank going up.
end

forge.onStop = function(reason, message)
  -- reason is "revoked", "paused" or "too-many-sessions".
  -- After this returns, every function of the script returns at once.
end

What stops a running copy

Pausing a script stops every running copy at its next check-in. So does revoking a key with Revoke and stop now.

When a key expires, is refunded or moves to a lower tier, copies that are already running keep going. The change applies from the key's next run.

  1. Paused stops the script for everyone. Players see the message you write.
  2. Broadcast sends a message to every running copy. Your script reads it as forge.message.