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

Make a simple developer product function?

Asked by 4 years ago

How can I make an easy developer product prompter that prompts the product, and returns true if it has been purchased and false if it has been canceled or etc..? (NEED HELP FOR SCRIPT IN SERVER SCRIPT STORAGE AND NOT IN LOCAL SCRIPT!) Example:

local MarketplaceService = game:GetService("MarketplaceService")
local product = 0000000000
function pF(plr, id)
    MarketplaceService:PromptProductPurchase(plr, id)
    if bought then
        return true
    else 
        return false
    end
end
game.Players.PlayerAdded:connect(function(plar)
    if pF(plar,product) then -- product defined in line 2
        print("Purchased!")
    else
        print("CANCELLED")
    end
end)
0
no script will run in Server Storage Luka_Gaming07 534 — 4y

Answer this question