Add creator codes to your game
Players enter a creator's code. For 7 days that creator earns a share of what the player buys in your game. You pay creators once a month from your Roblox group, CreatorCodeHub does the bookkeeping. Your first test takes 2 minutes and needs no account.
Download module (.rbxmx) Sign in with Roblox
How it works
- Creators sign up once and get one code that works in every participating game.
- A player enters the code in your game. The module checks it with CreatorCodeHub and binds the player to that creator for 7 days (one code per player at a time).
- Dev product and game pass purchases of bound players are reported. You choose the creator share (5–50% of your net Robux).
- At the start of each month your console lists what each creator earned. You send the Robux as a group payout and mark it as paid.
Quick start (3 steps, no account)
- Download the module (.rbxmx). In Studio, right-click ServerScriptService → Insert from File… and choose it.
- Press Play.
- Click Codes and enter
TESTCODE. You see “Active: TESTCODE (7 days)”.
That is the test mode: it runs offline, needs no account and no setting, and nothing leaves your game. No “Insert from File…” in your Studio? Drag the file into the 3D view and move the CreatorCodeHub folder into ServerScriptService.
Put the code field into your own UI
Nobody has to use our button. In your own UI, for example your shop, name the elements and the module wires them. You write no code.
- TextBox
CreatorCodeBoxfor the code (required). - Button
CreatorCodeButton(optional, pressing Enter in the box sends, too). - TextLabel
CreatorCodeStatus(optional): shows the answer and the active code. Without it the answer appears in the box for a moment.
Design them any way you like, anywhere in the same ScreenGui. The floating Codes button then hides itself. No time to design? Add an empty Frame named CreatorCodeField where the field should be (about 70 px high) and the module fills it with a ready-made field. Test it with Play and TESTCODE.
Connect your game (real creator codes)
- Connect your game in the portal (sign in). Paste the game link; if the game belongs to you or to a group you own, ownership is verified automatically.
- In your game console, click Download personal module. The file already contains the portal address, your game and a test key.
- Insert it like in the quick start (it replaces the test module). HTTP requests must be allowed (Game Settings → Security → Allow HTTP Requests).
- Press Play, click Codes, enter
TESTCODEand buy any dev product or game pass. Your console shows the check-in, the redemption and the purchase.
You don't type any key and don't write any code.
More ways to use your own UI (with a little code)
Naming the elements is the easiest way. If you prefer code, pick the way that fits your game:
Standard
Do nothing. The floating Codes button and the window are built in.
Your own button, our window
Set Config.ShowButton = false to hide only the floating button, then open the built-in window from your own one:
-- Config: Config.ShowButton = false
-- LocalScript next to your own button:
local CCH = require(game.ReplicatedStorage:WaitForChild("CreatorCodeHub"):WaitForChild("Client"))
button.Activated:Connect(function()
CCH.Open()
end) Completely your own code
Wire your own elements by hand with CCH.Bind(textBox, button, statusLabel) (button and status label may be nil), or set Config.ShowDefaultUI = false to turn button and window off and build everything yourself:
-- Config: Config.ShowDefaultUI = false
local CCH = require(game.ReplicatedStorage:WaitForChild("CreatorCodeHub"):WaitForChild("Client"))
submit.Activated:Connect(function()
local ok, message = CCH.Redeem(textBox.Text) -- waits for the answer, never throws
status.Text = message
status.TextColor3 = ok and Color3.fromRGB(91, 227, 163) or Color3.fromRGB(255, 141, 141)
end)
local function refresh()
local code = CCH.GetActiveCode() -- "NOVA" or nil
active.Text = code and ("%s (%d days left)"):format(code, CCH.GetRemainingDays()) or ""
end
refresh()
CCH.Changed:Connect(refresh) -- fires when the active code or the days change The Client module offers:
CCH.Bind(box, button, status)wires a TextBox, a button and an optional TextLabel to the creator code (what naming the elements does for you).CCH.Open()opens the built-in window (withShowDefaultUI = falseit does nothing and warns once).CCH.Redeem(code)returnsok, messagefor a creator code. Failures and timeouts (20 s) come back asfalse, text.CCH.RedeemPromo(code)does the same for free promo codes (Config.ShowPromoCodes = true).CCH.GetActiveCode()is the active creator code of the local player ornil,CCH.GetRemainingDays()the days left (0without a code).CCH.Changedis an event(code, days)that fires when the active code or the days change.
The messages follow Config.Language and Config.Texts. Rewards work exactly as with the built-in window.
For server code
These stay available in every setup. The Player also carries the attributes CreatorCode and CreatorCodeDays.
-- In a server Script:
local CreatorCodeHub = require(game.ServerScriptService.CreatorCodeHub.Service)
local ok, message = CreatorCodeHub.Redeem(player, codeTheyTyped)
local active = CreatorCodeHub.GetActiveCode(player) -- "NOVA" or nil
CreatorCodeHub.PromptCodeEntry(player) -- opens the built-in window on that player's screen
CreatorCodeHub.CodeActivated.Event:Connect(function(player, code) end)
-- The Player also carries the attributes CreatorCode and CreatorCodeDays. Purchases are tracked automatically
Game passes are reported after Roblox confirms the player owns the pass. Dev products are reported when Roblox reports a completed purchase on the server. Both can't be faked by players.
New products show up under Products in your console as “pending”. Approve them with their list price; only approved products earn creators a share. This protects you against manipulated prices.
Want exact receipt data? Set Config.DevProducts = "receipt" and install your ProcessReceipt through the module:
local CreatorCodeHub = require(game.ServerScriptService.CreatorCodeHub.Service)
CreatorCodeHub.WrapProcessReceipt(function(receiptInfo)
-- your existing ProcessReceipt logic: give the item, save, ...
return Enum.ProductPurchaseDecision.PurchaseGranted
end) If another system owns ProcessReceipt, call ReportReceipt yourself, right before you grant:
-- inside your own ProcessReceipt, right before you grant:
CreatorCodeHub.ReportReceipt(receiptInfo)
return Enum.ProductPurchaseDecision.PurchaseGranted Go live
- In the console, create the live key and copy it.
- Creator Dashboard → your experience → Secrets → new secret named
CreatorCodeHub, value = live key, domain =creatorcodehub.com. - Set your creator share, who may promote (open, on request, closed) and your payout group, then switch the game live in the console and publish. From that moment real purchases count; everything before stays test data.
Reward players (optional, recommended)
A small reward for entering a code gives creators something to talk about. It is given at most once per 7-day binding:
-- Optional: only try (and only touch your DataStore) when the reward can be given right now
Config.CreatorCodeRewardReady = function(player, code)
return player:FindFirstChild("leaderstats") ~= nil
end
Config.CreatorCodeReward = function(player, code)
local coins = player:FindFirstChild("leaderstats") and player.leaderstats:FindFirstChild("Coins")
if not coins then return false, "Your coins arrive in a moment." end
coins.Value += 500
return true, "+500 coins"
end
Return false, "reason" if the reward cannot be given yet. The player sees the reason ("Active! Your coins arrive in a moment.", shortened to 120 characters), so keep it friendly.
The module retries after 10, 20 and 40 seconds, then every 60 seconds while the player is online.
CreatorCodeRewardReady is optional. Without it, every attempt marks the reward as given in your DataStore first and rolls that back on false.
With it, an attempt that is not ready costs no DataStore write at all. It may also return a reason as second value (return false, "text").
Payouts
- Your console lists each creator's open balance per month. Amounts are computed from approved purchases; you never type an amount.
- You pay from the payout group you set (Roblox group payouts). The group needs funds, ideally it owns the game.
- Roblox only pays group members, and new members may have to wait before they can receive payouts. The console shows who has joined.
- Balances below your minimum payout carry over and never expire. Creators who leave still get their rest balance.
Privacy
The module sends the creator code, a random player reference (a GUID stored in your own DataStore), timestamps and product id, name and price. It never sends Roblox user ids, names or other player data, and the same player has a different reference in every game. This follows the Roblox rule not to share players' identifying information with third parties.
If CreatorCodeHub is down
Your game keeps working. Every web call is wrapped in pcall; events wait in a queue, at shutdown in your DataStore, and are sent later.
HTTP API (for custom integrations)
All calls: Authorization: Bearer <key> and X-Game-Key: <game key>, JSON.
GET /api/v2/program– your settings and whether the key is live or sandbox.POST /api/v2/resolve{ code }– is this creator code valid in your game?POST /api/v2/events{ sentAt, redemptions: [{ id, ref, code, at }], purchases: [{ id, ref, code, type, productId, productName, robux, at }] }POST /api/v2/promo/redeem//api/v2/promo/release{ sentAt, code, ref }– free promo codes.