daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest May 26th, 2018 112 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function newLogin()
  2.     file = io.open("MadOS/Programs/NewLogin", "w")
  3.     file:write([[
  4.         shell.run("clear")
  5.         print("")
  6.         print("")
  7.         print("       Registration: Username & password")
  8.         print("")
  9.         print("Username:")
  10.         print("         ------------------------")
  11.         print("Password: ")
  12.         print("         ------------------------")
  13.         print("Re-enter: ")
  14.         print("         ------------------------")
  15.         term.setCursorPos(11, 5)
  16.         user = read()
  17.         term.setCursorPos(11, 7)
  18.         pass = read("*")
  19.         term.setCursorPos(11, 9)
  20.         pass2 = read("*")
  21.         if pass == pass2 then
  22.             file2 = io.open("MadOS/Users/", user)
  23.             write(user, "\n", pass)
  24.         else
  25.             print("\n       Password mismatch")
  26.         end
  27.         ]])
  28.     file:close()
  29. end
  30.  
  31. function neededFiles()
  32.     fs.makeDir("MadOS")
  33.     fs.makeDir("MadOS/Users")
  34.     fs.makeDir("MadOS/Log")
  35.     fs.makeDir("MadOS/Programs")
  36.    
  37.     file = io.open("MadOS/Users", "w")
  38.     file:write("admin\nmados")
  39.     file:close()
  40.     newLogin()
  41. end
  42.  
  43. neededFiles()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top