execute if block ~ ~ ~ minecraft:purple_glazed_terracotta[facing=north] run scoreboard players set @s bw_block 799
execute if block ~ ~ ~ minecraft:purple_glazed_terracotta[facing=east] run scoreboard players set @s bw_block 800
execute if block ~ ~ ~ minecraft:purple_glazed_terracotta[facing=south] run scoreboard players set @s bw_block 801
execute if block ~ ~ ~ minecraft:purple_glazed_terracotta[facing=west] run scoreboard players set @s bw_block 802