Advertisement
Guest User

startup

a guest
Oct 17th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 KB | None | 0 0
  1. local pullEvent = os.pullEvent
  2. os.pullEvent = os.pullEventRaw
  3.  
  4. while true do
  5.   term.clear()
  6.   term.setCursorPos(1, 1)
  7.   print("CreeperCity Computer Security")
  8.   shell.run("time")
  9.   write("Username: ")
  10.   if read ("*") == "turtle" then
  11.     term.clear()
  12.     do  
  13. local pullEvent = os.pullEvent
  14. os.pullEvent = os.pullEventRaw
  15.  
  16. while true do
  17.   term.clear()
  18.   term.setCursorPos(1, 1)
  19.   print("CreeperCity Computer Security")
  20.   shell.run("time")
  21.   write("Password: ")
  22.   if read("*") == "turtle" then
  23.     print("Correct. You may now use the turtle")
  24.     sleep(2)
  25.     term.clear()
  26.     term.setCursorPos(1, 1)
  27.     break
  28.   else
  29.     print("Incorrect Password")
  30.     sleep(1)
  31.   end
  32. end
  33. os.pullEvent = pullEvent
  34. else
  35. print("No Such User")
  36. sleep(1)
  37. end
  38. end
  39. os.pullEvent = pullEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement