Drawing a GUI box by specifying the two corners

Hi, everyone. I was wondering if it was possible to draw a gui box by specifying the top left and bottom right corners. I am trying to make a selection box but it isn't working, because the mouse y gets inverted. Any help is appreciated!!! :)

Use Event.current.mousePosition in OnGUI functions, not Input.mousePosition.