How can i make a button cost an item?

How can i make a button cost an item? Such as an item needed to press the button.

you can js use a vending machine or wire a button to a vending machine

Vending machine, device barrier, and button.
Put button bellow barrier. Vending machine → barrier when item purchases deactivate barrier.


Zone → Player enters Zone → Run Check (Player has [ITEM]) → Activate button

use a vending machine like what @Kosm0-o said


1 Like

Make sure the zone and button has scope set to player so that It works :stuck_out_tongue:

is he talking about button activation or buying something from button?

That’s kinda the opposite of what @MattTheDoge I think.


@THEHACKER120 is this what @MattTheDoge wants

Well @MattTheDoge said this but we’d need him/her to elaborate on the details


My way is more like a status, if you have the status of an item, you can press the button, but if you use a vending machine, that also works.

o ok I see what he wants but I don’t think that’s possible :confused:

Place a button, checker, and item granter (if you don’t want to use a vending machine)

Set checker to check for more than one of the item required to purchase (for example, cash)

Set the item granter to grant the amount of the item you’re purchasing (for example, glass shards)

Wire button and checker: when button pressed > run check

Wire checker and item granter: check passes > grant item

A Vending Machine ; )

that’s why the vending machine was made

1 Like

link the button to the vending machine with a wire, then mark the vending machine thing only go if the required item is there

I mean yes @yaypoke624x I don’t know why the person wants a button to do it

I’m simply offering an easier option : D

Use what 2nd_place_guy posted. Change the settings to the item(s) you want to purchase, how much it costs, etc…

I think y’all are doing what @MattTheDoge asked backwards

1 Like