Use nemo's suggestion or store them at a global variable.
If you use a global variable, instead of setting boolean (as a global can only be number or text), you'll use a ternary operator to toggle the variable.
global variable pause = 0; //0 = false, so game starts NOT paused
On P pressed: Set pause to (pause = 0 ? 1 : 0)
English is not my native language. Sorry for any mistakes and feel free to correct me if needed.