execute if block ~ ~ ~ minecraft:chest[facing=north] run scoreboard players set @s bw_block 940
execute if block ~ ~ ~ minecraft:chest[facing=east] run scoreboard players set @s bw_block 941
execute if block ~ ~ ~ minecraft:chest[facing=south] run scoreboard players set @s bw_block 942
execute if block ~ ~ ~ minecraft:chest[facing=west] run scoreboard players set @s bw_block 943