How to change the health and shield of all players without changing their teams

Hey Thomas!
This Script worked perfect for me on my map. Thank you so much.

Would it be possible for you to adapt the code so that I can use a trigger instead of the button?

Thank you