How can I change Screen Resolution and Quality Settings at runtime?

Hello. I am wanting to put a options button and it leads to a GUI. What command can I use? Something like resolution and quality.

EDIT: I mean like I already have a button but I need a code line that will change the resoulution and quality settings. I KNOW HOW TO USE GUI. I WANT TO KNOW HOW TO CHANGE RESOLUTION AND QUALITY SETTINGS IN GAME.

Check out Screen for resolutions.

Check out QualitySettings for Quality options.

Here
bool inWindow = false;
Screen.SetResolution(newWidth, newHeight, inWindow);