local MarketplaceService=game:GetService("MarketplaceService")
local devproductid=52874408
MarketplaceService.ProcessReceipt = function(receiptInfo)
for i,player in ipairs(game.Players:GetChildren()) do
if receiptInfo.ProductId == devproductid then
player.Credits.Value = player.Credits.Value + 100
end
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
This is supposed to give 100 credits to the player, however, when tested in the actual game it doesn't give the player credits. It works in normal mode however

1 comment
Heads up; You don't check the playerId, just the ProductId, wich means every player will get credits instead of the player that purchase it.