Hello. I'm developing a game but I need help with something. I want to make a gui appear when buying a dev product. It's like a sucessfully bought message or something. I tried to find on youtube but nothing works. I hope I get an answer here.
Regards.
I know this looks like the same script but I just want to see if it works.
Put a LocalScript inside the TextButton:
local MarketplaceService = game:GetService("MarketplaceService") local Players = game:GetService("Players") local productID = --Dev product ID script.Parent.MouseButton1Click:Connect(function(promptPurchase) local player = Players.LocalPlayer MarketplaceService:PromptProductPurchase(player, productID) end)
Put a ServerScript (Script) inside the TextButton:
local bought = script.Parent.Bought local MPS = game:GetService("MarketplaceService") local productID = --Dev product ID again function processReceipt(receiptInfo) local player = game:GetService("Players"):GetPlayerByUserId(receiptInfo.PlayerId) if not player then return Enum.ProductPurchaseDecision.NotProcessedYet end if ReceiptInfo.ProductId == productID then bought.Visible = true bought.Text = "You have bought a DevProduct!" end return Enum.ProductPurchaseDecision.PurchaseGranted end MPS.ProcessReceipt = processReceipt