A small example of volume options that could be used in a Scratch game. Drag the sliders to change the volume. You may copy the sprites and such into your project, or look at the scripts to see how it was done. Note that you will not only need the sliders, but a "Speaker" sprite (which can be the sliders if you want). This is because the "set volume" block only works for sounds that are played from the same sprite as the volume.
Music and Sound are from Counter-Strike: Condition Zero If you use this project, credit is not needed, though appreciated. I think projects should start to use this feature because often I find that the sound in a game is louder than I'd prefer, and I end up having to change my computer volume (which is already almost as low as possible).