SunLicenseSign in
For Garry's Mod addon developers

Your Garry's Mod addon, on the servers that paid.

Each buyer gets a key, checked server side with GMod's own HTTP.

Create free account

Free plan · No credit card · Set up in minutes

Coding with an AI agent? Paste one prompt
  • Lua
  • Garry's Mod
  • Tebex
  • Stripe
  • Gumroad
  • Payhip
  • Discord
What you get

Built for how you sell.

One Lua file

Async, server side, with GMod's own HTTP.

sunlicense.lua

Servers per license

One server or five, by id or IP.

TOO_MANY_IPS

Revoke or blacklist

A key, a server IP or a range.

Sell where you like

Tebex, Stripe, Gumroad, Payhip and more.

Buyer roles in Discord

Claim with the purchase email; revoke removes it.

Sentinel watches for sharing

Flags keys hopping from server to server.

Lite & Standard
How it works

Live before your next release.

  1. 1Create a free account
  2. 2Connect your store
  3. 3Check it on map load
lua/autorun/server/myaddon_license.lua
local SunLicense = include("myaddon/sunlicense.lua")
local licenseVar = CreateConVar("myaddon_license", "", FCVAR_ARCHIVE + FCVAR_PROTECTED)

hook.Add("InitPostEntity", "MyAddon.License", function()
    local client = SunLicense.new({ baseUrl = "https://api.sunlicense.com", token = MYADDON.ApiKey })
    client:validate(licenseVar:GetString(), { host = MYADDON.ServerId() }, function(ok, status, body)
        if ok then
            MsgC(Color(120, 210, 140), "[MyAddon] License valid, loading\n")
            MYADDON.Start()
        elseif status == 400 then
            MsgC(Color(255, 128, 128), "[MyAddon] License denied: ", body:match('"code":"([%w_]+)"') or "?", "\n")
        else
            MYADDON.Start() -- no answer is not a no: keep running
        end
    end)
end)
FAQ

Questions, answered.

How do I protect a paid Garry's Mod addon from leaks?

Addons ship as Lua, so anyone determined can read and edit a check, and no licensing service changes that. A key per buyer gives you control instead: you see which servers use each key, a shared or leaked key can be revoked or its servers blacklisted, and paying servers are never affected. Obfuscating the check makes removing it more work.

Does the Lua SDK work in Garry's Mod?

Yes. sunlicense.lua detects Garry's Mod and sends the check with GMod's HTTP function, asynchronously, so the server doesn't freeze. Run it server side only: the API key it uses can only validate licenses, but it has no business in files sent to players.

Which stores can issue keys automatically?

Tebex, Stripe, Gumroad, Payhip, Lemon Squeezy, Ko-fi, itch.io, WooCommerce and a few more connect directly, and most of them revoke the key on a refund. For anywhere else, issue keys from the dashboard, the sunlicense CLI or the API.

What does a buyer do when they move host?

They reset the old server's machine slot themselves with My licenses in your Discord, or in the customer portal (Lite and Standard), once a day by default. With an IP limit, an address that hasn't been used for 30 days frees its slot by itself, and you can free one any time on the license page.

Protect your next release.

  • Free plan
  • No credit card
  • Cancel any time