Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pullEvent = os.pullEvent
- --Change the 2 to the ID of the PC, that is logging in
- local pc = 2
- os.pullEvent = os.pullEventRaw
- term.clear()
- term.setCursorPos(1,1)
- --Change back to the side of the modem on the computer
- rednet.open("back")
- local usernames = {"Peter", "John"}
- local passwords = {"1.40205969E14", "1.51645397E14"}
- id, user = rednet.receive()
- id, pass = rednet.receive()
- local num = ""
- local num3 = 0
- for char in pass:gmatch(".") do
- num2 = (("0"):rep(3 - #tostring(string.byte(char))) .. string.byte(char))
- num = num .. num2
- num3 = num3 + num2
- end
- num = tonumber(num)
- num = num + num3 - 12.64392709*num3
- num = num*2.78834729/0.97548326
- num = tostring(num)
- if user == "Terminate" and num == "191792163723692480" then
- rednet.send(pc, "Termination")
- os.pullEvent = pullEvent
- sleep(30)
- end
- for loop = 1, #usernames do
- if user == usernames[loop] and num == passwords[loop] then
- rednet.send(pc, "ok")
- end
- end
- rednet.send(pc, "not ok")
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement