roblox-gamepasses
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseroblox-gamepasses
roblox-gamepasses
Primary official source: https://create.roblox.com/docs/en-us/production/monetization/passes (plus developer-products.md for contrast, and the MarketplaceService class reference).
Grant benefits on the server after verifying the purchase or ownership. Keep purchase prompts and shop display on the client.
See roblox-datastores for how to store "player owns this pass" state or associated perks, and roblox-networking for the Remote validation layer around purchase prompts.
主要官方来源: https://create.roblox.com/docs/en-us/production/monetization/passes(另可对照 developer-products.md,以及 MarketplaceService 类参考文档)。
验证购买或所有权后,应在服务器上发放权益。购买提示和商店展示应保留在客户端。
有关如何存储“玩家拥有该 pass”的状态或相关权益,请参阅 roblox-datastores;有关购买提示周围的 Remote 验证层,请参阅 roblox-networking。
Game passes and developer products
Game Pass 与 Developer Product
- Game Pass: One-time purchase. Permanent privilege for that specific experience (VIP access, permanent item, extra slot, cosmetic unlock, etc.). Roblox tracks ownership per user per experience.
- Developer Product: Repeatable / consumable (currency packs, potions, revives, temporary boosts). Can be bought many times. Requires ProcessReceipt callback on the server for fulfillment.
- As of May 30, 2026, cross-experience game pass and developer product sales are disabled. Design experience-specific passes or use the Robux Transfers API for donation-style flows. must be called from the server. Only Roblox Plus subscribers can initiate transfers, transfer amounts must be between 10 and 500 Robux, and the sender cannot equal the receiver. The recipient receives 90% and the experience earns the other 10%; Roblox takes no transfer fee. A
MarketplaceService:PromptRobuxTransferAsynccallback must process transfer receipts. Roblox permits an experience to grant items or perks after a successful receipt; choosing not to attach rewards is an opinionated anti-abuse/design recommendation, not a platform rule.BindReceiptHandler - You (the creator) are 100% responsible for actually delivering the benefit. Roblox only handles the transaction and the UserOwnsGamePassAsync query.
- Passes can be used for randomized virtual items only if you follow the Paid Random Items policy.
- Game Pass:一次性购买。为特定 experience 提供永久权限(VIP 访问权限、永久物品、额外栏位、cosmetic 解锁等)。Roblox 按用户、按 experience 跟踪所有权。
- Developer Product:可重复或可消耗的购买(货币包、药水、复活、临时增益)。可以购买多次。需要在服务器上提供 ProcessReceipt callback 来完成发放。
- 截至 2026 年 5 月 30 日,跨 experience 的 Game Pass 和 Developer Product 销售已停用。请设计 experience 专属的 pass,或使用 Robux Transfers API 处理捐赠类流程。必须从服务器调用。只有 Roblox Plus 订阅者可以发起转账;转账金额必须在 10 到 500 Robux 之间;并且发送方不能与接收方相同。接收方获得 90%,experience 获得其余 10%;Roblox 不收取转账手续费。
MarketplaceService:PromptRobuxTransferAsynccallback 必须处理转账收据。Roblox 允许 experience 在成功处理收据后发放物品或权益;不附加奖励这一做法属于主动的反滥用/设计建议,并非平台规则。BindReceiptHandler - 您(即创作者)需要自行承担实际交付权益的 100% 责任。Roblox 只负责交易处理和 查询。
UserOwnsGamePassAsync - 只有遵循 Paid Random Items 政策,pass 才能用于随机虚拟物品。
Creation and asset ID
创建与 Asset ID
- Creator Dashboard → your published experience → Monetization → Passes → Create a Pass.
- Upload circular-friendly icon (≤512×512, jpg/png/bmp; important content must survive circular crop).
- Name + description.
- After creation: hover the pass → ⋯ → Copy Asset ID. This number is the passID you use in all scripts.
For external sales on the game page Store tab: go to the pass → Sales → enable "Item for Sale" and set Robux price (1 to 1B).
- Creator Dashboard → 你的已发布 experience → Monetization → Passes → Create a Pass。
- 上传适合圆形裁剪的图标(≤512×512,jpg/png/bmp;重要内容必须能在圆形裁剪后保留)。
- 填写名称和描述。
- 创建后:将鼠标悬停在 pass 上 → ⋯ → Copy Asset ID。该编号就是所有脚本中使用的 passID。
若要在游戏页面的 Store 标签页中进行外部销售:进入该 pass → Sales → 启用 “Item for Sale”,并设置 Robux 价格(1 到 10 亿)。
Prompt purchases and grant benefits
发起购买提示并发放权益
Client side (LocalScript or UI module; only for prompting and optimistic display):
- Call MarketplaceService:UserOwnsGamePassAsync (pcall) to decide "Buy" vs "Owned" button state.
- If not owned, call MarketplaceService:PromptGamePassPurchase(player, passID).
Server side (Script in ServerScriptService; the only place that grants benefits):
lua
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local PASS_ID = 1234567890
local granted = {} -- idempotency guard: granted[player][passID]
local function grantPassBenefits(player: Player, passID: number)
if not player or not player:IsDescendantOf(Players) then
return
end
local playerGranted = granted[player]
if not playerGranted then
playerGranted = {}
granted[player] = playerGranted
end
if playerGranted[passID] then
return
end
playerGranted[passID] = true
-- Apply the actual privilege (attributes, table entry, DataStore flag, Remote to client for visuals, etc.)
-- This is the source of truth.
end
MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player: Player, purchasedPassID: number, wasPurchased: boolean)
-- This event also fires on the client; never grant benefits from the client copy.
if not player or typeof(purchasedPassID) ~= "number" then
return
end
if wasPurchased and purchasedPassID == PASS_ID then
local ok, err = pcall(function()
grantPassBenefits(player, PASS_ID)
end)
if not ok then
warn("Failed to grant pass benefits:", err)
end
end
end)
Players.PlayerAdded:Connect(function(player: Player)
local success, owns = pcall(function()
return MarketplaceService:UserOwnsGamePassAsync(player.UserId, PASS_ID)
end)
if success and owns then
local ok, err = pcall(function()
grantPassBenefits(player, PASS_ID)
end)
if not ok then
warn("Failed to apply owned pass benefits:", err)
end
elseif not success then
warn("UserOwnsGamePassAsync failed for", player.Name)
end
end)
Players.PlayerRemoving:Connect(function(player: Player)
granted[player] = nil
end)GetProductInfoAsync for dynamic UI (price, name, description, IsForSale):
Use . Do this on the client for display, but never grant based on the result. The non-async counterpart still exists, but is preferred.
MarketplaceService:GetProductInfoAsync(id, Enum.InfoType.GamePass)GetProductInfoGetProductInfoAsync客户端(LocalScript 或 UI module;仅用于提示和乐观显示):
- 调用 (pcall),以决定显示“Buy”还是“Owned”按钮状态。
MarketplaceService:UserOwnsGamePassAsync - 如果尚未拥有,则调用 。
MarketplaceService:PromptGamePassPurchase(player, passID)
服务端(ServerScriptService 中的 Script;唯一发放权益的位置):
lua
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local PASS_ID = 1234567890
local granted = {} -- idempotency guard: granted[player][passID]
local function grantPassBenefits(player: Player, passID: number)
if not player or not player:IsDescendantOf(Players) then
return
end
local playerGranted = granted[player]
if not playerGranted then
playerGranted = {}
granted[player] = playerGranted
end
if playerGranted[passID] then
return
end
playerGranted[passID] = true
-- Apply the actual privilege (attributes, table entry, DataStore flag, Remote to client for visuals, etc.)
-- This is the source of truth.
end
MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player: Player, purchasedPassID: number, wasPurchased: boolean)
-- This event also fires on the client; never grant benefits from the client copy.
if not player or typeof(purchasedPassID) ~= "number" then
return
end
if wasPurchased and purchasedPassID == PASS_ID then
local ok, err = pcall(function()
grantPassBenefits(player, PASS_ID)
end)
if not ok then
warn("Failed to grant pass benefits:", err)
end
end
end)
Players.PlayerAdded:Connect(function(player: Player)
local success, owns = pcall(function()
return MarketplaceService:UserOwnsGamePassAsync(player.UserId, PASS_ID)
end)
if success and owns then
local ok, err = pcall(function()
grantPassBenefits(player, PASS_ID)
end)
if not ok then
warn("Failed to apply owned pass benefits:", err)
end
elseif not success then
warn("UserOwnsGamePassAsync failed for", player.Name)
end
end)
Players.PlayerRemoving:Connect(function(player: Player)
granted[player] = nil
end)使用 获取动态 UI 信息(价格、名称、描述、):
在客户端调用该方法以进行展示,但绝不依据其结果发放权益。非异步对应方法 仍然存在,但应优先使用 。
MarketplaceService:GetProductInfoAsync(id, Enum.InfoType.GamePass)IsForSaleGetProductInfoGetProductInfoAsyncCapability requirements
API 能力要求
Game passes and developer products require a published experience. Enable Studio Access to API Services only when a specific API used by a dedicated test experience requires it; do not treat that Studio setting as a blanket prerequisite for every purchase API. Verify each API's current requirements in its Engine Reference entry.
MarketplaceServiceGame Pass 和 Developer Product 要求 experience 已发布。仅当专用测试 experience 中使用的某个特定 API 需要时,才启用 Studio Access to API Services;不要将该 Studio 设置视为每个 购买 API 的通用前置条件。请在相应的 Engine Reference 条目中核实每个 API 的当前要求。
MarketplaceServiceProduct recommendations
产品推荐
- : pass a table of up to 50
MarketplaceService:RankProductsAsync(arrayOfIdentifiers). Returns a personalized ranking for the current user as{InfoType = Enum.InfoType.GamePass, Id = ...}items. Use sparingly; call once at join.{ProductIdentifier, ProductInfo} - : returns up to 50 recommended products the user is likely to engage with. Results usually exclude already-owned items, but verify in your UI. Use sparingly; call once at join.
MarketplaceService:RecommendTopProductsAsync({Enum.InfoType.GamePass, Enum.InfoType.Product})
Use these results in a "Recommended for you" section of your shop. Measure whether they improve conversion in your experience.
- :传入一个最多包含 50 个
MarketplaceService:RankProductsAsync(arrayOfIdentifiers)标识符的表。以{InfoType = Enum.InfoType.GamePass, Id = ...}项的形式返回当前用户的个性化排名。应谨慎使用;玩家加入时调用一次。{ProductIdentifier, ProductInfo} - :返回最多 50 个用户可能感兴趣的推荐产品。结果通常会排除已经拥有的物品,但仍应在 UI 中进行核实。应谨慎使用;玩家加入时调用一次。
MarketplaceService:RecommendTopProductsAsync({Enum.InfoType.GamePass, Enum.InfoType.Product})
可以在商店的“Recommended for you”板块中使用这些结果。衡量它们是否能提高 experience 中的转化率。
Promotions (buy robux page bonus pool)
促销(购买 Robux 页面奖励池)
You can opt passes into the promotion pool so that users buying Robux packages may receive the pass for free (contextually relevant to their history).
Requirements (from the passes doc):
- Unique pass recommended.
- If on sale, price between 50 and 800 Robux.
- Must have thumbnail.
- Must comply with Community Standards.
- Cannot be a paid random item.
Opt-in via the pass's Promotions tab in the dashboard.
可以选择让 pass 加入促销池,这样购买 Robux 套餐的用户可能会免费获得该 pass(需与其历史行为的情境相关)。
要求(来自 passes 文档):
- 建议使用唯一 pass。
- 如果正在促销,价格须在 50 到 800 Robux 之间。
- 必须有缩略图。
- 必须符合 Community Standards。
- 不能是 paid random item。
可通过 Creator Dashboard 中 pass 的 Promotions 标签页选择加入。
Analytics and iteration
分析与迭代
In Creator Dashboard → experience → Monetization → Passes → Analytics tab you get:
- Top passes by sales and net Robux.
- Time-series graphs.
- Attribution for passes acquired via Buy Robux promotions and subsequent joins.
Use this data to decide pricing, which perks are compelling, and when to run promotions.
在 Creator Dashboard → experience → Monetization → Passes → Analytics 标签页中,你可以看到:
- 按销量和净 Robux 统计的热门 passes。
- 时间序列图。
- 通过 Buy Robux 促销获得 pass 的归因数据,以及这些用户之后的加入情况。
使用这些数据决定定价、哪些权益更具吸引力,以及何时开展促销活动。
Security, data, and policy constraints
安全、数据与政策约束
- Prompt only from client. Grant and record only on the server in the PromptGamePassPurchaseFinished handler or on PlayerAdded re-check.
- Always pcall and
UserOwnsGamePassAsynccalls.Prompt... - Re-check ownership on every relevant join/session start before granting gameplay or economy perks.
- Store your own record of ownership + associated state in DataStores if you need history or custom metadata (Roblox does not expose full per-user pass purchase history via the Engine API).
- For RTBF / right-to-be-forgotten, include pass-related keys in your deletion patterns (see roblox-datastores skill).
- Never hardcode Robux prices in UI that the player sees: use so regional pricing and optimizations work.
GetProductInfoAsync - Test purchases only on dedicated test experiences.
- For paid random items (loot boxes / gacha passes), use first: check
PolicyServiceandPolicyService:GetPolicyInfoForPlayerAsync(player).ArePaidRandomItemsRestrictedbefore offering randomized paid content.IsPaidItemTradingAllowed - For developer products, can only be assigned once globally; assign it once in a single server script. The callback must return
MarketplaceService.ProcessReceiptafter successful fulfillment, orEnum.ProductPurchaseDecision.PurchaseGrantedif fulfillment fails, because Roblox may redeliver the receipt untilEnum.ProductPurchaseDecision.NotProcessedYetis returned.PurchaseGranted - Donation / tipping games using are high-risk for abuse; implement rate limits, alt-account detection, moderation pipelines, and avoid granting in-experience advantages in exchange for transfers.
PromptRobuxTransferAsync
- 仅在客户端发起提示。只能在服务端的 handler 中或
PromptGamePassPurchaseFinished重新检查时发放并记录权益。PlayerAdded - 对 和
UserOwnsGamePassAsync调用始终使用 pcall。Prompt... - 每次相关的 join/session start 都应重新检查所有权,然后再发放游戏或经济权益。
- 如果需要历史记录或自定义元数据,请在 DataStores 中存储你自己的所有权记录及关联状态(Roblox 不会通过 Engine API 公开每个用户完整的 pass 购买历史)。
- 对于 RTBF/被遗忘权,应在删除模式中包含与 pass 相关的键(参阅 roblox-datastores skill)。
- 绝不要在玩家看到的 UI 中硬编码 Robux 价格:使用 ,以支持区域定价和价格优化。
GetProductInfoAsync - 仅在专用测试 experience 中测试购买。
- 对于 paid random items(loot boxes/gacha passes),先使用 :在提供随机付费内容之前,检查
PolicyService和PolicyService:GetPolicyInfoForPlayerAsync(player).ArePaidRandomItemsRestricted。IsPaidItemTradingAllowed - 对于 Developer Product,在全局范围内只能赋值 一次;应在单个服务器脚本中赋值一次。成功完成发放后,callback 必须返回
MarketplaceService.ProcessReceipt;如果发放失败,则返回Enum.ProductPurchaseDecision.PurchaseGranted,因为在返回Enum.ProductPurchaseDecision.NotProcessedYet之前,Roblox 可能会再次投递收据。PurchaseGranted - 使用 的捐赠/打赏类游戏存在很高的滥用风险;应实施速率限制、alt-account 检测和审核流程,并避免以转账为条件授予 experience 内的优势。
PromptRobuxTransferAsync
Subscriptions (recurring benefits)
Subscription(周期性权益)
Subscriptions offer users recurring benefits for a monthly fee, auto-renewing in Robux or local currency. Unlike passes (permanent), subscription benefits persist only while the user keeps paying. Up to 50 per experience; single-tiered (no mutually exclusive Bronze/Silver/Gold); regional pricing enabled by default for Robux-priced subs.
API surface (subscription IDs are strings like ):
"EXP-11111111"- : server-only, returns
MarketplaceService:GetUserSubscriptionStatusAsync(player, subscriptionId).{IsSubscribed: boolean} - : client prompt.
MarketplaceService:PromptSubscriptionPurchase(player, subscriptionId) - : note
MarketplaceService.PromptSubscriptionPurchaseFinished(player, subscriptionId, didTryPurchasing)is an attempt signal, not success; re-check status after a delay.didTryPurchasing - : server-only, fires on purchase/renewal/cancellation.
Players.UserSubscriptionStatusChanged(player, subscriptionId) - and
MarketplaceService:GetSubscriptionProductInfoAsync(subscriptionId).GetUserSubscriptionPaymentHistoryAsync(player, subscriptionId)
Security (same posture as passes): prompt on client, check status and grant/revoke on server only, pcall everything, re-check on every join (subscriptions lapse), respect per player, persist nothing sensitive on the client.
PolicyService:IsEligibleToPurchaseSubscriptionPayouts: Robux-priced subs pay 70% each month. Local-currency subs pay 70% first month, 100% thereafter, with a 30-day hold. Robux subs are not refundable; local-currency subs are refundable within the hold window.
See references/subscriptions.md for the complete flow, client/server code, migration from passes, and gotchas.
Subscription 按月费向用户提供 recurring benefits,可使用 Robux 或本地货币自动续订。与 pass(永久权益)不同,subscription 权益仅在用户持续付费期间有效。每个 experience 最多 50 个;采用单层级设计(不存在互斥的 Bronze/Silver/Gold);以 Robux 计价的 subscription 默认启用区域定价。
API 接口(subscription ID 是形如 的字符串):
"EXP-11111111"- :仅限服务器,返回
MarketplaceService:GetUserSubscriptionStatusAsync(player, subscriptionId)。{IsSubscribed: boolean} - :客户端提示。
MarketplaceService:PromptSubscriptionPurchase(player, subscriptionId) - :注意,
MarketplaceService.PromptSubscriptionPurchaseFinished(player, subscriptionId, didTryPurchasing)是尝试信号,并不表示成功;应在稍后重新检查状态。didTryPurchasing - :仅限服务器,在购买、续订或取消时触发。
Players.UserSubscriptionStatusChanged(player, subscriptionId) - 和
MarketplaceService:GetSubscriptionProductInfoAsync(subscriptionId)。GetUserSubscriptionPaymentHistoryAsync(player, subscriptionId)
安全性(与 pass 相同的原则): 在客户端发起提示,仅在服务器检查状态并发放/撤销权益;所有操作都使用 pcall;每次加入时重新检查(subscription 可能失效);按玩家遵守 ;不要在客户端持久化任何敏感信息。
PolicyService:IsEligibleToPurchaseSubscription付款: 以 Robux 计价的 subscription 每月支付 70%。以本地货币计价的 subscription 首月支付 70%,此后支付 100%,并设置 30 天冻结期。Robux subscription 不支持退款;本地货币 subscription 可在冻结期内退款。
有关完整流程、客户端/服务器代码、从 pass 迁移以及常见陷阱,请参阅 references/subscriptions.md。
Creator Rewards (replaces Premium Payouts)
Creator Rewards(取代 Premium Payouts)
As of July 24, 2025, Engagement-Based Payouts (formerly "Premium Payouts") and the Creator Affiliate program were discontinued and replaced by Creator Rewards. There is no longer a per-Premium-play-minute payout to integrate against.
Creator Rewards is a platform program with two payment types. It requires no in-experience integration:
- Daily Engagement Rewards: 5 Robux per day per Active Spender who spends 10+ minutes in your experience, provided it's one of the first three experiences they visit that day.
- Audience Expansion Rewards: 35% revenue share on a new/reactivated user's first $100 of qualifying purchases in their first 60 days, attributed via Share Links, direct experience links, or experience-name search.
Official source: https://create.roblox.com/docs/en-us/creator-rewards
截至 2025 年 7 月 24 日,Engagement-Based Payouts(原 “Premium Payouts”)和 Creator Affiliate 计划已停止,并由 Creator Rewards 取代。现在不再需要集成按 Premium 游玩分钟数计算的每分钟付款。
Creator Rewards 是一个包含两种付款类型的平台计划,无需在 experience 中进行集成:
- Daily Engagement Rewards:每位 Active Spender 每天获得 5 Robux,条件是其在你的 experience 中停留至少 10 分钟,并且这是其当天访问的前三个 experience 之一。
- Audience Expansion Rewards:对于新用户或重新活跃的用户,可获得其最初 60 天内前 100 美元符合条件购买额的 35% 收入分成,可通过 Share Links、直接 experience 链接或 experience 名称搜索进行归因。
When to use game passes vs other monetization
何时使用 Game Pass 以及其他变现方式
- One-time permanent unlock or access → Game Pass.
- Repeatable purchase (currency, consumables, temporary power) → Developer Product (with proper ProcessReceipt).
- Recurring monthly benefit → Subscription (see references/subscriptions.md; etc.).
MarketplaceService:GetUserSubscriptionStatusAsync
See the developer-products doc for the repeatable flow.
- 一次性永久解锁或访问 → Game Pass。
- 可重复购买(货币、消耗品、临时能力)→ Developer Product(正确实现 ProcessReceipt)。
- 每月 recurring benefit → Subscription(参阅 references/subscriptions.md;等)。
MarketplaceService:GetUserSubscriptionStatusAsync
有关可重复购买流程,请参阅 developer-products 文档。
Scripts
脚本
- : a client-side helper for game pass button state, price display, and prompting.
scripts/PassPurchaseHelper.lua
- :客户端 helper,用于 Game Pass 按钮状态、价格展示和发起购买提示。
scripts/PassPurchaseHelper.lua
Reference index
参考索引
- creation-and-setup.md: Create a pass, find its asset ID, or configure sales and test access.
- policyservice.md: Gate a feature using per-player monetization or content restrictions.
- purchase-flow-and-granting.md: Implement pass purchase prompts, ownership checks, and server grants.
- rules-policies-and-security.md: Review monetization restrictions, paid random items, or purchase security.
- subscriptions.md: Create recurring benefits or handle subscription status and renewals.
- creation-and-setup.md:创建 pass、查找其 Asset ID,或配置销售和测试访问权限。
- policyservice.md:使用按玩家区分的变现或内容限制来控制功能。
- purchase-flow-and-granting.md:实现 pass 购买提示、所有权检查和服务器端发放。
- rules-policies-and-security.md:检查变现限制、paid random items 或购买安全。
- subscriptions.md:创建 recurring benefits,或处理 subscription 状态与续订。