External Loader

Host your UI loader externally (GitHub, Pastebin, etc.) and have it load the Junkie script using getgenv().SCRIPT_KEY. This allows independent UI updates without touching the dashboard.

Concept: Your external loader validates the key using Junkie UI-Library, then loads the actual script from Junkie CDN using the validated key in getgenv().SCRIPT_KEY


1

Create External Loader

Build a loader script and host it on GitHub, Pastebin, or your own server:

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

-- UI Implementation
local validatedKey = nil

-- Show custom UI 
local function showUI()
    local link = Junkie.get_key_link()
    if link then
        setclipboard(link)  -- Copy to clipboard
        print("Link copied to clipboard!")
    else
        warn("Wait 5 minutes")
        return nil
    end
    
    -- Wait for user to input key (your UI logic here)
    local userKey = promptUserForKey()  -- Replace with your UI input
    
    if userKey then
        local validation = Junkie.check_key(userKey)
        if validation.success then
            return userKey
        else
            warn("Error: " .. (validation.error or "Invalid key"))
            return nil
        end
    end
end

validatedKey = showUI()

if not validatedKey then
    warn("No valid key provided")
    return
end

-- Store key globally for Junkie script to use
getgenv().SCRIPT_KEY = validatedKey

-- Now load the actual Junkie script
loadstring(game:HttpGet("https:/api.jnkie.com/api/v1/luascripts/..."))()
2

User Workflow

How users will execute your script:

User loads external loader:
loadstring(game:HttpGet("https://your-loader-url.com/loader.lua"))()
Loader shows UI and validates key using Junkie.check_key()
Loader stores key in getgenv().SCRIPT_KEY
Loader loads Junkie script which reads the key from getgenv()
Main script runs with validated key
3

Complete Production Example

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

local maxAttempts = 5
local attempts = 0
local validated = false

while not validated and attempts < maxAttempts do
    local link = Junkie.get_key_link()
    if link then
        if setclipboard then
            setclipboard(link)
        end
    else
        warn("Please wait 5 minutes")
    end
    
    -- Get user input (replace with your UI)
    print("\nEnter your key:")
    local userKey = getUserInput()  -- Your UI logic
    
    if userKey and #userKey > 0 then
        attempts = attempts + 1
        
        local validation = Junkie.check_key(userKey)
        if validation.valid then
            validated = true
            getgenv().SCRIPT_KEY = userKey
            print("\nKey validated successfully!")
            break
        else
            local errorMsg = validation.message or "Unknown error"
            warn("[ERROR] " .. errorMsg)
            
            -- Handle specific backend error messages
            if errorMsg == "KEY_EXPIRED" then
                print("[INFO] Key expired - get a new one")
            elseif errorMsg == "HWID_BANNED" then
                game.Players.LocalPlayer:Kick("Hardware banned")
                return
            elseif errorMsg == "SERVICE_MISMATCH" then
                print("[INFO] Key is for a different service")
            elseif errorMsg == "HWID_MISMATCH" then
                print("[INFO] HWID limit reached")
            end
        end
    else
        warn("Error: No key entered")
    end
    
    if attempts >= maxAttempts then
        warn("Error: Too many failed attempts!")
        return
    end
    
    task.wait(1)
end

if not validated then
    warn("Error: Validation failed")
    return
end

-- Load main script
loadstring(game:HttpGet("https://api.jnkie.com/api/v1/luascripts/.../download"))()

Last updated