--// Load and Initialize Junkie SDK
local Junkie = loadstring(game:HttpGet("https://[Log in to view URL]"))()
Junkie.service = "NWR's Hub"
Junkie.identifier = "1009357"
Junkie.provider = "NWR's Hub"

--// Load Fluent UI
local Fluent = loadstring(game:HttpGet("https://[Log in to view URL]"))()

local Window = Fluent:CreateWindow({
    Title = "NWR's Hub",
    SubTitle = "Verification System",
    TabWidth = 160,
    Size = UDim2.fromOffset(450, 320),
    Acrylic = true,
    Theme = "Dark",
    MinimizeKey = Enum.KeyCode.LeftControl
})

local Tabs = {
    Main = Window:AddTab({ Title = "Verify", Icon = "shield-check" })
}

--// Variables & File Persistence
local currentKey = ""

local function saveVerifiedKey(key)
    if writefile then pcall(function() writefile("nwr_hub_key.txt", key) end) end
end

local function loadVerifiedKey()
    if isfile and isfile("nwr_hub_key.txt") then 
        local success, content = pcall(readfile, "nwr_hub_key.txt")
        return (success and content) or ""
    end
    return ""
end

currentKey = loadVerifiedKey()

--// UI Elements
local KeyInput = Tabs.Main:AddInput("KeyInput", {
    Title = "Enter License Key",
    Default = currentKey,
    Placeholder = "Paste key here...",
    Numeric = false,
    Finished = false,
    Callback = function(Value)
        currentKey = Value
    end
})

local VerifyButton = Tabs.Main:AddButton({
    Title = "Verify Key",
    Description = "Validate your license for NWR's Hub",
    Callback = function()
        local key = currentKey:gsub("%s+", "")
        
        if key == "" then
            return Fluent:Notify({ Title = "Error", Content = "Please enter a key!", Duration = 3 })
        end

        Fluent:Notify({ Title = "System", Content = "Verifying with server...", Duration = 2 })
        
        -- Verification Logic
        local success, result = pcall(function()
            return Junkie.check_key(key)
        end)
        
        if success and result and result.valid then
            saveVerifiedKey(key)
            Fluent:Notify({ Title = "Success", Content = "Key verified!", Duration = 1.5 })
            
            task.wait(1.5)
            getgenv().SCRIPT_KEY = key
            Window:Destroy()
        else
            local errorMsg = (result and result.message) or "Invalid key or server error."
            Fluent:Notify({ 
                Title = "Verification Failed", 
                Content = errorMsg, 
                Duration = 5 
            })
        end
    end
})

Tabs.Main:AddButton({
    Title = "Get Key Link",
    Description = "Join the Discord to get your key",
    Callback = function()
        local link = "https://[Log in to view URL]"
        if setclipboard then
            setclipboard(link)
            Fluent:Notify({ Title = "Success", Content = "Discord link copied to clipboard!", Duration = 3 })
        else
            Fluent:Notify({ Title = "Link", Content = link, Duration = 10 })
        end
    end
})

--// Auto-Verification Logic
local function Initialize()
    local autoKey = (currentKey ~= "" and currentKey) or getgenv().SCRIPT_KEY
    
    if autoKey and autoKey ~= "" then
        Fluent:Notify({ Title = "System", Content = "Checking saved verification...", Duration = 2 })
        
        local success, result = pcall(function()
            return Junkie.check_key(autoKey)
        end)

        if success and result and result.valid then
            getgenv().SCRIPT_KEY = autoKey
            
            local msg = (result.message == "KEYLESS") and "Keyless Mode ✓" or "Welcome back! ✓"
            Fluent:Notify({ Title = "Success", Content = msg, Duration = 1.5 })
            
            task.wait(1)
            Window:Destroy()
        else
            -- If key is bad, clear it so user isn't prompted with a broken key next time
            if isfile and isfile("nwr_hub_key.txt") then pcall(delfile, "nwr_hub_key.txt") end
        end
    end
end

-- Run initialization on a separate thread
task.spawn(Initialize)

Embed on website

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