The script is located in the ServerScriptService, it isn't a local script. I don't understand why this script doesn't work in main game but does in alternative game with different products ids.
local MarketplaceService = game:GetService("MarketplaceService")
MarketplaceService.ProcessReceipt = function(purchaseInfo)
local plr = game:GetService("Players"):GetPlayerByUserId(purchaseInfo.PlayerId)
if purchaseInfo.ProductId == 349843507 then
plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value + 100
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end

3 comments
product is broken?
is your game filtering enabled
Is the game published in roblox? It probably doesn't work if it's saved in your computer.