Hey, I Have a script that I Found on youtube, It worked a few days ago but it stopped working, can someone help me find what happened?
local MPS = game:GetService(“MarketplaceService”)
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local Products = {
[1253472121] = function(receipt,player)
ReplicatedStorage[“Flying Carrot”]:Clone().Parent = player.Backpack
end;
}
function MPS.ProcessReceipt(receiptinfo)
local playerProductKey = receiptinfo.PlayerId…":"…receiptinfo.PurchaseId
local plr = game:GetService(“Players”):GetPlayerByUserId(receiptinfo.PlayerId)
local handler
for ProductId,func in pairs(Products) do
if ProductId == receiptinfo.ProductId then
handler = func break
end
end
local suc = pcall(handler,receiptinfo,plr)
return Enum.ProductPurchaseDecision.PurchaseGranted
end