I made a dev product and when people buy it, basically it starts raining airdrops, but it starts the event even if I didn’t buy it.
Here the script.
local mps = game:GetService(“MarketplaceService”)
mps.ProcessReceipt = function(receiptInfo)
local id = receiptInfo.ProductId
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if id == AirdropID then
for _, player in pairs(game.Players:GetPlayers()) do
if player.Name == plr.Name then
--what to do if player buys it
status.Value = true
rain:FireAllClients(plr)
print (plr.Name.." has bought standard airdrop rain")
airdropRain()
end
end