CCCPaste

Godot Cheat Code

#Copyright Kris Occhipinti
#March 11th 2022 
#http://filmsbykris.com
#licensed under GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt
#attach this script to a node and place it in your seen

extends Node2D

var cheatstr = ""
var cheats = [ "iddqd", "idkfa"]

func _input(ev):
	if ev.is_pressed():
		var key = ev.as_text()
		#if key other then letter clear string
		if key.length() > 1:
			cheatstr = ""
		else:
			cheatstr += key.to_lower()
			for c in cheats:
				if c in cheatstr:
					cheat(c)

func cheat(c):
	cheatstr = ""
	print(c + " found!!!")
	if c == "iddqd":
		print("god mode")
		
	if c == "idkfa":
		print("all weapons, full ammo, and all the keys")