Advertisement
GoldMike

PasswordDoorInternal

Jan 10th, 2025
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | Software | 0 0
  1. local side = "right"
  2. local leave = "y"
  3. local stay = "n"
  4. local opentime = 5
  5. while true do
  6.     term.clear()
  7.     term.setCursorPos(1,1)
  8.     write("Welcome to Steele Industries.")
  9.     term.setCursorPos(1,2)
  10.     write("Do you wish to leave the factory floor?")
  11.     term.setCursorPos(1,3)
  12.     write("Y/N:")
  13.     local input = read()
  14.     if input == leave then
  15.         term.clear()
  16.         term.setCursorPos(1,1)
  17.         print("Request accepted. Have a nice day.")
  18.         rs.setOutput(side,true)
  19.         sleep(opentime)
  20.         rs.setOutput(side,false)
  21.     else
  22.         if input == stay then
  23.             print("Stop wasting my time.")
  24.             sleep(2)
  25.         end
  26.     end
  27. end
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement