Code:
command /shop:
trigger:
open virtual chest with size 3 named "&9Shop" to player
wait 1 tick
set {_slot} to 0
loop 27 times:
format gui slot {_slot} of player with random element out of {backgrounds::*} named " "
add 1 to {_slot}
format gui slot 10 of player with leather helmet named "&cComing Soon." with lore "&cComing Soon" to run:
open virtual chest named "&9&lArmor" to player
wait 1 tick
command /warps:
trigger:
open virtual chest with size 3 named "&9Warps" to player
wait 1 tick
set {_slot} to 0
set {builds} to location at -2.5, 4, -28 in world "build"
loop 100 times:
slot 10 is grass block
loop 27 times:
if {_slot} is 10:
add 1 to {_slot}
format gui slot 10 of player with grass block named "&9Builds" to run:
teleport player to {builds}
format gui slot {_slot} of player with random element out of {backgrounds::*} named " "
add 1 to {_slot}
if {_slot} is 27:
set {_slot} to 0
wait 1 seconds
Basically, I was trying to make a shop and I have this command and when I try and open the shop, this loop overwrites the gui, so you have to wait a while before opening the shop, and it's becoming a huge issue when you try and work on them. Any ideas on how to stop the loop? I know you can stop loops and stuff but yeah dunno. I tried to make it so if slot 10 was a grass block, but I don't know how. I tried to research the main issue but couldn't find anyone with the issue.