Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I check if the player bough the developer product?

Asked by 3 years ago
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")

local productID = 1187429520  -- Change this to your developer product ID

-- Function to prompt purchase of the developer product
local function promptPurchase()
    local player = Players.LocalPlayer
    MarketplaceService:PromptProductPurchase(player, productID)
end

script.Parent.MouseButton1Click:Connect(promptPurchase)

Answer this question