Advertisement
metalx1000

Godot Cheat Code

Mar 11th, 2022
3,746
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Copyright Kris Occhipinti
  2. #March 11th 2022
  3. #http://filmsbykris.com
  4. #licensed under GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt
  5. #attach this script to a node and place it in your seen
  6.  
  7. extends Node2D
  8.  
  9. var cheatstr = ""
  10. var cheats = [ "iddqd", "idkfa"]
  11.  
  12. func _input(ev):
  13.     if ev.is_pressed():
  14.         var key = ev.as_text()
  15.         #if key other then letter clear string
  16.         if key.length() > 1:
  17.             cheatstr = ""
  18.         else:
  19.             cheatstr += key.to_lower()
  20.             for c in cheats:
  21.                 if c in cheatstr:
  22.                     cheat(c)
  23.  
  24. func cheat(c):
  25.     cheatstr = ""
  26.     print(c + " found!!!")
  27.     if c == "iddqd":
  28.         print("god mode")
  29.        
  30.     if c == "idkfa":
  31.         print("all weapons, full ammo, and all the keys")
  32.    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement