Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Booting...")
- from GCC import (
- INIT_GC,
- esc
- )
- from time import sleep
- from os import system
- INIT_GC()
- #sleep(2) # pyright: ignore[reportUndefinedVariable]
- esc()
- #sleep(2) # pyright: ignore[reportUndefinedVariable]
- #run_main()
- #sleep(9999) # pyright: ignore[reportUndefinedVariable]
- # Main.py
- system('cls')
- print("STARING YR-SHELL...")
- #sleep(4)
- # def start
- global lastC
- global prelastC
- global preprelastC
- global prepreprelastC
- global preprepreprelastC
- preprepreprelastC = ""
- prepreprelastC = ""
- preprelastC = ""
- prelastC = ""
- lastC = ""
- helpact = ["yes", "no", "why", "hey", ":(", "huh"]
- RAM = ["","","","",""]
- OSI = ["YR-DOS",".BB1","1.0"]
- D = "R:\\"
- coms = ["cls","ping","pong", "exit", "exit dos", "help"]
- class C():
- def Decode(A):
- if A[:3] == ".BB":
- RAM[0] = A[3:]
- if RAM[0] == "1":
- return True
- else:
- return False
- else:
- return
- esc()
- def cls():
- system('cls')
- def ping():
- print("Pong!")
- def pong():
- print("Ping!")
- def stop():
- for i in range(len(RAM)): RAM[i] = ""
- exit()
- def ver():
- print(OSI[0] + " " + OSI[2])
- esc()
- def pausekey():
- system('pause >nul')
- def unknown():
- print("Unknown Command or Filename!")
- def ask(doask):
- if doask:
- return input(D + ">")
- else:
- return
- def check(x):
- global lastC
- global prelastC
- global preprelastC
- global prepreprelastC
- global preprepreprelastC
- if x in ["", " "]: esc()
- elif x == "cls": C.cls()
- elif x == "ping": C.ping()
- elif x == "pong": C.pong()
- elif x == "ver": C.ver()
- elif x == "exit": print(" Exit What?")
- elif x[:5] == "exit " and x != "exit dos": print(" What the %&@! are you trying to exit!?")
- elif x == "exit dos": C.stop()
- 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")
- elif x[:4] == "help" and lastC.startswith("help") and prelastC.startswith("exit"): print("more help? try to TYPE exit dos")
- elif x[:4] == "help" and lastC.startswith("exit") and prelastC.startswith("help"): print("more help? try to TYPE exit dos")
- elif x[:4] == "help" and lastC.startswith("help") and prelastC.startswith("help") and preprelastC.startswith("exit"): print("dont you understand now?")
- 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!")
- 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!?")
- 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. ")
- 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! ")
- elif x == "pause": C.pausekey()
- elif x == "help" and not lastC[:4] == "exit": print("idk what you need help with")
- elif x not in coms: C.unknown()
- else: print("IDK WHAT TO DO!\n")
- preprepreprelastC = prepreprelastC
- prepreprelastC = preprelastC
- preprelastC = prelastC
- prelastC = lastC
- lastC = x
- # def end
- print("\n")
- while(True):
- C.check(C.ask(C.Decode(OSI[1][:4])))
Add Comment
Please, Sign In to add comment