/kill @e[type=Item,score_popcorn_min=110]

Working popcorn machines

1- Summon decorative armor stands

 ▶ [Set on 'chain', and 'always active'] The fourth command block plays a sound that looks similar to something popping. Fits perfectly for this machine and will last until the item's score reaches the value of 100.


​ ▶ [Set on 'chain', and 'always active'] The fifth command block places a custom player head that has a texture of popcorn bag. The block is placed only when the item standing on the pressure plate reaches the value of "110" on the "popcorn" scoreboard objective. This custom player skull was made by FreshCoal.


​ ▶ [Set on 'chain', and 'always active'] The sixth command block plays a simple sound which warns the player that the popcorn machine finished to cook the popcorn.


 ▶ [Set on 'chain', and 'always active'] The last command block kills the item on the pressure plate exactly when the player skull is placed on the stand.

3- Command blocks

/testforblock 430 32 -625 minecraft:wooden_pressure_plate 1

/scoreboard players add @e[type=Item,430,32,-625,0] popcorn 1

/summon ArmorStand ~ ~ ~ {CustomName:"POPCORN",Marker:1b,Invisible:1,NoGravity:1,HandItems:[{id:beetroot_seeds,Count:1},{}]}

/scoreboard objectives add popcorn dummy

2- Create scoreboard objective

/execute @e[type=Item,score_popcorn_min=1] ~ ~ ~ particle cloud 432 32 -625 .1 .1 .1 .02 4 force

/execute @e[type=Item,score_popcorn_min=110,score_popcorn=110] ~ ~ ~ playsound entity.item.pickup block @a ~ ~ ~ 10 1

/execute @e[type=Item,score_popcorn_min=110,score_popcorn=110] ~ ~ ~ setblock ~1 ~ ~ minecraft:skull 1 replace {Owner:{Id:"11ad1a4f-ddba-4550-abd7-14288f367d90",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTQ5N2IxNDdjZmFlNTIyMDU1OTdmNzJlM2M0ZWY1MjUxMmU5Njc3MDIwZTRiNGZhNzUxMmMzYzZhY2RkOGMxIn19fQ=="}]}},SkullType:3,Rot:1}

​STEP ONE:
 ▶ [Use it depending on how many decorative seeds you want to place inside the machine] Use this command to summon invisible armor stands and then using the /tp command move them inside the popcorn machine.

STEP TWO:
 ▶ [To be activated only once] Create a scoreboard objective. You will need this after.


STEP THREE:
 ▶ [Set on 'repeat', and 'always active'] The first command block checks when the pressure plate is activated. You will need to change the coordinates inside the command depending on which coordinates your pressure plate is situated.


 ▶ [Set on 'chain', 'conditional' and 'always active'] The second command block is executed only if the previous command block was executed. It increases the score of any item standing on the activated pressure plate by "1" every game tick.


 ▶ [Set on 'chain', and 'always active'] The third command block generates cloud particles if the item on the pressure plate is detected.

/execute @e[type=Item,score_popcorn_min=1,score_popcorn=100] ~ ~ ~ playsound block.lava.pop block @a ~ ~ ~ .5 1.4