Help with soundboard code

I have just started to make a soundboard and have seen on other ones that they have it so if you press the space bar all the sounds will stop playing. I was wondering if anyone knew how to do this. If you could help me it would be greatly appreciated.