Correct! Bit more to it because of the "is pressed", since this will trigger the unpause event too as that will also be checking for "is pressed" and is also checking for isPaused = 1 which was set in the pause event. So we need another variable canpauseUnpause. Same kind of thing though.
global isPaused = 0
global canPauseUnpause = 1
+ every tick
-> set canPauseUnpause = 1
+ if pausedkey is pressed
+ if isPaused = 0
+ if canPauseUnpause = 1
-> set isPaused = 1
-> set timescale to 0
-> set canPauseUnpause = 0
+ if pausedkey is pressed
+ if isPaused = 1
+ if canPauseUnpause = 1
-> set isPaused = 0
-> set timescale to 1
-> set canPauseUnpause = 0
pausedkey being whatever key you assign to be the pause key.