Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Load AI Image
- bGround = paintutils.loadImage(".AI")
- --Stop Termination
- os.pullEvent = os.pullEventRaw
- --Clear Terminal
- function loadAI()
- paintutils.drawImage(bGround,18,2)
- end
- function logIn()
- term.clear()
- term.setTextColor(colors.white)
- paintutils.drawImage(bGround,18,2)
- term.setCursorPos(1,1)
- print("Please Login")
- term.setCursorPos(1,2)
- term.write("Username : ")
- user = read()
- term.setCursorPos(1,3)
- term.write("Password : ")
- pass = read("*")
- --Verify
- term.setCursorPos(1,4)
- textutils.slowPrint("Verifying Information...")
- sleep(2)
- end
- logIn()
- function Verify()
- if (user == "Kami") or (user == "Delloga") then
- if (pass == "4793") then
- term.clear()
- paintutils.drawImage(bGround,18,2)
- term.setCursorPos(15,10)
- term.setTextColor(colors.lime)
- textutils.slowPrint("WELCOME MASTER")
- sleep(2)
- else
- term.clear()
- paintutils.drawImage(bGround,18,2)
- term.setCursorPos(15,10)
- term.setTextColor(colors.red)
- textutils.slowPrint("WRONG PASSWORD")
- sleep(2)
- logIn()
- end
- else
- term.clear()
- paintutils.drawImage(bGround,18,2)
- term.setCursorPos(15,10)
- term.setTextColor(colors.red)
- textutils.slowPrint("WRONG USERNAME")
- sleep(2)
- logIn()
- end
- end
- Verify()
- --Mainmenu
- function mainMenu()
- term.clear()
- Commands()
- end
- --Commands
- function Commands()
- term.clear()
- loadAI()
- term.setTextColor(colors.pink)
- term.setCursorPos(1,1)
- textutils.slowPrint("WHAT ARE WE GOING TO DO TODAY, MASTER?")
- term.setTextColor(colors.white)
- local optn = read()
- if (optn == "Programs") or (optn == "programs") then
- term.clear()
- loadAI()
- term.setCursorPos(1,1)
- term.setTextColor(colors.pink)
- textutils.slowPrint("HERE IS A LIST OF AVAILABLE PROGRAMS")
- term.setCursorPos(1,2)
- print("------------------------------------")
- term.setCursorPos(1,3)
- term.setTextColor(colors.blue)
- print("Lights --- Toggles the lights on or off.")
- print("Danger --- Locks down all doors.")
- print("Back --- Brings you back to the main menu.")
- print("Logout --- Logs the current user out.")
- print("Programs --- Prints a list of available programs.")
- term.setTextColor(colors.pink)
- print("------------------------------------")
- sleep(10)
- Commands()
- elseif (optn == "Back") or (optn == "back") then
- Commands()
- elseif (optn == "Logout") or (optn == "logout") then
- term.clear()
- loadAI()
- term.setTextColor(colors.pink)
- term.setCursorPos(2,10)
- textutils.slowPrint("I AM NOW LOGGING YOU OUT, MASTER.")
- sleep(2)
- term.clear()
- loadAI()
- term.setCursorPos(10,10)
- term.setTextColor(colors.pink)
- textutils.slowPrint("ITTERASSHAI GOSHUJINSAMA!")
- sleep(2)
- logIn()
- elseif (optn == "Lights") or (optn == "lights") then
- term.clear()
- loadAI()
- term.setTextColor(colors.pink)
- term.setCursorPos(1,1)
- textutils.slowPrint("I WILL NOW TURN THE LIGHTS OFF...")
- sleep(3)
- term.setCursorPos(1,5)
- textutils.slowPrint("LIGHTS HAVE BEEN TURNED OFF.")
- sleep(2)
- Commands()
- elseif (optn == "Danger") or (optn == "danger") then
- term.clear()
- loadAI()
- term.setTextColor(colors.red)
- term.setCursorPos(1,1)
- textutils.slowPrint("LABORATORY NOW GOING INTO QUARANTINE...")
- sleep(1)
- term.clear()
- loadAI()
- sleep(1)
- term.setCursorPos(1,1)
- print("LABORATORY NOW GOING INTO QUARANTINE...")
- sleep(1)
- term.clear()
- loadAI()
- sleep(1)
- term.setCursorPos(1,1)
- print("LABORATORY NOW GOING INTO QUARANTINE...")
- sleep(3)
- term.setCursorPos(1,3)
- term.setTextColor(colors.pink)
- textutils.slowPint("TO UNLOCK THE DOORS")
- term.setCursorPos(1,4)
- textutils.slowPrint("PRESS")
- term.setTextColor(colors.blue)
- term.setCursorPos(6,4)
- textutils.slowPrint("ENTER")
- term.setTextColor(colors.white)
- local enterKey = read()
- if (enterKey == " ") or (enterKey == " ") then
- term.setTextColor(colors.pink)
- term.setCursorPos(1,6)
- textutils.slowPrint("NOW UNLOCKING ALL DOORS")
- sleep(3)
- term.setCursorPos(1,8)
- textutils.slowPrint("NOW RETURNING TO MAIN MENU...")
- sleep(3)
- Commands()
- else
- term.setTextColor(colors.pink)
- term.setCursorPos(1,6)
- textutils.slowPrint("NOW UNLOCKING ALL DOORS")
- sleep(3)
- term.setCursorPos(1,8)
- textutils.slowPrint("NOW RETURNING TO MAIN MENU...")
- sleep(3)
- Commands()
- end
- else
- term.clear()
- loadAI()
- term.setTextColor(colors.pink)
- term.setCursorPos(1,1)
- textutils.slowPrint("NO PROGRAM CALLED "..optn.." FOUND")
- term.setCursorPos(1,2)
- textutils.slowPrint("MASTER, PLEASE TRY THE KEYWORD:")
- term.setTextColor(colors.blue)
- term.setCursorPos(1,3)
- textutils.slowPrint("PROGRAMS")
- sleep(5)
- Commands()
- end
- end
- mainMenu()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement