local MarketplaceService = Game:GetService("MarketplaceService")
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
CASHID = 20622326
MarketplaceService.ProcessReceipt = function(receiptInfo)
local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_product_" .. receiptInfo.ProductId
local numberBought = ds:IncrementAsync(playerProductKey, 1)
for i,v in pairs (game.Players:GetChildren()) do
if v.userId == receiptInfo.PlayerId then
if receiptInfo.ProductId == CASHID then
lds = v:FindFirstChild("leaderstats")
if lds ~= nil then
cs = lds:FindFirstChild("Money")
if cs ~= nil then
cs.Value = cs.Value + 500
end
end
end
end
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
Script.Parent.MousButton1down:connect(function()
Game:GetService("MarketplaceService"):PromptProductPurchase(player, productid)
end)
No output... Also I was told to go to the Scripters forum, which isn't necessarily for help.
||Goal: R$ 32/10,000 | Help me reach it by buying my clothing!|| |