Dev product script suddenly not working

Guys. Ive been using this script to handle dev products for monthsbut now it just doesnt work anymore. I dont know whats wrong with it.

local MarketPlaceService = game:GetService("MarketplaceService")

local Ids = {
	["1822295850"] = 2000,
	["1822296616"] = 5000
}
MarketPlaceService.ProcessReceipt = function(ReceiptInfo)
	local Player = game.Players:GetPlayerByUserId(ReceiptInfo.PlayerId)

	if ReceiptInfo.ProductId == 1822295850 then
		local Leaderstats = Player:FindFirstChild("leaderstats")

		if Leaderstats then
			local Money = Leaderstats:FindFirstChild("Money")

			if Money then
				Money.Value = Money.Value + 2000
				return Enum.ProductPurchaseDecision.PurchaseGranted
			end
		end
	elseif ReceiptInfo.ProductId == 1822296616 then
		local Leaderstats = Player:FindFirstChild("leaderstats")

		if Leaderstats then
			local Money = Leaderstats:FindFirstChild("Money")

			if Money then
				Money.Value = Money.Value + 5000
				return Enum.ProductPurchaseDecision.PurchaseGranted
			end
		end
	end
end

Only one script in your game can get access to the receipt info. This means you have another script in your game that’s also handling process receipts, so you need to combine the two scripts.

1 Like