Documentation

← Panda Auth

For Developers · Libraries

Legacy v2.5

The original Roblox Lua library. Kept for scripts already built on the old API.

Quick start: the library

Paste this into your script and set Client_ServiceID to your service ID:

--[[
    Panda Key System - Legacy Roblox Client
    https://pandauth.com (formerly https://pandadevelopment.net)
]]

local BaseURL = "https://api.pandauth.com/api/v1"
local Client_ServiceID = "YOUR_SERVICE_ID"

-- Get Hardware ID
local function getHardwareId()
    local success, hwid = pcall(gethwid)
    if success and hwid then
        return hwid
    end

    -- Fallback to analytics client ID
    local RbxAnalyticsService = game:GetService("RbxAnalyticsService")
    local clientId = tostring(RbxAnalyticsService:GetClientId())
    return clientId:gsub("-", "")
end

-- HTTP Request wrapper
local function makeRequest(endpoint, body)
    local HttpService = game:GetService("HttpService")

    local url = BaseURL .. endpoint
    local jsonBody = HttpService:JSONEncode(body)

    local response = request({
        Url = url,
        Method = "POST",
        Headers = {
            ["Content-Type"] = "application/json"
        },
        Body = jsonBody
    })

    if response and response.Body then
        return HttpService:JSONDecode(response.Body)
    end

    return nil
end

--[[
    Get Key URL - Opens the key system page
    @return string - The URL to get a key
]]
function GetKeyURL()
    local hwid = getHardwareId()
    return "https://ads.pandauth.com/getkey/" .. Client_ServiceID .. "?hwid=" .. hwid
end

--[[
    Open Get Key page in browser
]]
function OpenGetKey()
    local url = GetKeyURL()
    if setclipboard then
        setclipboard(url)
        print("Key URL copied to clipboard: " .. url)
    end
    return url
end

--[[
    Validate a key
    @param key string - The license key to validate
    @param Premium_Verification boolean (optional) - If true, requires the key to be premium
    @return table - { success: boolean, message: string, isPremium: boolean, expireDate: string|nil }
]]
function Validate(key, Premium_Verification)
    local hwid = getHardwareId()

    local result = makeRequest("/keys/validate", {
        ServiceID = Client_ServiceID,
        HWID = hwid,
        Key = key
    })

    if not result then
        return {
            success = false,
            message = "Failed to connect to server",
            isPremium = false,
            expireDate = nil
        }
    end

    local isAuthenticated = result.Authenticated_Status == "Success"
    local isPremium = result.Key_Premium or false

    -- If Premium_Verification is enabled, require both authentication AND premium status
    local isValid = isAuthenticated
    local message = result.Note or (isAuthenticated and "Key validated!" or "Invalid key")

    if Premium_Verification and isAuthenticated and not isPremium then
        isValid = false
        message = "Premium key required"
    end

    return {
        success = isValid,
        message = message,
        isPremium = isPremium,
        expireDate = result.Expire_Date
    }
end

Functions

  • GetKeyURL() — returns the GetKey URL with the HWID prefilled.
  • OpenGetKey() — copies the GetKey URL to the clipboard and returns it.
  • Validate(key, Premium_Verification) — validates a key. Returns a table with success, message, isPremium, and expireDate. Pass true as the second argument to require a premium key.

Usage:

-- Get the key URL (copies to clipboard)
local keyUrl = OpenGetKey()
print("Get your key at: " .. keyUrl)

-- Validate a key (any valid key works)
local result = Validate("PANDA-XXXX-XXXX-XXXX-XXXX")

if result.success then
    print("Key validated!")
    print("Premium:", result.isPremium)
    print("Expires:", result.expireDate or "Never")

    -- Your script code here
else
    print("Validation failed:", result.message)
    game.Players.LocalPlayer:Kick("Invalid Key")
end

-- Premium-Only Validation (requires premium key)
local premiumResult = Validate("PANDA-XXXX-XXXX-XXXX-XXXX", true)

if premiumResult.success then
    print("Premium features unlocked!")
    -- Premium-only features here
else
    print("Premium required:", premiumResult.message)
    -- Will show "Premium key required" if key is valid but not premium
end

API responses

The validate endpoint returns one of these shapes:

Success:

{
    "Authenticated_Status": "Success",
    "Note": "Key validated successfully",
    "Expire_Date": "2024-12-31T23:59:59.000Z",
    "Key_Premium": true
}

Failure:

{
    "Authenticated_Status": "Failed",
    "Note": "Invalid key",
    "Expire_Date": null,
    "Key_Premium": false
}

Prefer a newer library

For new projects, use PUSL-V4 or V3. They add encryption, live sessions, and VSS injection that the legacy library doesn't have.