Skip to content
Genesis v2.0 and Soteria v7.0 are here. Read the announcement
  • Macros
  • Attributes
    • SOTR_ATTRIBUTES
    • Function-scoped
    • Region-scoped
    • Attribute vocabulary
  • Obfuscate API
  • Generating Keys with API
  • Editing Keys with API
  • Using the Oracle SDK
  • Setup
  • Commands

Getting Started

Attributes

SOTR_ATTRIBUTES attaches obfuscation attributes that control how Soteria compiles a function or a region of code. Multiple attributes can be combined in a single call.

SOTR_ATTRIBUTES

Type: (...attribute) → nil

Has two forms depending on where it appears. The call itself is stripped from the compiled output either way, only the attributes it carries route into the pipeline.

Aliases: LPH_ATTRIBUTES

Function-scoped

As the first statement of a named function's body, it applies to that whole function.

local function login()
    SOTR_ATTRIBUTES(VM(NONE), PRESET(SECURE), ENCRYPT, INLINE)
    ...
end

Region-scoped

A call that is not the first statement of a named function instead opens a region that applies to everything after it, until the next marker or the end of the chunk.

SOTR_ATTRIBUTES(PRESET(SECURE), ENCRYPT)   -- opens: applies below
... code whose literals get encrypted and body flattened ...
SOTR_ATTRIBUTES(PRESET(DEFAULT))           -- resets to baseline
Region form only maps the range-relevant attributes, ENCRYPT (wraps the span's string/number literals) and PRESET (control-flow-flattens the span). Function-only attributes written in a region marker are ignored with a warning.

Attribute vocabulary

Any number of compatible attributes can stack in one SOTR_ATTRIBUTES call. Unknown or misused attributes are warned about and ignored, never silently mangled.

AttributeMeaning
INLINE / INLINE(false)Inline the function into its call sites. false marks it optional, meaning it may still escape inlining.
UNROLL / UNROLL(false)Unroll computable numeric for loops inside the function.
NO_UPVALUESWrap the function so it has zero upvalues, same guarantee as SOTR_NO_UPVALUES.
ENCRYPT / ENCRYPT(key, expr?)Encrypt the string and number literals in the body. key and expr are the same static/runtime key layers as SOTR_ENC_STR.
OPTIMIZE(0..2)Sets the optimization level applied to the function.
ERROR_HANDLING(bool)Enables or disables the per-function line-tracked error handler (on by default). At file scope, this toggles the whole-chunk custom-error handler.
VM(mode)DEFAULT keeps normal virtualization, NONE keeps it native (same as SOTR_EXPOSE), FAST keeps it native with a plain-dispatch flatten (same as SOTR_JIT), SWIFT keeps it native with a full-opacity flatten (same as SOTR_JIT_MAX).
PRESET(tier)Applies a bundled intensity tier to the function: FAST, DEFAULT/BALANCED, SECURE, or SECURE_MAX.
TRANSFORM(pass, …)Opts into additional AST passes for non-virtualized code, such as CONTROL_FLOW or REWRITE_NAMECALLS.
MacrosObfuscate API
SoteriaSoteria

Secure your Luau scripts and accelerate your developer experience.

Products

  • Oracle
  • Genesis

Tools

  • Script Library
  • DevEx Converter
  • FFlags Directory

Docs & Support

  • Documentation
  • Roblox Status
  • Error Codes
  • Runtimes

Company

  • About
  • Blog
  • Discord
  • Contact

Legal

  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Acceptable Use

© 2026 Soteria. All rights reserved.

SoteriaSoteria
Pricing
Get Started