so im making a crypto system that randomizes the prize every 20 minutes, heres the code:
trigger:
set {_crypto} to chest inventory with 2 rows named "&9&lCrypto"
set slot 2 of {_crypto} to sunflower named "&a&lBuy &6&lBitcoin" with lore "&7Price: %{bitcoin.price}%"
set slot 11 of {_crypto} to sunflower named "&c&lSell &6&lBitcoin" with lore "&7Sell for: %{bitcoin.price}%"
open {_crypto} to player
stop
every 20 minutes:
set {bitcoin.price} to random integer between 1 and 64
set {ethereum.price} to random integer between 1 and 64
broadcast "&9Crypto &8» &9The prices changed!"
on inventory click:
if event-inventory's name is "&9&lCrypto":
cancel event
stop
if index of event-slot is 2:
if player's inventory contains {bitcoin.price} of netherite block named "&e&lCompressed Netherite": #<-- ERROR
remove {bitcoin.price} netherite blocks named "&e&lCompressed #<-- ERRORNetherite" from player's inventory
add 1 to {bitcoin.%player%}
play sound "block.note_block.pling" with volume 0.5 and pitch 2 to player
stop
if index of event-slot is 11:
if {bitcoin.%player%} is more than 0:
remove 1 from {bitcoin.%player%}
loop {bitcoin.price} times:
drop netherite block named "&e&lCompressed Netherite" at location of player
play sound "block.note_block.pling" with volume 0.5 and pitch 1.2 to player
stop```