I have multiple dev products that give different credits but they all give the same amount.
local MarketPlaceService = game:GetService("MarketplaceService")
local players = game:GetService("Players")
local ProductId = 982191893
local function processReceipt(receiptInfo)
local player = players:GetPlayerByUserId(receiptInfo.PlayerId)
if not player then
return Enum.ProductPurchaseDecision.NotProcessedYet
end
if player then
local new = player.leaderstats.Credits.Value + 1000
print ("Working")
game.Workspace.Sounds.PurchaseSound:Play()
player.leaderstats.Credits.Value = new
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
MarketPlaceService.ProcessReceipt = processReceipt
