local dss = game:GetService("DataStoreService")
local donation = dss:GetOrderedDataStore("Donations")
local Mps = game:GetService("MarketplaceService")
Mps.ProcessReceipt = function(receiptInfo)
print("proceeding")
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if plr then
local robux = donation:GetAsync(plr)
if robux == nil then
robux = 0
end
print("processed, and saving. (amount = " .. robux + receiptInfo.CurrencySpent .. ")")
donation:SetAsync(plr, robux + receiptInfo.CurrencySpent)
end
end
hey so it works, however it fires multiple times when mulitple things are bought. For example when I click on one of the donates it fires the code once, however when I click on donate again on the same one it plays it twice at the same time. The amount that it plays at the same time increases by one everytime the code is launched
Don’t think too hard or your head will hurt. I understand you don’t know how processed events work for marketplaceservice and it’s fine. I suggest you start learning how properties of items in workspace work. I know it’s hard for you so maybe you should switch to building?
Right back at ya. You can go figure it out yourself if you’re just going to be rude. We don’t volunteer our time here for you to be troll us. If you’ve got a question, be polite and make it easy for us to find the crux of the issue.
Good luck with your script.
I agree with Jarod, Devforum is not a place to bully people. You were the one asking for help, not Jarod. Can’t believe a Programmer would even say that kind of thing.