Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mon = peripheral.wrap("monitor_4")
- local password = "boom"
- local opentime = 5
- local number = 5
- while true do
- mon.setBackgroundColor(colors.lightBlue)
- mon.clear()
- mon.setCursorPos(7,2)
- mon.write("Main Base Reactor")
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(14,1)
- term.setTextColor(colors.blue)
- term.write("Reactor Access Terminal")
- term.setTextColor(colors.red)
- term.setCursorPos(15,15)
- term.write("Attempts Remaining " .. number)
- term.setCursorPos(1,3)
- term.setTextColor(colors.yellow)
- term.write("Enter Access Code: ")
- input = read("*")
- if input == password then
- term.setCursorPos(1,5)
- term.setTextColor(colors.green)
- term.write("Mag-Locks Disengaging")
- term.setCursorPos(1,6)
- term.write("Please Wait")
- mon.setBackgroundColor(colors.green)
- mon.clear()
- mon.setCursorPos(5,2)
- mon.setTextColor(colors.black)
- mon.write("Mag-Locks Disengaging")
- sleep(2)
- term.setCursorPos(1,8)
- term.write("Mag-Locks Released")
- mon.clear()
- mon.setCursorPos(5,2)
- mon.write("Mag-Locks Released")
- sleep(1)
- mon.setCursorPos(5,3)
- term.setCursorPos(1,9)
- sleep(1)
- mon.write("Doors Open")
- term.write("Doors Open")
- rs.setOutput("left", true)
- sleep(opentime)
- rs.setOutput("left", false)
- number = 5
- else
- term.setCursorPos(1,5)
- term.setTextColor(colors.red)
- term.write("Code Incorrect")
- sleep(1)
- number = number - 1
- if number == 0 then
- term.setBackgroundColor(colors.red)
- term.clear()
- term.setCursorPos(10,8)
- term.setTextColor(colors.white)
- term.write("ALARM ACTIVATED TERMINAL LOCKED")
- rs.setOutput("right", true)
- sleep(15)
- number = 5
- rs.setOutput("right", false)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement