moving GUI in C#

ok so i have a script and it goes like this

    void Start() {
    chatWindow = new Rect(Screen.width -298, Screen.height -158);
}

this is to make sure it fits .what would i add so i could move the chat box on the x and y axis, b

If you mean "how do you make a draggable window"

First, your Rectangle numbers look like non-sense. It should be

`new Rect`(distance of left edge of window from left edge of screen, distance of top edge of window from top edge of screen, window width, window height)

Then you need something like

void OnGUI()
{
    chatWindow = GUILayout.Window(0, chatWindow, WinFunc, "Chat Window");
}

void WinFunc(int windowID)
{
    // THE DRAWING CODE FOR THE CONTENTS OF YOUR CHAT WINDOW GOES HERE 

    GUI.DragWindow();
}