local purchaseCompleted = false
if currencyType == “Robux” then
local ProductId = LegendaryEgg[“DevProductId”]
local success, msg = pcall(function()
local Product = game:GetService(“MarketplaceService”):PromptProductPurchase(Player, ProductId)--[[ game:GetService("MarketplaceService").PromptProductPurchaseFinished:Connect(function(player, assetId, wasPurchased) if player == Player and wasPurchased and assetId == ProductId then print("purchased!") purchaseCompleted = true end end) ]] end) print(success)
end
if not purchaseCompleted then
return false
end
What am i trying to achieve?
- Never scripted dev products before, i want to make a connection for it, and it will proceed only then that prompt purchased, is it a good idea? another way of solution?