К основному содержанию
скилл CX Codex

roblox-monetization · el4cteo — скилл для Claude Code: покупки в Roblox

Скилл roblox-monetization для Claude Code помогает настраивать монетизацию в Roblox и разбирать сбои покупок. Подключается при работе с магазинами, пропусками, подписками, рекламой и платными случайными предметами.

MIT 1 200 установок ★ 131 обновлён 2026-11-03

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add EL4CTEO/roblox-skills --skill roblox-monetization -a claude-code
Открыть на GitHub

Что делает roblox-monetization

Скилл описывает серверную обработку покупок в Roblox: товары, пропуски и подписки, а также рекламу с наградой и платные частные серверы. Он разбирает выдачу купленного и правила для MarketplaceService.ProcessReceipt.

Обработчик чека должен быть идемпотентным: сохранять PurchaseId и не выдавать товар повторно при повторной доставке чека. PurchaseGranted возвращается после сохранения покупки; если данные игрока ещё не загружены или сохранение не удалось, нужно вернуть NotProcessedYet. Выдавать покупку по клиентскому событию нельзя: её подтверждает сервер.

Какие задачи решает

  • настроить выдачу повторно покупаемых товаров
  • не допустить двойную выдачу при повторном чеке
  • проверить владение пропуском при входе игрока
  • обрабатывать отмену подписки и снимать её бонусы
  • показывать актуальные цены с региональным ценообразованием

Примеры запросов агенту

  • Настрой серверную обработку покупок через MarketplaceService.ProcessReceipt.
  • Разбери, почему покупка товара выдаётся дважды после повторного чека.
  • Добавь проверку пропуска и выдачу VIP-бонуса при входе игрока.

Как установить roblox-monetization

1Через Skills CLI (Vercel)

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

2Вручную: положить файлы

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

Папка скилла целиком; для одного проекта — .claude/skills/roblox-monetization/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о roblox-monetization

Как установить roblox-monetization в Claude Code?

Выполни npx skills add EL4CTEO/roblox-skills --skill roblox-monetization -a claude-code. Скилл устанавливается в ~/.claude/skills/roblox-monetization/SKILL.md.

Что делает roblox-monetization?

Скилл помогает реализовать монетизацию Roblox и разбирать связанные с ней сбои: обработку чеков, пропуски, подписки и магазин. В частности, он объясняет, как избежать повторной выдачи товара при повторной доставке чека.

Почему обработчик покупки должен проверять PurchaseId?

Roblox может повторно отправить чек, например если игрок ещё не загрузил данные. Сохранённый PurchaseId позволяет распознать уже обработанную покупку и не выдать товар дважды.

Исходный текст

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

Похожие скиллы

Все скиллы по теме «Геймдев и 3D: Unity, Unreal, Godot, Blender» →

Сначала — roblox-monetization от других авторов.

roblox-monetization TabooHarmony Скилл roblox-monetization для Claude Code: работа с покупками в Roblox (Game Passes, Developer Products, подписки, приватные серверы). Помогает отследить, почему покупка не выдала предмет. CX Codex +1 3 400установок roblox-monetization sentinelcore Скилл roblox-monetization для ИИ-агента, который ведёт через настройку Game Passes, Developer Products, UGC-предметов и Premium Payouts в Roblox. CX Codex +1 638установок roblox-monetization-compliance LihFolk Скилл roblox-monetization-compliance для Claude Code проверяет покупки в Roblox на ошибки выдачи наград и соответствие правилам монетизации. Запускается при добавлении покупок, аудите или разборе случая «оплатил, но ничего не получил». CX Codex +1 ★ 98звёзд репо roblox-networking gamedev-skills Скилл roblox-networking для Claude Code, Codex, Cursor и других платформ управляет сетевым взаимодействием клиент-сервер в Roblox и защитой от эксплойтов. CX Codex +1 9 300установок roblox-security TabooHarmony Скилл roblox-security проверяет серверный код Roblox на уязвимости, дюпы валюты и доверие клиенту. Пригодится перед релизом плейса или при аудите RemoteEvent и сохранений. CX Codex +1 3 500установок roblox-gamepasses nonlooped Скилл roblox-gamepasses помогает агенту собрать монетизацию в Roblox: пассы, developer products, подписки и переводы Robux — с выдачей бонусов только на сервере. CX Codex +1 547установок roblox-datastores gamedev-skills Автоматизирует работу с Roblox DataStoreService, загрузку профилей и защиту от перезаписи прогресса. Применяется при потере данных игроков или дублировании предметов после телепортации. CX Codex +1 11 400установок roblox-game brockmartin Скилл roblox-game для Claude Code помогает проектировать и программировать плейсы Roblox на языке Luau. Ассистент проверяет сетевую безопасность, настраивает DataStore и генерирует скрипты. CX Codex +1 553установок

Из того же набора22

Весь набор →
roblox-ui Скилл roblox-ui для Claude Code и Codex формирует адаптивный интерфейс в Roblox. Включается при сборке HUD, инвентарей, магазинов или починке вёрстки под мобильные экраны и консоли. CX Codex +1 1 300установок roblox-testing Скилл roblox-testing для Claude Code помогает тестировать код Roblox и проверять игровые изменения. Подключается при добавлении тестов, настройке тестового запуска или CI. CX Codex +1 1 300установок roblox-open-cloud Скилл roblox-open-cloud для Claude Code помогает работать с Open Cloud API Roblox и HttpService. Включается при создании внешних инструментов, ботов и CI/CD для игр. CX Codex +1 1 200установок roblox-text-chat Скилл roblox-text-chat для Claude Code и Cursor, который настраивает TextChatService, фильтрацию текста и чат в Roblox. Включается при добавлении чата, команд или табличек с текстом игроков. CX Codex +1 1 200установок roblox-physics Скилл roblox-physics для Claude Code управляет физикой и пространственными запросами. Подключается при настройке столкновений, лучей и транспорта. CX Codex +1 1 200установок roblox-npc-ai Скилл roblox-npc-ai для Claude Code помогает создавать ИИ врагов, питомцев и других NPC в Roblox. Используется для настройки поиска пути, преследования, атак и поведения персонажей, а также для исправления застревающих NPC. CX Codex +1 1 200установок roblox-teleport-matchmaking Скилл roblox-teleport-matchmaking для Claude Code управляет телепортацией игроков и созданием матчей в Roblox через TeleportService. CX Codex +1 1 200установок roblox-input Скилл roblox-input для Claude Code настраивает ввод игрока и камеры в Roblox. Он подключается к задачам с клавишами, способностями, транспортом, сенсорными кнопками или собственной камерой. CX Codex +1 1 200установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой