Forge Scripting Help

I was wondering if anyone knows how to script sounds to spawn on interaction with a keypad and despawn after a set time?