The dev product is supposed to double your cash It's supposed to prompt the purchase when you click on a textbutton in StartGUI The path is: StarterGUI>ScreenGUI(named DubYourCash)>TextButton
Localscript in StarterPack:
local textButton = game.StarterGui.DubYourCash.TextButton
local productId = 22756625
textButton.MouseButton1Click:connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, productId)
end)
Script inside of the TextButton:
local MarketplaceService = Game:GetService("MarketplaceService")
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
local productId = 22756625
MarketplaceService.ProcessReceipt = function(receiptInfo)
for i, player in ipairs(game.Players:GetChildren()) do
if player.userId == receiptInfo.PlayerId then
if receiptInfo.ProductId == productId then
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value *2
end
end
end
local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_purchase_" .. receiptInfo.PurchaseId
ds:IncrementAsync(playerProductKey, 1)
return Enum.ProductPurchaseDecision.PurchaseGranted
end
