- Edited
Check for input events (key presses, clicks in certain locations, etc.), and activate the cheat if the correct inputs are received.
Reference:
https://docs.godotengine.org/en/4.2/tutorials/inputs/input_examples.html
If the cheat code is, for example, "iamtheone", you could start a 15-second Timer if an "i" is entered, and then accumulate additional key presses in a buffer until the buffer contains "iamtheone" (activate the cheat) or the Timer finishes (clear the buffer).
Another approach: When a specific sequence of locations are clicked within a time interval, pop up a LineEdit for entry of the cheat code.