ok so this script right here give the player what they pay for and then the next it will give the what they previously purchased even if it was not that devproduct and then when you purchase any amount of devproducts afterward it gives you absolutely nothing just rips you off
script:
local Marketplaceservice = game:GetService("MarketplaceService")
local devid = 206197710 --1K
local devid2 = 278740243 --5K
local devid3 = 278740974 --10K
local devid4 = 278742122 --20K
local devid5 = 278742974 --50K
local devid6 = 278743396 --100K
local devid7 = 278760850 --200K
local devid8 = 278761364 --500K
local devid9 = 278761820 --1 Million
local devid10 = 278763424 --Donation
local bought = false
Marketplaceservice.ProcessReceipt = function(receiptinfo)
for i, player in ipairs(game.Players:GetChildren()) do
if player.UserId == receiptinfo.PlayerId then
if not bought then
bought = true
if receiptinfo.ProductId == devid then
player.Nut.Coins.Value = player.Nut.Coins.Value + 1000
bought = false
end
elseif receiptinfo.ProductId == devid2 then
if not bought then
bought = true
player.Nut.Coins.Value = player.Nut.Coins.Value + 5000
bought = false
end
elseif receiptinfo.ProductId == devid3 then
if not bought then
bought = true
player.Nut.Coins.Value = player.Nut.Coins.Value + 10000
bought = false
end
elseif receiptinfo.ProductId == devid4 then
if not bought then
bought = true
player.Nut.Coins.Value = player.Nut.Coins.Value + 20000
bought = false
end
elseif receiptinfo.ProductId == devid5 then
if not bought then
bought = true
player.Nut.Coins.Value = player.Nut.Coins.Value + 50000
bought = false
end
elseif receiptinfo.ProductId == devid6 then
if not bought then
bought = true
player.Nut.Coins.Value = player.Nut.Coins.Value + 100000
bought = false
end
elseif receiptinfo.ProductId == devid7 then
if not bought then
bought = true
player.Nut.Coins.Value = player.Nut.Coins.Value + 200000
bought = false
end
elseif receiptinfo.ProductId == devid8 then
if not bought then
bought = true
player.Nut.Coins.Value = player.Nut.Coins.Value + 500000
bought = false
end
elseif receiptinfo.ProductId == devid9 then
if not bought then
bought = true
player.Nut.Coins.Value = player.Nut.Coins.Value + 1000000
bought = false
end
elseif receiptinfo.ProductId == devid10 then
if not bought then
bought = true
player.Nut.Coins.Value = player.Nut.Coins.Value + 4000
bought = false
end
end
end
end
end

1 comment
thank you i tried adding this right after the if player userid == receipt then but it doesnt do anything now