Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw()
- term.clear()
- term.setCursorPos(1,1)
- value = "4Q$p`?WpvF"
- user = "TekCastPork"
- locked == false
- code = "31415926"
- function startup()
- os.pullEvent = os.pullEventRaw
- print("||||||[PorkCo Door Systems]||||||")
- term.setCursorPos(1,3)
- print("Gathering Startup files....")
- print("Running Startup Scripts....")
- print("Gathering Configurations...")
- print("Loading OS files...........")
- print("Gathering OS Settings......")
- term.setCursorPos(29,3)
- sleep(1)
- print("Complete")
- term.setCursorPos(29,4)
- sleep(1.5)
- print("Complete")
- term.setCursorPos(29,5)
- sleep(1)
- print("Complete")
- term.setCursorPos(29,6)
- sleep(2)
- print("Complete")
- term.setCursorPos(29,7)
- sleep(2.5)
- print("Complete")
- term.setCursorPos(1,9)
- print("Startup Complete! Loading UI...")
- sleep(2)
- term.clear()
- term.setCursorPos(1,1)
- end
- function mainLoop()
- while true do
- os.pullEvent = os.pullEventRaw
- print("||||||[PorkCo Door Systems]||||||")
- term.setCursorPos(1,3)
- print("Login UI.")
- print("Username: ")
- user1 = read()
- print("Password: ")
- pass1 = read("*")
- if (user1 == user) then
- print("Attempting to login using provided ID.")
- sleep(1)
- if (pass1 == value) then
- term.clear()
- term.setCursorPos(1,1)
- print("Success! Welcome TekCastPork.")
- sleep(1)
- while (allowed == 0) do
- print("What do you wish to do?")
- print("Possible Commands:")
- print("OpenDoor LockDoor
- CloseDoor UnlockDoor
- Logout Shutdown")
- command = read()
- if(command == "OpenDoor") then
- print("Opening The Door...")
- if (locked == true) then
- print("Warning! The door is locked!")
- print("Please input the lock code.")
- code = read("*")
- end
- else
- print("Attempting to login using provided ID.")
- sleep(5)
- print("Provided ID not found!")
- sleep(0.5)
- print("Goodbye.")
- sleep(1)
- os.shutdown()
- end
- end
- end
- startup()
- mainLoop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement