I got the script Working; But when ever the Player who** bought the weapon dies he/she loses the weapon they bought from Dev Products**. So I want to know how can I give the Player the weapons so he/she won't lose there weapons if they die.
local plr = script.Parent.Parent.Parent.Parent.Parent
local link = game:GetService("MarketplaceService")
deb = 0
script.Parent.MouseButton1Click:connect(function()
local marketId = 21055724
link:PromptProductPurchase(plr,marketId)
link.ProcessReceipt = function(receiptInfo)
if Enum.ProductPurchaseDecision.PurchaseGranted and receiptInfo.PlayerId == plr.userId then
if deb == 0 then
deb = 1
local c = game.Lighting.DualIllumina:Clone()
c.Parent = plr.Backpack
wait(1)
deb = 0
end
end
end
end)

1 comment
Spongocardo do you mean like this(Coding Down below)