print("--//Made with Zfuscator Pro\\--")

-- Define the Ultimate Obfuscator Function
function obfuscate(script)
    -- Helper Functions
    local function generateRandomName()
        return "var" .. math.random(1000000000, 9999999999)
    end

    local function generateRandomString(length)
        local chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
        local str = ''
        for i = 1, length do
            local rand = math.random(1, #chars)
            str = str .. chars:sub(rand, rand)
        end
        return str
    end

    local function xorEncryptDecrypt(str, key)
        local encrypted = {}
        for i = 1, #str do
            local c = str:sub(i, i)
            local enc = string.char(string.byte(c) ~ key)
            table.insert(encrypted, enc)
        end
        return table.concat(encrypted)
    end

    local function encryptString(str, key1, key2, key3)
        local encrypted1 = xorEncryptDecrypt(str, key1)
        local encrypted2 = xorEncryptDecrypt(encrypted1, key2)
        local encrypted3 = xorEncryptDecrypt(encrypted2, key3)
        return encrypted3, key1, key2, key3
    end

    local function decryptString(str, key1, key2, key3)
        local decrypted1 = xorEncryptDecrypt(str, key3)
        local decrypted2 = xorEncryptDecrypt(decrypted1, key2)
        local decrypted3 = xorEncryptDecrypt(decrypted2, key1)
        return decrypted3
    end

    local function generateComplexCode()
        local code = {}
        table.insert(code, "local function complexFunction()")
        table.insert(code, "local a = math.random(1, 100)")
        table.insert(code, "local b = math.random(1, 100)")
        table.insert(code, "local result = a * b")
        table.insert(code, "if result % 2 == 0 then")
        table.insert(code, "    print('Even result:', result)")
        table.insert(code, "else")
        table.insert(code, "    print('Odd result:', result)")
        table.insert(code, "end")
        table.insert(code, "end")
        table.insert(code, "complexFunction()")
        return table.concat(code, "\n")
    end

    local function generateSelfDecryptAndExecute()
        local key1 = math.random(1, 255)
        local key2 = math.random(1, 255)
        local key3 = math.random(1, 255)
        local encryptedCode = encryptString(generateComplexCode(), key1, key2, key3)
        return [[
            local function xorEncryptDecrypt(str, key)
                local encrypted = {}
                for i = 1, #str do
                    local c = str:sub(i, i)
                    local enc = string.char(string.byte(c) ~ key)
                    table.insert(encrypted, enc)
                end
                return table.concat(encrypted)
            end

            local function decryptString(str, key1, key2, key3)
                local decrypted1 = xorEncryptDecrypt(str, key3)
                local decrypted2 = xorEncryptDecrypt(decrypted1, key2)
                local decrypted3 = xorEncryptDecrypt(decrypted2, key1)
                return decrypted3
            end

            local function selfDecrypt()
                local encryptedCode = "]] .. encryptedCode .. [["
                local decryptedCode = decryptString(encryptedCode, ]] .. key1 .. [[, ]] .. key2 .. [[, ]] .. key3 .. [[)
                loadstring(decryptedCode)()
            end

            selfDecrypt()
        ]]
    end

    local function advancedAntiTamper()
        return [[
            local function antiTamper()
                if not pcall(function() return debug.getinfo(2, "S") end) then
                    error("Tampering detected! Script integrity compromised.")
                end
            end

            local function antiDebug()
                if debug.getinfo(1) then
                    local startTime = os.time()
                    while os.time() - startTime < 5 do end
                end
            end

            antiTamper()
            antiDebug()
        ]]
    end

    local function generateRandomizedExecution()
        local steps = {}
        for i = 1, 60 do
            local stepCode = "print('Executing step " .. i .. "')"
            table.insert(steps, stepCode)
        end
        return "local function executeRandomly() " .. table.concat(steps, " ") .. " end executeRandomly()"
    end

    -- Combine All Parts with Enhanced Complexity
    local obfuscatedScript = advancedAntiTamper() .. generateSelfDecryptAndExecute() .. generateRandomizedExecution()

    -- Additional Obfuscation Layers (120 times)
    for i = 1, 120 do
        obfuscatedScript = [[
            local function layer]] .. i .. [[()
                -- Additional obfuscation layer ]] .. i .. [[
                local function innerLayer]] .. i .. [[()
                    ]] .. obfuscatedScript .. [[
                end
                innerLayer]] .. i .. [[()
            end
            layer]] .. i .. [[()
        ]]
    end

    -- Code Mutation
    local mutationCount = 10
    for i = 1, mutationCount do
        local mutationCode = generateRandomString(10) .. " = function() end"
        obfuscatedScript = [[
            local function mutation]] .. i .. [[()
                -- Mutation layer ]] .. i .. [[
                ]] .. mutationCode .. [[
            end
            mutation]] .. i .. [[()
            ]] .. obfuscatedScript .. [[
        ]]
    end

    -- Whitespace Removal & Code Flattening
    obfuscatedScript = obfuscatedScript:gsub("%s+", "") -- Remove whitespace and newlines
    obfuscatedScript = obfuscatedScript:gsub("\n", "") -- Remove newlines
    obfuscatedScript = obfuscatedScript:gsub("endend", "end") -- Flatten end statements

    return obfuscatedScript
end

-- Your Lua script to be obfuscated
local myScript = [[
    Script here! 
]]

-- Obfuscate the Script
local obfuscatedScript = obfuscate(myScript)

-- Print the Obfuscated Script (for debugging or review)
print(obfuscatedScript)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: