Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function processReceipt(receiptInfo)
- local userId = receiptInfo.PlayerId
- local productId = receiptInfo.ProductId
- local player = Players:GetPlayerByUserId(userId)
- if player then
- local handler = productFunctions[productId]
- local success, result = pcall(handler, receiptInfo, player)
- if success then
- return Enum.ProductPurchaseDecision.PurchaseGranted
- else
- warn("Failed to process receipt:", receiptInfo, result)
- end
- end
- return Enum.ProductPurchaseDecision.NotProcessedYet
- end
- MarketplaceService.ProcessReceipt = processReceipt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement