How can I make a cool down for game overlays

when pressed deactivate overlay and trigger delay 5 seconds when triggerd activate game overlay