summon armor_stand ~1 ~ ~ {CustomName:"\"BTG2\"",Small:1,Marker:1b,Invisible:1b,Silent:1b,CustomNameVisible:0,NoGravity:1b}
summon armor_stand ~-1 ~ ~ {CustomName:"\"BTG2\"",Small:1,Marker:1b,Invisible:1b,Silent:1b,CustomNameVisible:0,NoGravity:1b}
summon armor_stand ~ ~ ~1 {CustomName:"\"BTG2\"",Small:1,Marker:1b,Invisible:1b,Silent:1b,CustomNameVisible:0,NoGravity:1b}
summon armor_stand ~ ~ ~-1 {CustomName:"\"BTG2\"",Small:1,Marker:1b,Invisible:1b,Silent:1b,CustomNameVisible:0,NoGravity:1b}
summon armor_stand ~1 ~ ~-1 {CustomName:"\"BTG2\"",Small:1,Marker:1b,Invisible:1b,Silent:1b,CustomNameVisible:0,NoGravity:1b}
summon armor_stand ~-1 ~ ~-1 {CustomName:"\"BTG2\"",Small:1,Marker:1b,Invisible:1b,Silent:1b,CustomNameVisible:0,NoGravity:1b}
summon armor_stand ~-1 ~ ~1 {CustomName:"\"BTG2\"",Small:1,Marker:1b,Invisible:1b,Silent:1b,CustomNameVisible:0,NoGravity:1b}
summon armor_stand ~1 ~ ~1 {CustomName:"\"BTG2\"",Small:1,Marker:1b,Invisible:1b,Silent:1b,CustomNameVisible:0,NoGravity:1b}
summon armor_stand ~ ~-1 ~ {CustomName:"\"BTG2\"",Small:1,Marker:1b,Invisible:1b,Silent:1b,CustomNameVisible:0,NoGravity:1b}
summon armor_stand ~ ~1 ~ {CustomName:"\"BTG2\"",Small:1,Marker:1b,Invisible:1b,Silent:1b,CustomNameVisible:0,NoGravity:1b}
tp @s @e[sort=random,name=BTG2,type=armor_stand,limit=1]
execute at @e[sort=random,limit=1,name=METEORKYU,type=armor_stand] if block ~ ~ ~ diamond_block run scoreboard players add @s BTG 1
execute at @e[distance=..3,sort=random,type=armor_stand,name=BTG2,limit=1] run fill ~ ~ ~ ~ ~ ~ iron_ore replace #suhc:stones
execute at @e[distance=..3,sort=random,type=armor_stand,name=BTG2,limit=1] run fill ~ ~ ~ ~ ~ ~ iron_ore replace #suhc:stones
execute at @e[distance=..3,sort=random,type=armor_stand,name=BTG2,limit=1] run fill ~ ~ ~ ~ ~ ~ emerald_ore replace #suhc:stones
execute at @e[distance=..3,sort=random,type=armor_stand,name=BTG2,limit=1] run fill ~ ~ ~ ~ ~ ~ emerald_ore replace #suhc:stones
execute at @e[distance=..3,sort=random,type=armor_stand,name=BTG2,limit=1] run fill ~ ~ ~ ~ ~ ~ iron_ore replace #suhc:stones
execute at @e[distance=..3,sort=random,type=armor_stand,name=BTG2,limit=1] run fill ~ ~ ~ ~ ~ ~ gold_ore replace #suhc:stones
execute at @e[distance=..3,sort=random,type=armor_stand,name=BTG2,limit=1] run fill ~ ~ ~ ~ ~ ~ gold_ore replace #suhc:stones
execute at @e[distance=..3,sort=random,type=armor_stand,name=BTG2,limit=1] run fill ~ ~ ~ ~ ~ ~ diamond_ore replace #suhc:stones
execute at @e[distance=..3,sort=random,type=armor_stand,name=BTG,limit=1] run fill ~ ~ ~ ~ ~ ~ gold_ore replace redstone_ore
kill @e[type=armor_stand,name=BTG2]
execute at @e[sort=random,limit=1,name=METEORKYU,type=armor_stand] if block ~ ~ ~ diamond_block run execute at @s run tp @s ~ ~1 ~
execute at @e[sort=random,limit=1,name=METEORKYU,type=armor_stand] if block ~ ~ ~ emerald_block run execute at @s run tp @s ~ ~-1 ~
tp @s[tag=BTGU] ~ ~.22 ~
tp @s[tag=BTGD] ~ ~-.22 ~

execute as @s[scores={BTG=40..}] run execute in overworld run data merge block 999982 122 999976 {auto:0b}
kill @s[scores={BTG=40..}]
