Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Made by jag_e_nummer_ett
- -- Created for TurtleGilmore and his factory
- -- 1 / 10 - 2012
- -- ⇊ change this for the id you want ⇊
- local factoryID = "Alpha"
- local bypassID = "bypass"
- local normalID = "normal"
- local adminID = "admin"
- -- ⇊ Program start, dont change anything here ⇊
- function clearPrint(string, x, y)
- if not x or x < 0 then x = 1 end
- if not y or y < 0 then y = 1 end
- term.clear()
- term.setCursorPos(x,y)
- print(string)
- end
- function checkID(ID)
- clearPrint("Reading ID entered...")
- sleep(2)
- clearPrint("Checking database...")
- sleep(2)
- if ID == normalID or ID == adminID then
- clearPrint("Security ID verified - Correct!")
- sleep(.4)
- print("Un-locking "..factoryID.." security...")
- rs.setOutput("right", true)
- sleep(3)
- clearPrint("Re-activating "..factoryID.." security...")
- sleep(1.5)
- rs.setOutput("right", false)
- clearPrint("LOCKED!")
- sleep(2)
- elseif ID == bypassID then
- clearPrint("Security ID verified - Correct!")
- sleep(.4)
- print("Bypassing "..factoryID.." security...")
- sleep(1.5)
- clearPrint("Done!")
- return "bypass"
- else
- clearPrint("Security ID locked down - Incorrect!")
- sleep(.4)
- print("Activating alarm systems!")
- sleep(2)
- rs.setOutput("back", true)
- local alarmInput = ""
- while alarmInput ~= adminID do
- clearPrint("ENTER ADMINISTRATION ID")
- write("ID: ")
- alarmInput = read()
- end
- clearPrint("Correct Admin ID!")
- sleep(.4)
- print("De-activating alarms")
- rs.setOutput("back", false)
- sleep(2)
- end
- end
- -- ⇊ Main program below ⇊
- while true do
- clearPrint("Welcome to Vurruca National Production Company")
- print("Please enter your Security ID for: "..factoryID)
- write("ID: ")
- if checkID(read()) == "bypass" then break end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement