Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[ Calls in and requires API and/or components ]--
- local component = require("component")
- local event = require("event")
- local sides = require("sides")
- local term = require("term")
- --[ Changes the component.modem.bleh to m.bleh and etc. ]--
- m = component.modem
- rs = component.redstone
- gpu = component.gpu
- m.open(95) --[ Opens Modem port 95]--
- while true do
- term.clear() --[Clears the screen]--
- term.setCursor(1,1) --[Sets the cursor on the screen at X,Y]--
- print("Password") --[Prints the word Password]--
- local pswd = io.read() --[Reads user input and saves to local variable pswd]--
- term.clear() --[Clears the screen]--
- term.setCursor(1,1) --[Resets the cursor to desired position]--
- if password == "Admin" then
- break
- else
- m.send("3e216927-dc61-4f3e-bad7-d8dd389fa6", 95, pswd)
- local evt,me,who,port,_,message = event.pull('modem_message')
- if who == "3e216927-dc61-4f3e-bad7-d8dd389fa6" and (port == 95) and message == "valid" then
- print("Access Granted")
- rs.setOutput(sides.left, 15)
- os.sleep(5)
- rs.setOutput(sides.left, 0)
- end
- end
- end
Add Comment
Please, Sign In to add comment