Custom GUI

Hello , i try to have a custom GUI in my Pause Menu wich look like this : ` static var GUIEnabled : boolean = false;
var hSliderValue : float = 10.0;
var toggleMotionBlur = true;
var noiseslider : float;
static var isoption : boolean;
var Skin : GUISkin;

function Update () {
if(Input.GetKeyDown(KeyCode.Escape)) {
GUIEnabled = !GUIEnabled;
  AudioListener.volume = hSliderValue/10.0;
  NoiseAndGrain.blackIntensity = noiseslider/10.0;

}
}

function OnGUI () {
 
if(GUIEnabled) {

GUI.skin = Skin;

GUI.Box(Rect(0,0,Screen.width,Screen.height),“”);
GUI.BeginGroup(Rect(0,0,Screen.width,Screen.height));
if (GUI.Button (Rect (500,600,200,100), “Continuer”)) {

    GUIEnabled = false;
               
     
    }

if (GUI.Button (Rect (500,500,200,100), "Options") && GUIEnabled == true ) {
     
     isoption = !isoption; 
    }

    if (GUI.Button (Rect (500,400,200,100), "Quitter")) {
    
    }

}


if(isoption)
{

GUI.skin = Skin;

hSliderValue = GUI.HorizontalSlider (Rect (2, 120, 90, 9), hSliderValue, 0.0, 10.0 );
 noiseslider = GUI.HorizontalSlider (Rect (2, 150, 90, 9), noiseslider, 0.0, 10.0 );

if (isoption && GUI.Button(Rect(700,400,100,50), "Retour")) {
isoption = false;
}

if (!GUIEnabled){
GetComponent("SmoothMouseLook").enabled = true;
Time.timeScale = 1;
GUI.EndGroup();
}

}
}`
But i have an error with the GUI : You are pushing more GUIClips than you are popping and the toggles don’t display at the right someone know how could i implement my custom GUISkin ?

Your code it too badly formatted for me to understand your code, however, you’re calling GUI.BeginGroup() and not calling GUI.EndGroup(). You have some tests around these calls, and must be changing the variable GUIEnabled somewhere between these calls.

The documentation knows how to implement a custom GUISkin.