daily pastebin goal
21%
SHARE
TWEET

Untitled

a guest May 23rd, 2018 112 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function os()
  2. loggedin = "no"
  3.  
  4. user1 = "mad1231999"
  5. pass1 = "helloworld"
  6.  
  7.     shell.run("clear")
  8.     write("MadOS 0.1 by Mads Clausen\n> ")
  9.     cmd = read()
  10.    
  11.     if cmd == "login" then
  12.    
  13.         if loggedin == "yes" then
  14.            
  15.             write("\nYou are already logged in,\ntype 'logout' to log out")
  16.             sleep(3)
  17.             os()
  18.            
  19.         else
  20.            
  21.             shell.run("clear")
  22.             print("")
  23.             print("")
  24.             print("")
  25.             print("       Login: Enter username and password")
  26.             print("")
  27.             write("       Username: ")
  28.             user = read()
  29.            
  30.             shell.run("clear")
  31.             print("")
  32.             print("")
  33.             print("")
  34.             print("       Login: Enter username and password")
  35.             print("")
  36.             write("       Password: ")
  37.             pass = read("*")
  38.            
  39.             if user == user1 and pass == pass1 then
  40.                
  41.                 loggedin = "yes"
  42.                 os()
  43.            
  44.             end
  45.            
  46.             if (user == user1 and pass ~= pass1) or (user ~= user1 and pass == pass1) then
  47.            
  48.                 print("\n       Login failed")
  49.                 sleep(2)
  50.                 os()
  51.            
  52.             end
  53.            
  54.         end
  55.    
  56.     end
  57.  
  58. end
  59.  
  60. os()
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