I made a Crate skript and im trying to get it so they can get a reward from the variable instead of making a long list. Any help
on right click on barrier:
if player's held item is tripwire hook:
if name of tool is "&aMiner Key":
cancel event
open virtual chest inventory with size 5 named "&aMiner Crates..." to player
format gui slot integers between 0 and 45 of player with purple stained glass pane named " " to do nothing
set {MinerCrate::%player's uuid%} to random text of "32 Cobblestone", "32 Stone", and "64 Stone"
send "&aYou got %{MinerCrate::%player's uuid%}%"
set {_reward} to {MinerCrate::%player's uuid%}
give player {_reward}
on right click on barrier:
if player's held item is tripwire hook:
if name of tool is "&aMiner Key":
cancel event
open virtual chest inventory with size 5 named "&aMiner Crates..." to player
format gui slot integers between 0 and 45 of player with purple stained glass pane named " " to do nothing
set {MinerCrate::%player's uuid%} to random text of "32 Cobblestone", "32 Stone", and "64 Stone"
send "&aYou got %{MinerCrate::%player's uuid%}%"
set {_reward} to {MinerCrate::%player's uuid%}
give player {_reward}