Yes, #group on goes above the triggering event. And #group end goes at the bottom of the triggering script.

Example:
Code:
#group on
on *:Text:*Hello*:?: {
  msg $nick Hello back at you. 
}
#group end