Check for entity riding

REPEAT(1,10) as i {
  execute as @e[tag=rulershandid.<%i%>,limit=1] if entity @s[nbt={Passengers:      {}}] if score @s handmoves matches 10.. run block{
    say no ride
    function rulers_hand_cleanup
    } ...

It's not detecting it, am i doing this wrong

Continue to help post