Right click, gui.box appears at mouse position, freezed?

I have this code. I’m trying to make it like runescape, you right click, and a drop down menu appears, with option for where you rightclicked. It works! All I need it to do, is not follow the mouse cursor after it’s been right clicked! Any ideas?

#pragma strict

var hit : RaycastHit;

var RightClickTrue = false;

var shopOpen : boolean = false;
 
 //
 var boxOpen: boolean = false;
var boxPos: Vector3;
 //
function OnGUI () {
 
 
if(shopOpen == true) {
 GUI.Box(ResizeGUI(Rect(350,350,50,50)), "General Shop");
       
}

if(RightClickTrue == true) {

}
 
 
    if (boxOpen == true) {
        GUI.Box (Rect (boxPos.x,boxPos.y,120,120), ""); 
 
 }
 
 if (RightClickTrue == true) {
                       boxPos.x = Input.mousePosition.x;
        boxPos.y = Screen.height - Input.mousePosition.y;
        boxOpen = true;
                       }
}
 
 
 
 
 
 
 
 
function Update () {
 
 
if(Input.GetMouseButtonDown(1) &&
       collider.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), hit,
                        Mathf.Infinity)) {
                       
                       
                       
          
        RightClickTrue = true;            
       }                
}



function ResizeGUI(_rect : Rect) : Rect {

    var FilScreenWidth = _rect.width / 800;
    var rectWidth = FilScreenWidth * Screen.width;
    var FilScreenHeight = _rect.height / 600;
    var rectHeight = FilScreenHeight * Screen.height;
    var rectX = (_rect.x / 800) * Screen.width;
    var rectY = (_rect.y / 600) * Screen.height;
 
    return Rect(rectX,rectY,rectWidth,rectHeight);
}

Use another variable;

if(!RightClickTrue){
mousePos = Input.mousePosition;
} else {
boxPos = mousePos;
}