Advertisement
BlueMond

PasswordDoor

Jan 12th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. local version = 1.0
  2. os.pullEvent = os.pullEventRaw
  3. local filename = "startup"
  4. local paste = "g1Q2tN4q"
  5.  
  6. local function update()
  7.         local url = "http://pastebin.com/raw.php?i="..paste
  8.         local temp = http.get(url)
  9.         local ver = temp.readLine()
  10.         if tonumber(string.sub(ver, 17)) ~= version then
  11.             fs.delete(filename)
  12.             shell.run("pastebin get "..paste.." "..filename)
  13.             shell.run(filename)
  14.             return true
  15.         end
  16.         return false
  17. end
  18.  
  19. local test = update()
  20. if test == true then
  21.     error()
  22. end
  23.  
  24. local pass = "whitefish1"
  25.  
  26. while true do
  27.     shell.run("clear")
  28.     print("~Welcome to The Tower~")
  29.     write("\nPassword: ")
  30.     local input = read("*")
  31.    
  32.     if input == pass then
  33.         rs.setOutput("left", true)
  34.         sleep(5)
  35.         rs.setOutput("left", false)
  36.     else
  37.         shell.run("clear")
  38.         print("INCORRECT PASSWORD!")
  39.         sleep(5)
  40.     end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement