Advertisement
Guest User

startup.lua

a guest
Jun 26th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. local password = "thing"
  2. local i = 0
  3. local lock = false
  4. os.pullEvent = os.pullEventRaw
  5. shell.run("clear")
  6. print("password?")
  7. while true do
  8.     if read() == password then
  9.         if lock == false then
  10.             return
  11.             shell.run("clear")
  12.             else
  13.             shell.run("clear")
  14.             print("Locked")
  15.         end
  16.         else
  17.         if lock == false then
  18.             if i == 2 then
  19.                 lock = true
  20.             end
  21.             shell.run("clear")
  22.             print("wrong password.")
  23.             print("password?")
  24.             i = i + 1
  25.         else
  26.             shell.run("clear")
  27.             print("Locked")
  28.         end
  29.     end
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement