Guest User

Untitled

a guest
Jul 18th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. function clear()
  2. term.clear()
  3. term.setCursorPos(1,1)
  4. end
  5.  
  6. function os.pullEvent()
  7. local event, p1, p2, p3, p4, p5 = os.pullEventRaw()
  8. if event == "terminate" then
  9.  
  10. end
  11. return event, p1, p2, p3, p4, p5
  12. end
  13.  
  14. if fs.exists("Password.txt") then
  15. clear()
  16. print("Please enter the password:")
  17. logfile = io.open("system.log","r")
  18. Password = logfile:read("*all")
  19. input = read("*")
  20. if input == Password then
  21. clear()
  22. print("test worked!")
  23. sleep(5)
  24. clear()
  25. shell.run("optionmenu")
  26. else
  27. print("Wrong password, please try again!")
  28. sleep(5)
  29. os.reboot()
  30. end
  31. else
  32. print("You didnt set a password, please set one for your secuirty!")
  33. sleep(5)
  34. clear()
  35. shell.run("optionmenu")
  36. end
Add Comment
Please, Sign In to add comment