Hi Stanislav,
here is the script, it takes 1 midinote from 1 channel to retrigger all currently sounding internal notes. The trigger channel is muted. I did explicitly not mute all external channels, so you have to take care of midiloops yourself. First lets see whether this works for you.