Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- local modem = peripheral.wrap("back")
- local access = false
- local password = "patata"
- local input
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- while access == false do
- clear()
- print("Enter Password")
- input = read()
- if input == password then
- access = true
- end
- end
- clear()
- print("Select Mode")
- input = read()
- if input == "admin" then
- modem.transmit(35353,1,"terminate")
- os.reboot()
- elseif input == "terminate" then
- return
- else
- clear()
- print("Active")
- while true do
- os.startTimer(0.2)
- modem.transmit(35353,1,"access")
- event = os.pullEventRaw()
- if event ~= "timer" then
- os.reboot()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement