Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- --Server var
- server = 1
- --functions
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.red)
- print("NEOTERRA FOUNDATION")
- term.setTextColor(colors.white)
- print("Connected to: ".."[Redacted]")
- end
- function Start()
- clear()
- term.setCursorPos(1,1)
- local event, side = os.pullEvent("disk")
- print("reading drive...")
- if disk.isPresent("bottom") == true then
- print("reading card")
- if fs.exists("disk/.uid") == false then
- print("drive is not an access card")
- sleep(1)
- Start()
- end
- rednet.send(server, fs.open("disk/.uid", "r").readAll(), "UID")
- rednet.send(server, fs.open("disk/.uname", "r").readAll(), "username")
- rednet.send(server, fs.open("disk/.upass", "r").readAll(), "password")
- local server,message,protocol = rednet.receive("response",3)
- if message == "confirm" then
- disk.eject("bottom")
- Task()
- Start()
- else
- print("Rejected")
- Start()
- end
- end
- end
- function Task()
- redstone.setOutput("left", true)
- sleep(2)
- redstone.setOutput("left",false)
- Start()
- end
- Start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement