Can someone help me find example script for toggle on/off multiple group.
Controlling multiple groups is usually best done with scenes. If you tell us what you are trying to accomplish we may be better able to help.