I'm not accustomed to the terminology, "detent button". I assume that you are referring to "toggle" switches? At any rate, you wouldn't exactly be resetting any buttons with this script, but the tags attached to the button animations.
This could be accomplished in any number of ways, depending upon which event you would like to have trigger the script. Either way, the script for doing this is quite simple:
DetentPushbuttonTagA = 0;
DetentPushbuttonTagB = 0;
DetentPushbuttonTagC = 0;
etc...