Hi, I'm trying to make a script where if I right click on a renamed block at ATM holding an object renamed credit card, a gui opens asking for the card pin, but I can't do it ! i already created atm and credit card, but i can't put this anvil gui! Help me please!
on rightclick:
if player's tool is bamboo:
if clicked block is black glazed terracotta: #Modifica Observer per sostituirlo con un altro blocco
open chest with 4 row named "&8ATM" to player
wait 1 tick
format slot 0 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 1 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 2 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 3 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 4 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 5 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 6 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 7 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 8 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 9 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 17 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 18 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 26 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 27 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 28 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 29 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 30 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 31 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 32 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 33 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 34 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 35 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 10 of player with gold nugget named "&7Preleva &a1$" to close then run [make console execute command "/give %player% gold_nugget 1 name:&22$"]->[make console execute command "/eco take %player% 2"]
format slot 11 of player with magma cream named "&7Preleva &a2$" to close then run [make console execute command "/give %player% gold_nugget 1 name:&25$"]->[make console execute command "/eco take %player% 2"]
format slot 12 of player with spider eye named "&7Preleva &a5$" to close then run [make console execute command "/give %player% spider_eye 1 name:&25$"]->[make console execute command "/eco take %player% 5"]
format slot 13 of player with fermented spider eye named "&7Preleva &a150$" to close then run [make console execute command "/give %player% fermented_spider_eye 1 name:&250$"]->[make console execute command "/eco take %player% 50"]
format slot 14 of player with ink sac named "&7Preleva &a100$" to close then run [make console execute command "/give %player% lapis_lazuli 1 name:&250$"]->[make console execute command "/eco take %player% 100"]
format slot 15 of player with lapis lazuli named "&7Preleva &a200$" to close then run [make console execute command "/give %player% ink_sac 1 name:&2200$"]->[make console execute command "/eco take %player% 200"]
format slot 16 of player with gunpowder named "&7Preleva &a500$" to close then run [make console execute command "/give %player% gunpowder 1 name:&2500$"]->[make console execute command "/eco take %player% 200"]
Up to here it's easy, but before that I want to put that gui
on rightclick:
if player's tool is bamboo:
if clicked block is black glazed terracotta: #Modifica Observer per sostituirlo con un altro blocco
open chest with 4 row named "&8ATM" to player
wait 1 tick
format slot 0 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 1 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 2 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 3 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 4 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 5 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 6 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 7 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 8 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 9 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 17 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 18 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 26 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 27 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 28 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 29 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 30 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 31 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 32 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 33 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 34 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 35 of player with gray glass pane named "&eATM" with lore "&7Usa i tasti per prelevare/depositare i tuoi soldi" to close
format slot 10 of player with gold nugget named "&7Preleva &a1$" to close then run [make console execute command "/give %player% gold_nugget 1 name:&22$"]->[make console execute command "/eco take %player% 2"]
format slot 11 of player with magma cream named "&7Preleva &a2$" to close then run [make console execute command "/give %player% gold_nugget 1 name:&25$"]->[make console execute command "/eco take %player% 2"]
format slot 12 of player with spider eye named "&7Preleva &a5$" to close then run [make console execute command "/give %player% spider_eye 1 name:&25$"]->[make console execute command "/eco take %player% 5"]
format slot 13 of player with fermented spider eye named "&7Preleva &a150$" to close then run [make console execute command "/give %player% fermented_spider_eye 1 name:&250$"]->[make console execute command "/eco take %player% 50"]
format slot 14 of player with ink sac named "&7Preleva &a100$" to close then run [make console execute command "/give %player% lapis_lazuli 1 name:&250$"]->[make console execute command "/eco take %player% 100"]
format slot 15 of player with lapis lazuli named "&7Preleva &a200$" to close then run [make console execute command "/give %player% ink_sac 1 name:&2200$"]->[make console execute command "/eco take %player% 200"]
format slot 16 of player with gunpowder named "&7Preleva &a500$" to close then run [make console execute command "/give %player% gunpowder 1 name:&2500$"]->[make console execute command "/eco take %player% 200"]
Up to here it's easy, but before that I want to put that gui