Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pullEventBackup = os.pullEvent
- os.pullEvent = os.pullEventRaw
- --[[
- Some rights reserved (CC-BY-NC-SA).
- More info about it can be fount here: http://crteativecommons.org
- Coded by jesusthekiller - github.com/jesusthekiller
- ]]
- --CONFIG--
- local password = "pass" --password?
- local serverID = 1337 --server ID, shows up on server screen :P/>/>
- local modemSide = "back" --side of modem
- --END OF CONFIG, DO NOT EDIT BELOW THIS LINE--
- local function clear()
- term.clear()
- term.setCursorPos(1,1)
- print("ID of this computer: " .. os.computerID())
- end
- local function printLoginMessage()
- print([[
- Password:
- -----------
- ]])
- end
- while true do
- clear()
- printLoginMessage()
- term.setCursorPos(21,3)
- if read("x") == password then
- clear()
- print("Redstone request has been sent.")
- rednet.open(modemSide)
- rednet.send(serverID, "doOpen")
- rednet.close(modemSide)
- sleep(2)
- clear()
- printLoginMessage()
- else
- clear()
- print("Wrong Password!")
- sleep(2)
- printLoginMessage()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement