Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Kai's heart.break OS
- var version = "1.1"
- # *** PROGRAM NOTES ***
- #This is the lighter, faster version.
- #For immersion purposes, it has fewer
- #programs in the directory.
- #Default password is still "pingas"
- #If you assigned another "OS Password"
- #memory, it will still be there.
- # *** SYSTEM REQUIREMENTS ***
- #Required APIs:
- #EnableAPI("internet")
- #EnableAPI("memory")
- #SetMhz(30)
- #Install these codes into a screwdriver and use
- #it on the PC you wish to install this OS into.
- # *** PATCH NOTES***
- #Version 1.0: release as a light version
- #Version 1.1: Re-release with password function.
- # *** SECURE STARTUP ***
- #Cleans the screen and connections.
- #Adds user variable for the secure user check.
- var user = GetUser()
- # *** CHANGEABLE PASSWORD SYSTEM ***
- #Checks if a password has been assigned.
- #If there is no password, uses the default.
- If HasMemory("OS Password") == false
- SaveMemory("OS Password", "pingas")
- end
- var password()
- LoadMemory("OS Password")
- end
- DisconnectAll()
- ClearText()
- #User Check! This OS quits for anyone but Sebastian.
- #System if argument 1. Must be ended last.
- #The addition of sound and an extra wait per program
- #gives the illusion of a boot up time.
- if user == "Sebastian"
- PlaySound("ComputerSound 2")
- Print("Booting...")
- Sleep(1)
- Print("Loading slurp...")
- Sleep(0.92)
- Print("Loading net directory...")
- Sleep(0.3)
- Print("Loading recharge...")
- Sleep(0.51)
- Print("Loading bedtime...")
- Sleep(0.1)
- Print("Loading pass...")
- Sleep(0.63)
- Print("Done!")
- PlaySound("Coin 2")
- Sleep(0.25)
- #Password check if argument, number 2.
- #If argument 2 must be ended before argument 1.
- #Features a loop for a retry feature.
- #Loop must be ended after the if else.
- loop
- # *** BOOT SECTION ***
- ClearText()
- PlaySound("Coin 2")
- Print("KaiOSLite")
- Print("OS Version: " + version)
- Print("")
- Print("Username: " + user)
- var try = Input("Password: ")
- if try == password()
- Print("Log in successful!")
- Print("Type command or dir for a list")
- Print("of all available programs!")
- Print("")
- # *** OPERATING SYSTEM FUNCTIONS ***
- #After a program is run, the system returns to the
- #command prompt for another program.
- loop
- #The input provides the illusion of a file system.
- string cmd = Input("run C:/")
- #Provides a list of programs, to be updated as new
- #functionality is added.
- if cmd == "dir"
- ClearText()
- Print("Directory:")
- Sleep(0.1)
- Print(" - slurp, teleport")
- Sleep(0.1)
- Print(" - recharge, restore stats")
- Sleep(0.1)
- Print(" - bedtime, become sleepy")
- Sleep(0.1)
- Print(" - pass, change password")
- else if cmd == "slurp"
- #The slurp command, with clean connection list.
- #This one is for casual slurps.
- ClearText()
- Print("See ya!")
- PlaySound("ComputerSound 3")
- DisconnectAll()
- Connect("DesolateHouseLobby_TriPodComputer_TriPodComputer_1")
- Connect("Lodge_Room1_ModernComputer_1")
- Connect("Cafe_Exterior_CurcuitLocker_3")
- Connect("HarborNorth_CurcuitLocker_1")
- Connect("SICP")
- Sleep(0.5)
- Slurp()
- else if cmd == "recharge"
- #Command performs the stat restore effect.
- #The light version only applies to
- #fatigue and corruption.
- ClearText()
- var h = Connect("Heart")
- h.SetNumericData(user,"sleepiness",0)
- h.SetNumericData(user,"corruption",0)
- Print("Body recharged and restored!")
- PlaySound("Coin 2")
- else if cmd == "bedtime"
- #Program literally just makes you sleepy enough
- #to sleep through the night.
- var h = Connect("Heart")
- ClearText()
- h.SetNumericData(user,"sleepiness",90)
- Print("Drowsiness administered!")
- else if cmd == "pass"
- SaveMemory("OS Password",Input("New password: "))
- PlaySound("Coin 2")
- Print("New password saved: " + LoadMemory("OS Password"))
- #========================================
- #Program list divider.
- #The following calls whenever
- #the input does not match
- #any given program names.
- #========================================
- else
- #The default end of the input check.
- #Notes the error and offers help.
- ClearText()
- Print("Invalid command!")
- Sleep(0.1)
- Print("")
- Sleep(0.1)
- Print("Type command or type dir for a list")
- Sleep(0.1)
- Print("of all available programs!")
- Sleep(0.1)
- Print("")
- Sleep(0.1)
- #End of program list.
- end
- #End of command prompt loop.
- end
- # *** PASSWORD RETRY LOOP ***
- #This code will have the process start over.
- else
- Print("Wrong password!")
- Sleep(0.75)
- #if argument end
- end
- #Operating system loop end
- #Putting the OS on a loop lets
- #the password prompt start over
- #over again in the even of an
- #incorrect password.
- end
- # *** SECURITY DENIAL CODE ***
- #This code will loop on an else.
- else
- ClearText()
- Print("You are not an authorized user of")
- Print("this system! Lockout, sucker!")
- Sleep(3)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement