Help with purchase script (MarketplaceService)

Hello so i wanna make catalog for my game and the problem is that i don’t know how to make an success message after you buy some clothing

repeat wait() until game.Players.LocalPlayer
script.Parent.FocusLost:connect(function()pcall(function()
game:GetService("MarketplaceService"):PromptPurchase(game.Players.LocalPlayer,tonumber(script.Parent.Text))
	end)end)


By the way i have textbox where i can type the ID of the clothing

maybe try to use

game:GetService("MarketPlaceService"):PromptPurchaseFinished:Connect(function(player,assetid,ispurchased)
print("purchase is succesful")
end)