Guest User

Untitled

a guest
Oct 21st, 2025
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.01 KB | None | 0 0
  1. print("Booting...")
  2.  
  3. from GCC import (
  4.     INIT_GC,
  5.     esc
  6. )
  7. from time import sleep
  8. from os import system
  9. INIT_GC()
  10. #sleep(2)                    # pyright: ignore[reportUndefinedVariable]
  11. esc()
  12.  
  13. #sleep(2)                    # pyright: ignore[reportUndefinedVariable]
  14. #run_main()
  15. #sleep(9999)                    # pyright: ignore[reportUndefinedVariable]
  16.  
  17.  
  18. # Main.py
  19.  
  20. system('cls')
  21. print("STARING YR-SHELL...")
  22. #sleep(4)
  23. #  def start
  24. global lastC
  25. global prelastC
  26. global preprelastC
  27. global prepreprelastC
  28. global preprepreprelastC
  29. preprepreprelastC = ""
  30. prepreprelastC = ""
  31. preprelastC = ""
  32. prelastC = ""
  33. lastC = ""
  34. helpact = ["yes", "no", "why", "hey", ":(", "huh"]
  35. RAM = ["","","","",""]
  36. OSI = ["YR-DOS",".BB1","1.0"]
  37. D = "R:\\"
  38. coms = ["cls","ping","pong", "exit", "exit dos", "help"]
  39. class C():
  40.     def Decode(A):
  41.         if A[:3] == ".BB":
  42.             RAM[0] = A[3:]
  43.             if RAM[0] == "1":
  44.                 return True
  45.             else:
  46.                 return False
  47.         else:
  48.             return
  49.         esc()
  50.     def cls():
  51.         system('cls')
  52.     def ping():
  53.         print("Pong!")
  54.     def pong():
  55.         print("Ping!")
  56.     def stop():
  57.         for i in range(len(RAM)): RAM[i] = ""
  58.         exit()
  59.     def ver():
  60.         print(OSI[0] + " " + OSI[2])
  61.         esc()
  62.     def pausekey():
  63.         system('pause >nul')
  64.     def unknown():
  65.         print("Unknown Command or Filename!")
  66.     def ask(doask):
  67.         if doask:
  68.             return input(D + ">")
  69.         else:
  70.             return
  71.     def check(x):
  72.         global lastC
  73.         global prelastC
  74.         global preprelastC
  75.         global prepreprelastC
  76.         global preprepreprelastC
  77.         if x in ["", " "]: esc()
  78.         elif x == "cls": C.cls()
  79.         elif x == "ping": C.ping()
  80.         elif x == "pong": C.pong()
  81.         elif x == "ver": C.ver()
  82.         elif x == "exit": print(" Exit What?")
  83.         elif x[:5] == "exit " and x != "exit dos": print(" What the %&@! are you trying to exit!?")
  84.         elif x == "exit dos": C.stop()
  85.         elif x[:4] == "help" and lastC.startswith("exit") and not prelastC.startswith("exit") and not preprelastC.startswith("exit") and not prepreprelastC.startswith("exit"): print("try to exit dos")
  86.         elif x[:4] == "help" and lastC.startswith("help")  and prelastC.startswith("exit"): print("more help? try to TYPE     exit dos")
  87.         elif x[:4] == "help" and lastC.startswith("exit") and prelastC.startswith("help"): print("more help? try to TYPE     exit dos")
  88.         elif x[:4] == "help" and lastC.startswith("help")  and prelastC.startswith("help") and preprelastC.startswith("exit"): print("dont you understand now?")
  89.         elif x[:4] == "help" or x[:3] == "huh" or x[:2] == "no" or x[:2] == ":(" and lastC.startswith("help")  and prelastC.startswith("help") and preprelastC.startswith("help"): print("welp, you are the problem...  YOU IDIOT!")
  90.         elif x[:4] == "help" or x[:3] == "huh" or x[:3] == "why" or x[:3] == "hey" or x in helpact and lastC.startswith("help")  and prelastC.startswith("help") and preprelastC.startswith("help") and prepreprelastC.startswith("help"): print(" HAVE YOU EVEN EVER USED A DOS BEFORE!?")
  91.         elif x[:3] == "yes" or x[:1] == "y" and lastC in helpact  and prelastC in helpact and preprelastC.startswith("help") and preprepreprelastC == "help": print(" ok, then sry that this one is weird. ")
  92.         elif x[:3] == "no" or x[:1] == "n" and lastC in helpact  and prelastC in helpact and preprelastC.startswith("help") and preprepreprelastC == "help": print(" then learn to use one! ")
  93.         elif x == "pause": C.pausekey()
  94.         elif x == "help" and not lastC[:4] == "exit": print("idk what you need help with")
  95.         elif x not in coms: C.unknown()
  96.         else: print("IDK WHAT TO DO!\n")
  97.        
  98.         preprepreprelastC = prepreprelastC
  99.         prepreprelastC = preprelastC
  100.         preprelastC = prelastC
  101.         prelastC = lastC
  102.         lastC = x
  103.  
  104. # def end
  105.  
  106. print("\n")
  107. while(True):
  108.     C.check(C.ask(C.Decode(OSI[1][:4])))
Add Comment
Please, Sign In to add comment