How to add a Button Vending Machine

So, have you wondered how to make a button purchase an item?

This topic will tell you how!

STEP ONE:
Place a Button, Checker, Two Notifications, and an Item Granter. Make the Button title "[ACTION] ([NUMBER] [ITEM])

STEP TWO:
Go to the checker, and set the checking item for your item, and it’s amount greater than one less your required item.

STEP THREE:
Connect the Button and the Checker together.

STEP FOUR:
Connect the Checker to one of the Notifications, and set it to trigger if the check failed. Also, set the notification title to “Purchase Failed”.

STEP FIVE:
Connect the Checker to the other Notification, and set it to trigger if the check succeeded. Also, set the notification title to “Purchase Success”.

STEP SIX:
Connect the Checker to the Item Granter and set the item granter to grant your required item, but make the required item number negative.

STEP SEVEN:
Create your own interaction and connect it to the Checker and make it trigger if the check succeeds.

Hope this helps you! I used it in my map for a mini vending machine.

2 Likes

Another way to do this is just plain using a VM, but nice guide, anyway!

what if you have no space for a vm?

Uh… You can make the VM invisible…

1 Like

yeh true that is true @Blizzy

Exactly! What are people thinking! Nice guide, though.

Great guide! Remember, pictures are powerful!

1 Like

man I have been ready since the beginning since every guide I have done has had pictures

1 Like

sorry, im a lazy kinda guy

1 Like

no that aint lazy thats extra work for a device that could do it with one click of a button

and thats called being clever and smart

1 Like

thanks, appreciate it