Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Fancy stuff
- os.pullEvent = os.pullEventRaw
- local id = idd
- term.setBackgroundColor(colors.blue)
- term.setTextColor(colors.black)
- term.clear()
- --rednet | login
- rednet.open("top")
- term.setCursorPos(1,1)
- print"Username And Password Is Required"
- term.setCursorPos(8,8)
- write"Username: "
- user =read()
- term.setCursorPos(8,9)
- write"Password: "
- pass =read("*")
- rednet.send(idd,user)
- term.setCursorPos(8,10)
- print"Connecting To Server"
- sleep(1)
- rednet.send(idd,pass)
- id,message = rednet.receive(7)
- --Do not change !
- if message =="true" then
- term.setCursorPos(8,11)
- term.setTextColor(colors.green)
- print"Welcome"
- sleep(2)
- term.setBackgroundColor(colors.black)
- term.clear()
- sleep(0)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.orange)
- term.setCursorPos(1,1)
- print(user.. " Logged On")
- elseif message =="truea" then
- term.setCursorPos(8,11)
- term.setTextColor(colors.green)
- print("Welcome " ..user " [Admin]")
- sleep(2)
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setTextColor(colors.orange)
- term.setCursorPos(1,1)
- print(user.. " [Admin] Logged On")
- write("Command > ")
- term.setBackgroundColor(colors.black)
- local admin = true
- elseif message =="false" then
- term.setCursorPos(8,11)
- term.setTextColor(colors.yellow)
- print"Username or Password is incorrect"
- sleep(2)
- os.shutdown()
- elseif message =="banned" then
- term.setCursorPos(8,11)
- term.setTextColor(colors.orange)
- print"Sorry, Your Account Has Been Banned"
- sleep(3)
- os.shutdown()
- else
- term.setCursorPos(8,11)
- term.setTextColor(colors.black)
- print"Cannot connect to server, may be down for maintenance"
- sleep(2)
- os.shutdown()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement