
execute store result score #Global random run random value 1..5
execute if score #Global random matches 2 run function template:tohth/diamonds
execute if score #Global random matches 5 run function template:tohth/gold
execute if score #Global random matches 1 run function template:tohth/emerald
execute if score #Global random matches 6 run function template:tohth/trip
advancement revoke @s only template:use_tohth
schedule function template:tohth/give_stand_back 10t