LDShadowLord

LoginMain

Jan 14th, 2013
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.pullEvent = os.pullEventRaw
  2. local me = shell.getRunningProgram()
  3. local logging = true
  4. while logging do
  5.   term.clear()
  6.   term.setCursorPos(1,1)
  7.      print([[
  8. ==EvellOS==========================================
  9. ==Login============================================
  10.                                                    
  11.                                          
  12. Password:                                          
  13.                                                    
  14.                                                    
  15. ==================================By=LDShadowLord==]])
  16.      term.setCursorPos(10, 5)
  17.      pass = read("*")
  18.      http.request("http://tycoonier.co.uk/data/&p="..textutils.urlEncode(pass).."&file=pass=correct.txt")
  19.   requesting = true
  20.   while requesting do
  21.     local event, url, sourceText = os.pullEvent()
  22.     if event == "http_success" then
  23.       requesting = false
  24.       local recall = sourceText.readLine()
  25.       if recall == "oky9" then
  26.         term.clear()
  27.         term.setCursorPos(1,1)
  28.         print("==EvellOS==========================================")
  29.         print("==Login============================================")
  30.         print("                                                   ")
  31.         print("                   Logged in                       ")
  32.         print("                  Succesfully                      ")
  33.         print("                                                   ")
  34.         print("                                                   ")
  35.         print("==================================By=LDShadowLord==")
  36.     redstone.setOutput("left",true)
  37.         sleep(2)
  38.         redstone.setOutput("left",false)
  39.         term.clear()
  40.         term.setCursorPos(1,1)
  41.         shell.run("disk/startup")
  42.            
  43.         end
  44.             logging = false
  45.       else
  46.         print("Incorrect username or password!")
  47.       end
  48.     elseif event == "http_failure" then
  49.       term.clear()
  50.       term.setCursorPos(1,1)
  51.             print("==EvellOS==========================================")
  52.             print("==Login============================================")
  53.             print("                                                   ")
  54.             print("                                                   ")
  55.             print("                      Error                        ")
  56.             print("                                                   ")
  57.             print("                                                   ")
  58.             print("==================================By=LDShadowLord==")
  59.             sleep(10)
  60.       logging = false
  61.       requesting = false
  62.       shell.run("disk/startup")
  63.     end
  64.   end
  65. end
Advertisement
Add Comment
Please, Sign In to add comment