Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --FUNCTIONS
- function clearScreen(x,y)
- term.clear()
- term.setCursorPos(x,y)
- end
- function printCenter(str, ypos, mode)
- local w,h = term.getSize()
- term.setCursorPos(w/2 - #str/2, ypos)
- if mode == "s" then
- textutils.slowPrint(str)
- elseif mode == "f" then
- print(str)
- end
- end
- i = 3
- function ReadPass()
- if input == "25439w4hjd134673" then
- clearScreen(1,1)
- printCenter("CODE",7,s)
- printCenter("CORRECT",8,s)
- printCenter("Welcome - Jordan DG Chandanais",9,s)
- sleep(1)
- rs.setOutput("back", false)
- sleep(4)
- rs.setOutput("back", true)
- else
- printCenter("invalid password",9,f)
- MainGUI(2)
- end
- end
- function passGUI()
- term.setCursorPos(15,8)
- write("Password: ")
- input = read("*")
- ReadPass()
- end
- function MainGUI(x)
- if x == 1 then
- clearScreen(1,1)
- printCenter("Goverment",1,s)
- printCenter("Research and Development",2,s)
- printCenter("Facility - GHOST",3,s)
- sleep(2)
- passGUI()
- elseif x == 2 then
- i = i - 1
- clearScreen(1,1)
- printCenter("Goverment",1,f)
- printCenter("Reasearch and Development",2,f)
- printCenter("Facility - GHOST",3,f)
- printCenter(i.." attempts remaining",9,f)
- if i == 0 then
- os.reboot()
- else
- passGUI()
- end
- end
- end
- --CODE
- rs.setOutput("back", true)
- clearScreen(1,1)
- MainGUI(1)
Advertisement
Add Comment
Please, Sign In to add comment