local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
button = script.Parent
buttopn.MouseButton1Click:Connect(function()
local productID = 335171701
local function promptPurchase()
local player = Players.LocalPlayer
MarketplaceService:PromptProductPurchase(player, productID)
end
The code doesn't pull up the buy button, then I have a receipt handler in server script service.

2 comments
um, you cant call a function before it is declared
that's right *