``# Command to open the crate menu
command /opencrate:
trigger:
open chest with 1 row named "&bCrate Menu" to player
format slot 2 of player with red shulker box named "&cComing Soon" with lore "&7This crate is not available yet." to do nothing
format slot 4 of player with green shulker box named "&e&lDaily Crate" with lore "&7Click to open your Daily Crate!" to run:
if player has 1 tripwire hook named "&e&lDaily Key":
remove 1 tripwire hook named "&e&lDaily Key" from player
open chest with 3 rows named "&eDaily Crate" to player
loop {dailyLoot::*}:
format slot (loop-index - 1) of player with loop-value to be taken
else:
send "&cYou need a &e&lDaily Key &cto open this crate!" to player
format slot 6 of player with red shulker box named "&cComing Soon" with lore "&7This crate is not available yet." to do nothing
Command to set loot for the daily crate
command /lootdaily:
permission: op
trigger:
open chest with 3 rows named "&cSet Daily Crate Loot" to player
on inventory close:
if name of player's current inventory is "&cSet Daily Crate Loot":
clear {dailyLoot::*}
loop 27 times:
if slot (loop-number - 1) of player's current inventory is not air:
set {dailyLoot::%loop-number%} to slot (loop-number - 1) of player's current inventory
send "&aDaily crate loot has been updated!" to player
Command to give a player a Daily Key
command /givekey [<player>]:
permission: op
trigger:
give a tripwire hook named "&e&lDaily Key" to arg-1
send "&aYou have received a &e&lDaily Key" to arg-1
``