Hello Devs.
I have been using this “script” for Developer products for some time and it always worked but now nothing happen when I try to buy it (in actual game not in studio)
local MPS = game:GetService("MarketplaceService")
MPS.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == 1143829573 then -- replace with your ID here
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if player:FindFirstChild("Stats") then
player.Stats.Stars.Value = player.Stats.Stars.Value + 10
return Enum.ProductPurchaseDecision.PurchaseGranted
end
elseif receiptInfo.ProductId == 1143829768 then -- replace with your ID here
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if player:FindFirstChild("Stats") then
player.Stats.Stars.Value = player.Stats.Stars.Value + 45
return Enum.ProductPurchaseDecision.PurchaseGranted
end
elseif receiptInfo.ProductId == 1143829900 then -- replace with your ID here
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if player:FindFirstChild("Stats") then
player.Stats.Stars.Value = player.Stats.Stars.Value + 125
return Enum.ProductPurchaseDecision.PurchaseGranted
end
elseif receiptInfo.ProductId == 1143830109 then -- replace with your ID here
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if player:FindFirstChild("Stats") then
player.Stats.Stars.Value = player.Stats.Stars.Value + 1200
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
end
Thanks for any solution!