How can I make a Button that sells Tool with Robux

Hi, I am doing a game and I want to make a button that sells Items with robux, I have tried a few script but somehow it did not work, it can help after a certain time.

Without Button GUI

1 Like

How can you make a Button that sells a tool without a button itself then?

By button did you mean a Click Detector or something?

There is a button but it doesn’t sell the tool I want

Works with Product ID

you mean a button Gui?

 --connect to an event , or run in function
 local Ms = game:GetService("MarketplaceService")
 Ms:PromptGamePassPurchase(player, gamepass Id)

the asset should also obviously have been uploaded to Roblox

I want to sell dances in my game

If you want our help you will need to provide us with your code and output.

You can sell your dances as gamepasses, allowing people who have those to receive dances.

Check if a person has a gamepass using:

MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamePassID)