Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local minutemancode = "3442" -- Minuteman code for overrides
- local chat = peripheral.wrap("top")
- function input()
- --write("> ")
- --local input = read()
- local _1, _2, input = os.pullEvent("chat")
- for k,v in pairs(dofile("/database")) do
- if string.find(input, k) then
- chat.say("[Blackwhite] "..v)
- if string.find(input, "terminate program") then
- return 0
- end
- break
- end
- end
- end
- function password()
- write("INPUT MINUTEMAN ID: ")
- local input = read("*")
- if input == minutemancode then
- term.setTextColor(colors.lime)
- textutils.slowPrint("Minuteman ID accepted.")
- term.setTextColor(colors.white)
- return true
- else
- printError("Minuteman ID invalid.")
- end
- end
- --if password() then
- sleep(3)
- textutils.slowPrint("BLACKWHITE")
- while true do
- if input() == 0 then
- break
- end
- end
- --else
- -- while true do
- -- coroutine.create(function() while true do coroutine.yield() end end)
- -- coroutine.yield()
- -- end
- --end
Advertisement
Add Comment
Please, Sign In to add comment