Skip to main content
Obfuscations are provided by our official partner (wYnFuscate)
For the latest / full documentation, visit wYnFuscate Docs

wYnFuscate Macros

WYNF_OBFUSCATED
bool
A compile-time constant that evaluates to true in obfuscated builds.
In plain Lua (non-obfuscated), it behaves like a normal global (typically nil/false).

if WYNF_OBFUSCATED then
    -- This code only exists in obfuscated builds
    print("Running protected version")
else
    -- This branch is completely removed from obfuscated output
    print("Running development version")
end

WYNF_NO_VIRTUALIZE
function wrapper
Marks a function to run as native Lua instead of inside the VM
This bypasses VM overhead for performance-critical code like hot loops or heavy math/table/string operations.
Code in WYNF_NO_VIRTUALIZE is NOT protected through virtualization.

-- Math operations (OK - no sensitive data)
local fastMath = WYNF_NO_VIRTUALIZE(function(a, b)
    return math.sqrt(a * a + b * b)
end)

-- Table iteration (OK - pure computation)
local sumTable = WYNF_NO_VIRTUALIZE(function(tbl)
    local sum = 0
    for _, v in ipairs(tbl) do
        sum = sum + v
    end
    return sum
end)

-- String formatting (OK - no secrets)
local formatNumber = WYNF_NO_VIRTUALIZE(function(n)
    return string.format("%.2f", n)
end)

WYNF_JIT
function wrapper
Marks a function for Wynfuscate’s JIT-style micro-VM execution path.
The function remains virtualized (it still runs encrypted bytecode), but executes under a more performance-oriented interpreter template than the main VM loop.

local fast = WYNF_JIT(function(a, b)
    local sum = 0
    for i = 1, a do
        sum = sum + i * b
    end
    return sum
end)

print(fast(10, 3))

WYNF_CRASH
function call
Immediately and securely crashes the VM, corrupting the VM context to prevent recovery or analysis.
Use this as a last-resort defense when tampering or unauthorized access is detected.

-- Standalone call
WYNF_CRASH()

-- As a return statement
return WYNF_CRASH()

-- In a conditional
if tamperingDetected then
    WYNF_CRASH()
end

WYNF_IS_CALLER_WYNFUSCATE
function call
Returns true if the current function was called from within your obfuscated code Returns false if it was called from an external source like an exploit script.

-- Standalone call
WYNF_CRASH()

-- As a return statement
return WYNF_CRASH()

-- In a conditional
if tamperingDetected then
    WYNF_CRASH()
end

WYNF_ENC_STRING
string wrapper
Applies additional encryption layers to a string literal, providing extra protection for highly sensitive values like API keys, passwords, and encryption keys.

-- These strings get extra protection
local API_KEY = WYNF_ENC_STRING("sk-live-abc123xyz")
local DB_PASSWORD = WYNF_ENC_STRING("super_secret_db_pass")

-- Regular strings are still encrypted
local greeting = "Hello, World!"

print(API_KEY)      -- Extra encryption layers
print(greeting)     -- Standard encryption

WYNF_ENC_NUM
number wrapper
Protects a numeric literal by encoding it in an encrypted form, preventing magic numbers from being trivially found via memory scanning or static analysis.

-- These numbers get extra protection
local PRODUCT_ID = WYNF_ENC_NUM(829371)
local SALT = WYNF_ENC_NUM(1337)
local THRESHOLD = WYNF_ENC_NUM(9999)

print(PRODUCT_ID)   -- Encrypted, not trivially greppable

WYNF_LINE
function call
Expands to the current source line number at compile time. This provides a stable line marker for logs and error messages without relying on VM debug info, which is stripped during obfuscation.

-- Get current line number
local here = WYNF_LINE()

-- Use in error messages
error("unexpected state at line " .. WYNF_LINE())

-- Use in logging
print("[DEBUG] Checkpoint reached at line " .. WYNF_LINE())

WYNF_NO_UPVALUES
function wrapper
Creates a lightweight wrapper around your function for compatibility with certain environments or APIs that have issues with virtualized functions used as callbacks.

-- Wrap functions used as callbacks
local callback = WYNF_NO_UPVALUES(function(a, b)
    return a + b
end)

-- Pass to APIs that expect callbacks
someSignal:Connect(callback)
hookFunction(callback)

WYNF_SECURE_CALL
function wrapper
Marks a function as VM-only callable. Calls to this function will only succeed when they originate from inside your obfuscated code.

local internalDecoder = WYNF_SECURE_CALL(function(data)
    -- This function can only be called from your obfuscated code
    return decode(data)
end)

-- Works when called internally
local result = internalDecoder(someData)

-- If an attacker calls internalDecoder() from outside,
-- the call is rejected (fail-closed)

WYNF_SECURE_CALLBACK
function wrapper
Returns a wrapped callback that performs a caller gate before invoking your function. Intended for event handlers and callbacks that are called by external systems like Roblox signals, RemoteEvents, and UI events.

local function onEvent(player, payload)
    -- Your protected logic
    processData(player, payload)
end

-- Wrap the callback before connecting
RemoteEvent.OnServerEvent:Connect(WYNF_SECURE_CALLBACK(onEvent))

-- RemoteEvent (Server)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Remote = ReplicatedStorage:WaitForChild("MyRemote")

Remote.OnServerEvent:Connect(WYNF_SECURE_CALLBACK(function(player, action, payload)
    if action == "purchase" then
        -- handle purchase
    end
end))

-- UI Button (Client)
local button = script.Parent:WaitForChild("Button")
button.MouseButton1Click:Connect(WYNF_SECURE_CALLBACK(function()
    -- handle click
end))

Last Updated: 20 February 2026