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

How would I check to see if they bought the Developer Product?

Asked by
6zk8 95
4 years ago
MPS = game:GetService("MarketplaceService")
id = 973839064  
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
    MPS:PromptProductPurchase(player, id)
end)

I need this for my tycoon. Thanks!

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

inside a script:

local MarketplaceService = game:GetService("MarketplaceService")

MarketplaceService.ProcessReceipt = function(receiptInfo)
    local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)

    if player then

        if receiptInfo.ProductId == 973839064  then

        -- your code, for example:
        --leaderstats.Money.Value = leaderstats.Money.Value + 10000000

        return Enum.ProductPurchaseDecision.PurchaseGranted

        end

    else
          return Enum.ProductPurchaseDecision.NotProcessedYet
    end

end
0
That's too complicated 6zk8 95 — 4y
0
??? is the only way GuerraReturns 122 — 4y
0
I write the code for you, you need only copy and paste this code. GuerraReturns 122 — 4y
0
I want to learn not copy and paste. 6zk8 95 — 4y
View all comments (3 more)
0
How i can help you if you have write only the localscript? You don't have the script part! GuerraReturns 122 — 4y
0
Dosen't matter any more, using what you have shown me, I made my own. 6zk8 95 — 4y
0
Thank you, but the next time please write "Not show the code", cya! GuerraReturns 122 — 4y
Ad

Answer this question