How to make a gui slider that can effect sound?

I have no idea how to start with gui. Should I make a 3d gui slider somehow? I just need the script to make one that can lower and raise the music in the game.

var soundVolume: float;

soundVolume = GUI.HorizontalSlider (Rect (halfScreenWidth - 195, halfScreenHeight - 100, 100, 30), soundVolume, 0.0, 1.0);

Since volume on audio can only go up to 1, thats as far as the slider can go.
you have to put this in a gui funcion like: function OnGUI() {Code In Here}

(Edit)-----------------------------------------------------------------------------------

This will make a the soundVolume be equal to a ceartain amount, so put soundVolume where the volume of audio is:

audio.PlayOneShot(sound, soundVolume);

sound is the variable that contains the sound that i/you want to play