You can modify the on QUIT event that you have in your script, so that it would send the random message.