this is what i have, and can you maybe make it so it will give an item to the player when bought
function onClicked(p)
local CD = script.Parent
local ITEM_ID = 689063033
local Click = Instance.new("ClickDetector",CD)
game:GetService("MarketplaceService"):PromptPurchase(p,ITEM_ID)
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

1 comment
local Click = Instance.new("ClickDetector")