/roblox-skills:roblox-monetizationfrom roblox-skills
Implements Roblox monetization features: developer products with idempotent ProcessReceipt, game passes, subscriptions, rewarded video ads, personalized shops, regional pricing, paid random items, private servers, and refund handling.
Ships in roblox-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
| Type | Buy | Use for | Grant via |
|---|---|---|---|
| Developer product | Repeatedly | Currency, consumables, boosts, revives | MarketplaceService.ProcessReceipt (server) |
| Pass | Once, permanent (or a free trial) | VIP, permanent perks, extra slots | GetPassOwnershipAsync 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 | Enable in Creator Dashboard; prompt in-game with MarketplaceService:PromptVIPServerPurchase(player) (no return value; wrap in pcall) |
All granting happens on the server. Never grant from client events like
PromptProductPurchaseFinished — clients can fake them.
Rules:
MarketplaceService.ProcessReceipt.PurchaseGranted only after the grant is persisted. Otherwise return NotProcessedYet;
Roblox retries later (including on the player's next join) with the same PurchaseId.PurchaseIds in the player's saved data so a retry
never grants twice.NotProcessedYet.--!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).
--!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)
-- { Owned, Active, StartTime?, EndTime? }: Active = owned OR in a free trial right now.
local ok, status = pcall(MarketplaceService.GetPassOwnershipAsync, MarketplaceService, player, VIP_PASS_ID)
if ok and status.Active then
grantVip(player) -- session perks only; grant permanent items/currency only when status.Owned
end
end
Players.PlayerAdded:Connect(checkPass)
for _, player in Players:GetPlayers() do
task.spawn(checkPass, player)
end
-- Fires on the server too (also when a free trial starts); re-verify rather than trusting `purchased`.
MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, passId, purchased)
if purchased and passId == VIP_PASS_ID then
checkPass(player)
end
end)
GetPassOwnershipAsync replaces UserOwnsGamePassAsync (which still works and returns Active). On the
client it can only query LocalPlayer.
Pass free trials (live December 2, 2026; opt in per pass in Creator Hub → Monetization → Shop → Free
Trials, or via Open Cloud): players get a pass's benefits for one session. Starting a trial fires
PromptGamePassPurchaseFinished(player, passId, true), and no event fires when it ends. So:
GetPassOwnershipAsync(...).Owned is true.Active when it matters.MarketplaceService:GetUserSubscriptionStatusAsync(player, "EXP-...") → { IsSubscribed, IsRenewing }
on join and on Players.UserSubscriptionStatusChanged(player, subscriptionId).IsSubscribed is false, remove perks you persisted.MarketplaceService:PromptSubscriptionPurchase(player, subscriptionId).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).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.MarketplaceService:OpenShop(player).ProcessReceipt — Creator Hub → Monetization → Shop flags products that need a fix.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 PurchaseIds
with what each granted so a refund can be reversed.
PolicyService:GetPolicyInfoForPlayerAsync(player):
ArePaidRandomItemsRestricted → offer a free earnable path, a disclosed fixed sequence, or direct purchase.IsPaidItemTradingAllowed → disable trading of paid items when false.MarketplaceService:GetUsersPriceLevelsAsync(userIds) (1–1000, % of global price); fetch at join,
don't cache across sessions.PolicyService for ads, social links, and trading.PromptBulkPurchase rejects Enum.PurchaseOption.TimedOption
line items and SearchCatalog errors on Enum.SalesTypeFilter.TimedOptions.Rewarded video ads, commerce products, Premium/Roblox Plus hooks, US 18+ DevEx rate and age checks: references/ads-and-extras.md.
roblox-data-stores (persisting grants), roblox-security (economy exploits), roblox-ui (shop UI),
roblox-analytics-liveops (economy events, funnels, experiments).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
roblox, monetization, in-app-purchases, game-passes, subscriptions
npx claudepluginhub el4cteo/roblox-skills --plugin roblox-skills23 skills in this plugin
/roblox-analytics-liveopsAnalytics and live ops - AnalyticsService economy/funnel/onboarding/progression/custom events, player segments, experience configs via ConfigService, A/B experiments, badges, experience notifications, timed events, daily rewards, season passes. Use when instrumenting a game, tuning economy or onboarding, running A/B tests or feature flags, or planning live events and re-engagement./roblox-architectureRoblox project structure and client/server model - replication, where code and assets belong (ServerScriptService, ReplicatedStorage, StarterPlayer), RunContext, service/controller bootstrapping, player/character lifecycle, CollectionService components, attributes, streaming-safe client code, library choices. Use when starting a project, deciding where code goes, or fixing replication/streaming bugs./roblox-audioSound and music - the Audio API (AudioPlayer, AudioEmitter, AudioListener, AudioDeviceOutput, Wire, effects, faders), classic Sound/SoundGroup, 2D vs 3D audio, music and SFX volume, client vs server playback, asset permissions, streaming caveats, voice routing, text-to-speech. Use when adding music, sound effects, spatial audio, mixing, or fixing sounds that don't play./roblox-characters-animationCharacters and animation - Humanoid properties/states, spawning (LoadCharacterAsync), health and damage, HumanoidDescription appearance, Animator/AnimationTrack playback, priorities and markers, default animation replacement, Tools, TweenService, IKControl, Character Controller Library (beta). Use when changing movement, abilities, damage, respawn, avatars, animations, tweens, or tools/weapons./roblox-code-reviewReview Roblox/Luau code for exploits, data loss, memory leaks, performance problems, lifecycle bugs, policy issues, and deprecated or superseded APIs, using a severity-ranked checklist and the full 2026 deprecation map. Use when reviewing a PR or script, auditing a game before launch, modernizing legacy code, or asked what is wrong with some Roblox code./roblox-data-storesPersistence and cross-server data - DataStoreService (UpdateAsync, retries, budgets, limits), session locking with ProfileStore, schema migrations, OrderedDataStore leaderboards, MemoryStore queues/sorted maps/hash maps, MessagingService, right-to-be-forgotten. Use when saving player data, building leaderboards or queues, or fixing data loss, duplication, or throttling.Other plugins' skills for the same job