Advertisement
Guest User

startup

a guest
Dec 9th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. while true do
  2.   term.clear()
  3.   term.setCursorPos(1, 1)
  4.   print("Please Enter Password:")
  5.   local input = read("*")
  6.   if input == "Markus2000" then
  7.     redstone.setOutput("back", true)
  8.     local state = true
  9.    
  10.     while state == true do
  11.       term.setCursorPos(1, 1)
  12.       term.clear()
  13.       print("Press C to Close the Door")
  14.       local event, keystroke = os.pullEvent("char")  
  15.       if keystroke == "c" then
  16.         redstone.setOutput("back", false)
  17.         print("Door Close")
  18.         state = false
  19.       end
  20.     end
  21.   end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement