so basically when i bought the dev product i should have gotten the coins. but. i didn't. and i got a message in the output saying data store request.. i tried multiple different scripts... and its the exact same.. if you know how to fix this.. PLEASE tell me! (:
button GUI script:
local id = 1157603502
local mps = game:GetService("MarketplaceService")
local plr = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
mps:PromptProductPurchase(plr, id)
end)
Dev Product Handler Script:
local MarketPlace = game:GetService("MarketplaceService")
local id1 = 1157603502
id1Reward = 1000
MarketPlace.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == id1 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
plr.leaderstats.chords.Value = plr.leaderstats.chords.Value + id1Reward
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end

1 comment
A way you could test if it works or not is make the cost to be free at first and go to an alt account and make the alt buy the product and see if it give the alt the money, if it doesn't then something is wrong in the script but if it works then you can revert the price to be how much you want.