All you need to do is place a button at the start of the OnGUI call which will toggle the paused state
function OnGUI(){
if(!paused){
if(GUILayout.Button("Pause Game"))
{
paused = true;
}
}else{
if(GUILayout.Button("Resume Game"))
{
paused = false;
}
}
...
Sorry if syntax is a bit off i usually do this is C# :)
You will need to do the formatting to place the button in the right place, but that depends on your game layout
Hope this helps