In creating a GUI shop with a page, I tried to create a second new GUI from the first GUI, but I wrote the code because I wanted to open a third new GUI from the second GUI, but it goes from the first GUI to the third GUI. I want to know the reason.
Code:
command /foodshop:
trigger:
open chest with 6 row named "&1&lfoodshop" to player
set {_slot} to 0
loop 54 times:
set slot {_slot} of current inventory of player to black stained glass pane
add 1 to {_slot}
on inventory click:
if name of player's current inventory contains "&1&lfoodshop":
if clicked raw slot is 50:
open chest with 6 row named "&1&lfoodshop2" to player
set {_slot} to 0
loop 54 times:
set slot {_slot} of current inventory of player to black stained glass pane
add 1 to {_slot}
on inventory click:
if name of player's current inventory contains "&1&lfoodshop2":
if clicked raw slot is 50:
open chest with 6 row named "&1&lfoodshop3" to player
set {_slot} to 0
loop 54 times:
set slot {_slot} of current inventory of player to black stained glass pane
add 1 to {_slot}