Advertisement
Cardwell

Vault_Admin

Apr 20th, 2021
1,286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. --VaultDoorAdmin
  2. local DoorSeq = "1"
  3. local opentime = 5
  4. rednet.open("back")
  5.  
  6. while true do
  7.     term.clear()
  8.     term.setCursorPos(1,1)
  9.     print("1. For å åpne dør: ")
  10.     pw = read()
  11.  
  12.     if pw == DoorSeq then
  13.         term.clear()
  14.         term.setCursorPos(1,1)
  15.         print("Åpner dør..")
  16.         rednet.broadcast("VAULT_OPEN")
  17.         print("Dør åpen")
  18.         sleep(opentime)
  19.         rednet.broadcast("VAULT_CLOSED")
  20.         print("Dør lukket")
  21.         sleep(1)
  22.  
  23.     else
  24.         term.clear()
  25.         term.setCursorPos(1,1)
  26.         print("ERROR: Feil input eller lignende. Kontakt tech support :) ")
  27.         sleep(5)
  28.     end
  29. end
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement