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

How to get the tycoon developer products gui?

Asked by 9 years ago

I'am currently making a tycoon, and i really need this gui!

Screenshot: http://puu.sh/g151n.jpg


This script doesn't work either, why? My leaderboard script is called " LinkedLeaderboard"

local buyButton = script.Parent
local productId = 22757284 --change to dev product id
local mps = game:GetService"MarketplaceService"

function getPlayerById(id)
for i,v in pairs(game.Players:GetPlayers()) do
if v.userId == id then
return v
end
end
end

buyButton.MouseButton1Click:connect(function()
mps:PromptProductPurchase(game.Players.LocalPlayer, productId)
end)

mps.ProcessReceipt = function(info)
local plr = getPlayerById(info.PlayerId)
if plr and plr:FindFirstChild"leaderstats" and plr.leaderstats:FindFirstChild"LinkedLeaderboard" then
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 10000
end
end



 local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_purchase_" .. receiptInfo.PurchaseId

    ds:IncrementAsync(playerProductKey, 1) 

Answer this question