How To Make A Dev Product Work On A Local Script

i need a local script so when you mouseclick1 script.parent it will popup with a devloper Product And If You Buy It will Print(“Hello World”) For A test

I wouldnt come on here to ask people to write you scripts, but i am bored so heres an example of how you could implement this:

UI Button:

local uiButton = your button

uiButton.Mouse1ButtonDown:Connect(function()
--your logic
print("this button was just pressed")
end)


i found a free model script thank you

be careful using free model scripts, they can contain viruses :confused:

wait do you know how i can trigger a script like print command

script.Parent.MouseButton1Click:connect(function()
game:GetService(“MarketplaceService”):PromptProductPurchase(game.Players.LocalPlayer, 1230379234)
end)

print("your message")

like that?

yes like that but i want it to be triggered when you buy the dev product

game:GetService("MarketplaceService").PromptProductPurchaseFinished:Connect(function ()
		print("Purchased")
end)

im not to keen with marketplaceservice but im pretty sure that should work

i think promptproductpurchasefinished fires even if its cancelled

yeah i think youre right, im not sure then. I dont use marketplaceservice

Its processreceipt i think mhnmnbmbm