Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----[[ Functions ]]----
- function OS()
- term.setTextColor( colours.lime )
- print("Kersey Operating System v0.6")
- print()
- end
- ----------------
- function clear()
- term.setBackgroundColour( colours.black )
- term.setCursorPos( 1, 1 )
- term.clear()
- end
- ---------------------
- function afterClear()
- OS()
- term.setTextColor( colours.white )
- end
- --------------------
- function passColor()
- term.setBackgroundColor( colours.white )
- term.setCursorPos( 1, 1 )
- term.clear()
- OS()
- term.setTextColor( colours.blue )
- end
- -------------------
- function other()
- term.setTextColor( colours.red )
- print()
- print("ACCESS DENIED!")
- term.setTextColor( colours.blue )
- sleep(1)
- print("shutting down")
- sleep(3)
- os.shutdown()
- end
- ----------------
- function pass1()
- os.pullEvent = os.pullEventRaw
- passColor()
- pass = "Brennan Kersey"
- write("First & Last name: ")
- term.setTextColor( colours.black )
- input = read()
- if input == pass then
- else
- other()
- end
- end
- ----------------
- function pass2()
- os.pullEvent = os.pullEventRaw
- passColor()
- pass = "Cloud"
- write("Password: ")
- term.setTextColor( colours.black )
- input = read("*")
- if input == pass then
- else
- other()
- end
- end
- ----------------
- function pass3()
- os.pullEvent = os.pullEventRaw
- passColor()
- pass = "1937"
- write("PIN: ")
- term.setTextColor( colours.black )
- input = read("*")
- if input == pass then
- else
- other()
- end
- end
- ----[[ Main Program ]]----
- pass1()
- pass2()
- pass3()
- clear()
- OS()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement