Inline UI

Upload your own obfuscated UI code to the dashboard UI-Source field. This gives you full control over the user interface while maintaining security.

1

Create Your UI Code

Build your key validation UI using the Junkie UI-Library:

-- This loads the Junkie-Library
local Junkie = loadstring(game:HttpGet("https://jnkie.com/sdk/library.lua"))()
Junkie.service = "YOUR_SERVICE"  -- Your service name from dashboard
Junkie.identifier = "12345"  -- Your user ID from dashboard
Junkie.provider = "Mixed"  -- Your provider name

local result = (function()
    getgenv().SCRIPT_KEY = nil
    getgenv().UI_CLOSED = false
    
    -- Your custom UI code here
    while not getgenv().SCRIPT_KEY and not getgenv().UI_CLOSED do
        task.wait(0.1)
        
        -- Check if user submitted a key
        local userKey = getUserInputSomehow()  -- Your UI logic
        
        if userKey then
            local validation = Junkie.check_key(userKey)
            if validation.valid then
                getgenv().SCRIPT_KEY = userKey
                print("Key validated!")
                break
            else
                warn("Error: " .. (validation.message or "Invalid key"))
            end
        end
    end
    
    return getgenv().SCRIPT_KEY
end)()

if not result then
    return -- User closed UI without valid key
end

-- -> Junkie Loadstring here
2

Obfuscate Your Code

Before uploading, you SHOULD obfuscate your UI code:

Recommended Free Obfuscator

Prometheus Obfuscator - Free, powerful, and easy to use

  1. Copy your unobfuscated UI code

  2. Paste into Prometheus Obfuscator

  3. Click "Obfuscate"

  4. Copy the obfuscated result

3

Upload to Dashboard

Upload your obfuscated UI code to the dashboard:

  1. Go to Dashboard → Lua Scripts

  2. Create new script or edit existing

  3. Find the UI-Source field (above Original Code)

  4. Paste your obfuscated UI code

  5. In Original Code field, put your main script

  6. Click Save

4

Response Cases for check_key()

The function returns different responses based on validation:

5

Response Cases for get_key_link()

Function returns two values: link and error message.

6

Complete Example with Error Handling

local Junkie = loadstring(game:HttpGet("https://jnkie.com/sdk/library.lua"))()
Junkie.service = "Premium Hub"
Junkie.identifier = "12345"
Junkie.provider = "Mixed"

local result = (function()
    getgenv().SCRIPT_KEY = nil
    getgenv().UI_CLOSED = false
    
    local maxAttempts = 5
    local attempts = 0
    
    while not getgenv().SCRIPT_KEY and not getgenv().UI_CLOSED do
        task.wait(0.1)
        
        -- Get user input (replace with your UI logic)
        local userInput = yourUIGetInput()
        
        if userInput == "GET_LINK" then
            local link = Junkie.get_key_link()
            if link then
                yourUIShowLink(link)  -- Display link to user
            else
                yourUIShowError("Rate limited! Wait 5 minutes")
            end
        elseif userInput and #userInput > 0 then
            attempts = attempts + 1
            
            if attempts > maxAttempts then
                yourUIShowError("Too many failed attempts!")
                getgenv().UI_CLOSED = true
                break
            end
            
            local validation = Junkie.check_key(userInput)
            
            if validation.success then
                getgenv().SCRIPT_KEY = userInput
                yourUIShowSuccess("Key validated!")
                break
            else
                local errorMsg = validation.error or "Unknown error"
                yourUIShowError(errorMsg)
                
                -- Handle all possible backend error messages
                if errorMsg == "KEY_INVALID" then
                    yourUIShowInfo("Key not found in system")
                elseif errorMsg == "KEY_EXPIRED" then
                    yourUIShowInfo("Key expired - get a new one")
                elseif errorMsg == "HWID_BANNED" then
                    game.Players.LocalPlayer:Kick("Hardware banned")
                    return nil
                elseif errorMsg == "KEY_INVALIDATED" then
                    yourUIShowInfo("Key was manually disabled")
                elseif errorMsg == "ALREADY_USED" then
                    yourUIShowInfo("One-time key already used")
                elseif errorMsg == "HWID_MISMATCH" then
                    yourUIShowInfo("HWID limit reached")
                elseif errorMsg == "SERVICE_NOT_FOUND" then
                    yourUIShowInfo("Service doesn't exist")
                elseif errorMsg == "SERVICE_MISMATCH" then
                    yourUIShowInfo("Key is for a different service")
                elseif errorMsg == "PREMIUM_REQUIRED" then
                    yourUIShowInfo("Premium key required for this service")
                elseif errorMsg == "ERROR" then
                    yourUIShowError("Network error - try again")
                elseif errorMsg:match("^http %d+") then
                    yourUIShowError("Server error: " .. errorMsg)
                end
            end
        end
    end
    
    return getgenv().SCRIPT_KEY
end)()

if not result then
    warn("UI closed without valid key")
    return
end

Last updated