unity – How do I change a flag(Boolean) on all objects even if its false on one object?

Lets say I have a script on 10 game objects that checks whenever the rigibody2d is moving they disable the script (controller one) and when the rigidbody2d.magnitude==0 they enable that script.
Code is like:

if (rb.velocity.magnitude > 0.01)


Problem is this script is on all rigid bodies lets say about 10. If one is moving the other 9 are stopped so it will keep the scripts enabled and the script wont work as I want it to. I want them to be disabled even if 1 or even if all of them are moving and only work when all rigibodies are stopped.