I don't want there purchase to save though, so they can re-buy it.
When I press the button it gives them the cash without even buying it. I want to make sure they press that buy button and THEN give them the cash.
What do I do with this?
MarketplaceService.ProcessReceipt = function(receiptInfo) return Enum.ProductPurchaseDecision.PurchaseGranted end
wait(1) local player = game.Players.LocalPlayer local button = script.Parent local productId = button.ID.Value local label = script.Parent.Parent.Parent.Parent.Parent.Currency.CurrencyFrame.Money local value = label.Amount local cash = button.Cash --This is where I am having problems. ------------------------------------------------------------------------------------------------------------------------------------- button.MouseButton1Click:connect(function() Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId) MarketplaceService.ProcessReceipt = function(receiptInfo) return Enum.ProductPurchaseDecision.PurchaseGranted end value.Value = value.Value + cash.Value end) ------------------------------------------------------------------------------------------------------------------------------------------