Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- username = ""
- password = ""
- boxW = 32
- boxH = 8
- w, h = term.getSize()
- midW, midH = w/2, h/2
- paintutils.drawBox(
- midW-(boxW/2),
- midH-(boxH/2),
- midW+(boxW/2),
- midH+(boxH/2),
- colours.white)
- term.setBackgroundColour(colours.black)
- term.setTextColour(colours.lightGrey)
- function cursorPos(x, y)
- term.setCursorPos(
- midW-(boxW/2)+x,
- midH-(boxH/2)+y)
- end
- function boxData(title)
- print(title)
- end
- cursorPos(3, 3)
- boxData("ID: ")
- cursorPos(3, 5)
- boxData("Password: ")
- cursorPos(7, 3)
- username = tostring(read())
- cursorPos(string.len("Password: ")+3, 5)
- password = read("*")
- channel1 = 4826
- channel2 = 3984
- receiveChannel1 = 38274
- receiveChannel2 = 57593
- function openPort(port)
- modem = peripheral.wrap("left")
- if not modem.isOpen(port) then modem.open(port) end
- end
- openPort(channel1)
- modem.transmit(channel1, receiveChannel1, username)
- openPort(channel2)
- modem.transmit(channel2, receiveChannel2, password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement