Loading...
Loading...
Use when developing Roblox games or experiences and need to earn Robux through Game Passes, Developer Products, UGC avatar items, or Premium Payouts — covers both Studio scripting and Creator Hub dashboard setup.
npx skill4agent add sentinelcore/roblox-skills roblox-monetization| System | Use For | Repeatable? | Min Price |
|---|---|---|---|
| Game Pass | Permanent perks/access | No (one-time) | 1 Robux |
| Developer Product | Consumables, currency, boosts | Yes (unlimited) | 1 Robux |
| UGC Item | Avatar marketplace sales | N/A | 1 Robux |
| Premium Payout | Passive playtime income | Automatic | No setup |
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local PASS_ID = 000000 -- your Pass ID
-- Check ownership on join
Players.PlayerAdded:Connect(function(player)
local success, hasPass = pcall(function()
return MarketplaceService:UserOwnsGamePassAsync(player.UserId, PASS_ID)
end)
if success and hasPass then
-- grant perk
end
end)
-- Prompt purchase (call from server)
local function promptPass(player)
MarketplaceService:PromptGamePassPurchase(player, PASS_ID)
end
-- Grant immediately after purchase
MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, passId, purchased)
if purchased and passId == PASS_ID then
-- grant perk
end
end)Always run on server (Script), never LocalScript — client-side ownership checks can be spoofed.
local MarketplaceService = game:GetService("MarketplaceService")
local DataStoreService = game:GetService("DataStoreService")
local Players = game:GetService("Players")
local PRODUCT_ID = 000000 -- your Product ID
local coinStore = DataStoreService:GetDataStore("PlayerCoins")
local function processReceipt(receiptInfo)
local player = Players:GetPlayerByUserId(receiptInfo.PlayerId)
if not player then
return Enum.ProductPurchaseDecision.NotProcessedYet
end
if receiptInfo.ProductId == PRODUCT_ID then
-- Persist to DataStore FIRST — if server crashes after this line, coins are safe
local ok, err = pcall(function()
coinStore:UpdateAsync(tostring(player.UserId), function(current)
return (current or 0) + 100
end)
end)
if not ok then
warn("DataStore failed:", err)
return Enum.ProductPurchaseDecision.NotProcessedYet -- Roblox will retry
end
-- Now safe to update in-memory value (leaderstats, etc.)
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
MarketplaceService.ProcessReceipt = processReceipt
-- Prompt purchase
local function promptProduct(player)
MarketplaceService:PromptProductPurchase(player, PRODUCT_ID)
endCritical rules for:ProcessReceipt
- Must return
orPurchaseGranted— never error silentlyNotProcessedYet- Persist to DataStore before returning — crashes can cause loss
- Return
on DataStore failure so Roblox retries the receiptNotProcessedYet- Only one
handler allowed per server; combine all product IDs inside itProcessReceipt- Roblox may call
more than once for the same purchase — useProcessReceiptas a dedup key if double-granting is a concernreceiptInfo.PurchaseId
| Item Type | Creator Cut |
|---|---|
| Clothing (t-shirts, shirts, pants) | 70% of sale |
| UGC Accessories | 30% (40% with Premium subscription) |
| Limited UGC with resale | Up to 70% |
RemoteEvent-- Inside ProcessReceipt, after DataStore save succeeds
local NotifyClient = game:GetService("ReplicatedStorage").Remotes.PurchaseGranted
local player = Players:GetPlayerByUserId(receiptInfo.PlayerId)
if player then
NotifyClient:FireClient(player, { productId = receiptInfo.ProductId })
endTipalti: You must create and verify a Tipalti account separately before your first payout. Set this up early to avoid delays.
| Mistake | Fix |
|---|---|
| Ownership check in LocalScript | Move to server Script — client checks can be exploited |
| Wrap logic in |
| Not saving purchase to DataStore | Player loses item on crash — persist before returning |
Multiple | Only one allowed per server — combine all product logic in one function |
| Double-granting on receipt retry | Use |
| Selling UGC without program access | Apply to UGC program first; uploads will be rejected otherwise |
| Price below platform minimum | Minimum is 1 Robux for most item types |
| DevEx blocked despite enough Robux | Check all eligibility: age 13+, verified email, no violations, Premium subscription, earned (not purchased) Robux |