How licensing works
Every product you list gets a Product ID. Every sale generates a unique License Key for that buyer. The script you're selling checks both against our server before it runs — so a copy that gets passed around without a valid key just refuses to execute.
1. Open a store and add a product
From your dashboard, create a store, then add a product with a title, price, and optionally a .rbxl file for buyers to download. You'll get a Product ID for it right away.
2. Wrap your script with the loader below
Paste this at the top of the script you're selling, put your Product ID in, and put everything you're protecting below the marked line. Leave LICENSE_KEY as a placeholder — buyers fill in their own after purchase.
local HttpService = game:GetService("HttpService")
-- Fill these in: the Product ID shown on your dashboard,
-- and the License Key the buyer was given after purchase.
local PRODUCT_ID = "PASTE_PRODUCT_ID_HERE"
local LICENSE_KEY = "PASTE_LICENSE_KEY_HERE"
local function verifyLicense()
local success, response = pcall(function()
return HttpService:PostAsync(
"https://hubs.unirest.site/api/license/verify",
HttpService:JSONEncode({ productId = PRODUCT_ID, key = LICENSE_KEY }),
Enum.HttpContentType.ApplicationJson
)
end)
if not success then
warn("License check failed: could not reach the server.")
return false
end
local ok, data = pcall(HttpService.JSONDecode, HttpService, response)
return ok and data.valid == true
end
if not verifyLicense() then
error("Invalid or missing license key for this script.")
end
-- ====== YOUR PROTECTED CODE GOES BELOW THIS LINE ======
-- ====== END PROTECTED CODE ======
3. Buyers get a key automatically
When someone buys a license, we generate a key tied to that Product ID and their account. It shows up on their My licenses page along with the .rbxl download, if you provided one. They paste the key into the LICENSE_KEY line and they're set.
What this is for
This system is meant for selling game systems, modules, and templates that buyers run inside their own games — the same way you'd sell any other piece of code. It checks a key against a product, nothing more; it isn't a way to run code in games you don't have permission to modify, and it shouldn't be used to distribute anything that runs outside Roblox Studio or that interferes with other people's experiences.