execute if block ~ ~ ~ minecraft:birch_slab[type=top] run scoreboard players set @s bw_block 512
execute if block ~ ~ ~ minecraft:birch_slab[type=bottom] run scoreboard players set @s bw_block 513
execute if block ~ ~ ~ minecraft:birch_slab[type=double] run scoreboard players set @s bw_block 514