Skip to main content
skill CX Codex

roblox-monetization · el4cteo — Claude Code skill for Roblox purchases

This Claude Code skill covers Roblox monetization and purchase troubleshooting. It activates for work on shops, passes, subscriptions, rewarded ads, or paid random items.

MIT 1,200 installs ★ 131 updated 2026-11-03

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add EL4CTEO/roblox-skills --skill roblox-monetization -a claude-code
Open on GitHub

What roblox-monetization does

The skill explains server-side handling for Roblox purchases, including developer products, passes, subscriptions, rewarded video ads, and private servers. It covers granting items through MarketplaceService.ProcessReceipt and checking ownership or subscription status.

Receipt handling must be idempotent: save each PurchaseId so a retry cannot grant the same item twice. Return PurchaseGranted only after the purchase is persisted; if player data is still loading or saving fails, return NotProcessedYet. Client purchase events cannot be trusted to grant items; the server handles the grant.

What it helps with

  • grant a developer product after its receipt arrives
  • prevent duplicate rewards when Roblox retries a receipt
  • check game pass ownership when a player joins
  • remove perks after a subscription ends
  • display current prices with regional pricing

Example prompts for the agent

  • Set up server-side purchase handling with MarketplaceService.ProcessReceipt.
  • Find why a retried receipt grants the product twice.
  • Add a game pass check and apply the VIP perk when a player joins.

How to install roblox-monetization

1Skills CLI (Vercel)

npx skills add EL4CTEO/roblox-skills --skill roblox-monetization -a claude-code

2Manually: put the files in place

~/.claude/skills/roblox-monetization/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/roblox-monetization/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about roblox-monetization

How do I install roblox-monetization in Claude Code?

Run npx skills add EL4CTEO/roblox-skills --skill roblox-monetization -a claude-code. The skill is installed at ~/.claude/skills/roblox-monetization/SKILL.md.

What does roblox-monetization do?

It helps implement Roblox purchase flows and troubleshoot issues with receipts, passes, subscriptions, and shops. Its guidance includes preventing duplicate grants when Roblox retries a receipt.

Why should receipt handling check PurchaseId?

Roblox may resend a receipt while a player's data is unavailable. Recording the PurchaseId lets the handler recognize an earlier grant and avoid granting the item again.

Source text

SKILL.md · MIT
---
name: roblox-monetization
description: Robux monetization - developer products with idempotent ProcessReceipt, passes, subscriptions, rewarded video ads, personalized shops, regional pricing and trade arbitrage, paid random item policy (PolicyService), commerce products, private servers, Roblox Plus, refunds, age checks and the US 18+ rate. Use when adding purchases, shops, game passes, subscriptions, ads, or loot boxes, or debugging lost/duplicated purchases.
---

# Roblox monetization

## Product types

| Type | Buy | Use for | Grant via |
| --- | --- | --- | --- |
| Developer product | Repeatedly | Currency, consumables, boosts, revives | `MarketplaceService.ProcessReceipt` (server) |
| Pass | Once, permanent | VIP, permanent perks, extra slots | `UserOwnsGamePassAsync` check on join + purchase-finished event |
| Subscription | Monthly, revocable | Recurring perks (daily currency, VIP) | `GetUserSubscriptionStatusAsync` + `UserSubscriptionStatusChanged` |
| Rewarded video ad | Free (watch ad) | Small rewards (≈3–10 Robux value) | Developer product granted through `ProcessReceipt` |
| Commerce product | Real money (physical goods) | Merch with bundled digital benefits | `CommerceService`; digital benefits via `ProcessReceipt` |
| Private server | Monthly | Paid private servers | Configured in Creator Dashboard |

All granting happens on the **server**. Never grant from client events like
`PromptProductPurchaseFinished` — clients can fake them.

## Developer products: ProcessReceipt

Rules:
- Exactly **one** server script sets `MarketplaceService.ProcessReceipt`.
- Return `PurchaseGranted` only after the grant is **persisted**. Otherwise return `NotProcessedYet`;
  Roblox retries later (including on the player's next join) with the same `PurchaseId`.
- Handlers must be **idempotent**: record handled `PurchaseId`s in the player's saved data so a retry
  never grants twice.
- Receipts arrive for players who may not be loaded yet or may have left: wait for their data, or
  return `NotProcessedYet`.

```luau
--!strict
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")

type PlayerData = { coins: number, purchaseIds: { string } }
type ReceiptInfo = {
	PlayerId: number,
	ProductId: number,
	PurchaseId: string,
	CurrencySpent: number,
	CurrencyType: Enum.CurrencyType,
	PlaceIdWherePurchased: number,
}

local MAX_REMEMBERED_PURCHASES = 100

-- Provided by your data layer (ProfileStore profile.Data, etc.).
local function getLoadedData(_player: Player): PlayerData?
	return nil
end
local function saveNow(_player: Player): boolean
	return true
end

local PRODUCTS: { [number]: (Player, PlayerData) -> () } = {
	[1234567] = function(_player, data) -- 100 coins
		data.coins += 100
	end,
}

local function processReceipt(receipt: ReceiptInfo): Enum.ProductPurchaseDecision
	local player = Players:GetPlayerByUserId(receipt.PlayerId)
	if not player then
		return Enum.ProductPurchaseDecision.NotProcessedYet -- granted on their next visit
	end

	local data = getLoadedData(player)
	local deadline = os.clock() + 20
	while not data and player.Parent == Players and os.clock() < deadline do
		task.wait(0.5)
		data = getLoadedData(player)
	end
	if not data then
		return Enum.ProductPurchaseDecision.NotProcessedYet
	end

	if table.find(data.purchaseIds, receipt.PurchaseId) then
		return Enum.ProductPurchaseDecision.PurchaseGranted -- already granted earlier
	end

	local handler = PRODUCTS[receipt.ProductId]
	if not handler then
		warn(`No handler for product {receipt.ProductId}`)
		return Enum.ProductPurchaseDecision.NotProcessedYet
	end

	local ok, err = pcall(handler, player, data)
	if not ok then
		warn(`Grant failed for {receipt.PurchaseId}: {err}`)
		return Enum.ProductPurchaseDecision.NotProcessedYet
	end

	table.insert(data.purchaseIds, receipt.PurchaseId)
	while #data.purchaseIds > MAX_REMEMBERED_PURCHASES do
		table.remove(data.purchaseIds, 1)
	end

	if not saveNow(player) then
		return Enum.ProductPurchaseDecision.NotProcessedYet -- the idempotency list prevents a double grant
	end
	return Enum.ProductPurchaseDecision.PurchaseGranted
end

MarketplaceService.ProcessReceipt = processReceipt :: any
```

With ProfileStore, "persisted" means waiting until the `PurchaseId` appears in `profile.LastSavedData`
(or calling `profile:Save()` and waiting); see ProfileStore's developer products guide.

Prompt from the client (UI) — the server still grants:
`MarketplaceService:PromptProductPurchase(Players.LocalPlayer, productId)`.

## Passes

```luau
--!strict
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")

local VIP_PASS_ID = 987654

local function grantVip(player: Player)
	player:SetAttribute("VIP", true) -- apply perks from one place
end

local function checkPass(player: Player)
	local ok, owns = pcall(MarketplaceService.UserOwnsGamePassAsync, MarketplaceService, player.UserId, VIP_PASS_ID)
	if ok and owns then
		grantVip(player)
	end
end

Players.PlayerAdded:Connect(checkPass)
for _, player in Players:GetPlayers() do
	task.spawn(checkPass, player)
end

-- Fires on the server too; re-verify ownership rather than trusting `purchased` alone.
MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, passId, purchased)
	if purchased and passId == VIP_PASS_ID then
		checkPass(player)
	end
end)
```

`UserOwnsGamePassAsync` results are cached per server; the purchase-finished handler covers in-session buys.

## Subscriptions

- Check with `MarketplaceService:GetUserSubscriptionStatusAsync(player, "EXP-...")` → `{ IsSubscribed, IsRenewing }`
  on join and on `Players.UserSubscriptionStatusChanged(player, subscriptionId)`.
- Benefits must be **revocable**: when `IsSubscribed` is false, remove perks you persisted.
- Prompt with `MarketplaceService:PromptSubscriptionPurchase(player, subscriptionId)`.
- Replacing a pass with a subscription: keep honoring existing pass owners, take the pass off sale.

## Shops that sell

- Personalize order with `MarketplaceService:RankProductsAsync(identifiers)` (call once on join —
  strict rate limit) and "Top picks" with `RecommendTopProductsAsync({ Enum.InfoType.Product, Enum.InfoType.GamePass })`
  (needs a sale in the last 28 days; call in `task.spawn`).
- Show live prices from `GetProductInfoAsync(id, Enum.InfoType.Product)` / `GetDeveloperProductsAsync()` — never
  hardcode Robux prices: **managed pricing** (regional pricing + price optimization) shows different
  users different prices. `receipt.CurrencySpent` has what the user actually paid.
- Contextual offers (revive on death, boost when stuck) outperform static menus. Also list items in
  the game's **Shop** tab in Creator Hub.
- Open the Roblox Shop overlay from your own buttons, NPCs, or zones with `MarketplaceService:OpenShop(player)`.
- **Listed** passes and developer products can also be sold outside the game (Home, search, after Robux
  purchases); the player joins with the item already bought. Developer products qualify only with a correct
  `ProcessReceipt` — Creator Hub → Monetization → Shop flags products that need a fix.

## Refunds and chargebacks

Refunded passes (and avatar items) lose ownership automatically — re-check ownership instead of caching it
forever. Developer product grants live in your data, so revoke them yourself: subscribe to the
**Transaction Refunded** webhook (covers developer products, passes, private servers, Paid Access) and
match it by the transaction/receipt ID in the payload (see `roblox-open-cloud`). Keep handled `PurchaseId`s
with what each granted so a refund can be reversed.

## Compliance

- **Paid random items** (loot boxes, gacha, spins bought with Robux or Robux-bought currency): disclose
  odds before purchase, and check `PolicyService:GetPolicyInfoForPlayerAsync(player)`:
  - `ArePaidRandomItemsRestricted` → offer a free earnable path, a disclosed fixed sequence, or direct purchase.
  - `IsPaidItemTradingAllowed` → disable trading of paid items when false.
- **Regional pricing arbitrage**: gate gifting/trading of purchased items using
  `MarketplaceService:GetUsersPriceLevelsAsync(userIds)` (1–1000, % of global price); fetch at join,
  don't cache across sessions.
- Rewarded video rewards must be developer products, not random, and must not harm the player's
  character while the ad plays.
- Respect age/region restrictions returned by `PolicyService` for ads, social links, and trading.

Rewarded video ads, commerce products, Premium/Roblox Plus hooks, US 18+ DevEx rate and age checks:
[references/ads-and-extras.md](references/ads-and-extras.md).

## Related skills

`roblox-data-stores` (persisting grants), `roblox-security` (economy exploits), `roblox-ui` (shop UI),
`roblox-analytics-liveops` (economy events, funnels, experiments).

© EL4CTEO · MIT · EL4CTEO/roblox-skills

Similar skills

All skills for Game dev and 3D: Unity, Unreal, Godot, Blender →

roblox-monetization by other authors comes first.

roblox-monetization TabooHarmony roblox-monetization — a skill for Roblox purchase work: Game Passes, Developer Products, subscriptions, private servers and policy checks. Useful when a purchase stops granting. CX Codex +1 3,400installs roblox-monetization sentinelcore Walks your coding agent through Roblox monetization: Game Passes, Developer Products, UGC items and Premium Payouts. CX Codex +1 638installs roblox-monetization-compliance LihFolk roblox-monetization-compliance is a Claude Code skill that audits Roblox purchase flows, reward delivery, prices, and paid random items. It activates for purchase work, monetization reviews, or reports of a paid item never arriving. CX Codex +1 ★ 98repo stars roblox-networking gamedev-skills roblox-networking — a skill for Claude Code, Codex, Cursor and other platforms handles Roblox client-server networking and anti-exploit rules. Used when remotes trust the client, exploiters spam requests or hits register incorrectly. CX Codex +1 9,300installs roblox-security TabooHarmony roblox-security is a Claude Code skill that audits Roblox game code for exploits, remote abuse, and DataStore duplication. It can be used before releases or in-game economy updates. CX Codex +1 3,500installs roblox-gamepasses nonlooped roblox-gamepasses walks your agent through Roblox monetization: game passes, developer products, subscriptions and Robux transfers, with every benefit granted on the server. CX Codex +1 547installs roblox-datastores gamedev-skills A skill for Claude Code automates Roblox DataStoreService persistence, profile loading, and conflict prevention. Use it when player data goes missing or items duplicate after teleportation. CX Codex +1 11,400installs roblox-game brockmartin roblox-game is a Claude Code skill that assists with Luau scripting, architecture design, and game security for Roblox. It adapts workflows to active Roblox Studio MCP tools. CX Codex +1 553installs

From the same set22

The whole set →
roblox-ui roblox-ui — a skill for Claude Code and Codex constructs responsive Roblox interfaces. Runs when building HUDs, inventories, storefronts, or fixing layouts across mobile devices and consoles. CX Codex +1 1,300installs roblox-testing The roblox-testing Claude Code skill covers testing Roblox code and checking gameplay changes. It applies when adding tests, configuring a runner, or setting up CI. CX Codex +1 1,300installs roblox-open-cloud This Claude Code skill covers Roblox Open Cloud APIs and HttpService. It applies to external tools, bots, CI/CD, and web requests from a game. CX Codex +1 1,200installs roblox-text-chat roblox-text-chat is a Claude Code and Cursor skill that configures TextChatService and text filtering in Roblox for adding chat, commands, or player-authored signs. CX Codex +1 1,200installs roblox-physics The roblox-physics skill for Claude Code manages physics simulations and spatial queries. Use it when setting up raycasts, collisions, and vehicle mechanics. CX Codex +1 1,200installs roblox-npc-ai The roblox-npc-ai Claude Code skill helps build AI for Roblox enemies, pets, and other NPCs. It covers pathfinding, chasing, attacks, and fixes for NPCs that get stuck or jitter. CX Codex +1 1,200installs roblox-teleport-matchmaking roblox-teleport-matchmaking — a skill for Claude Code handles player teleports and matchmaking flows in Roblox via TeleportService. CX Codex +1 1,200installs roblox-input roblox-input — a Claude Code skill for Roblox player controls and cameras. It comes into play when adding keybinds, abilities, vehicle controls, touch buttons, or a custom camera. CX Codex +1 1,200installs

Project sponsors

Companies that keep this analytics open