Set scoreboard when player is standing on a half slab
You can use this command for that:
/execute as @a[x=8,y=66,z=-143,dx=0,dy=0,dz=0,nbt={OnGround:1b},scores={silent_realm=0}] at @s if block ~ ~ ~ minecraft:quartz_slab[type=bottom] run scoreboard players add @a silent_realm 1
This will change the score of every player if there is a quartz slab with type=bottom
and the coordinates 8 66 -143
, that they are standing on, and their score for silent_realm
is 0
If you want it to work for quartz slabs with type=top
, then you can use:
/execute as @a[x=8,y=67,z=-143,dx=0,dy=0,dz=0,nbt={OnGround:1b},scores={silent_realm=0}] at @s if block ~ ~-1 ~ minecraft:quartz_slab[type=top] run scoreboard players add @a silent_realm 1