Pause Play and Replay buttons?

I made the buttons activated by mouse click, but they are triggered no matter where I click, not just on the buttons, so I made it so they were triggered by P for pause, R for resume and left arrow for replay. However, once the game was paused it could not be resumed. Any suggestions?

The mouse click behavior should have a checkbox for capturing clicks anywhere on the screen - try turning that off.