Problem with pausing/ unpausing game

And where do I connect the ‘set’ node to? I mean where to place the node?
flipflop node would work, but I have to check whether the widget is shown or not and I can achieve that with a isValid node.