squall78

startupser

Dec 31st, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. local passcheck = fs.exists(312)
  2. if passcheck == false then
  3. print("TiinLock Server Setup.")
  4. print("Please enter the password desired. Then, save and reboot the computer.")
  5. shell.run("rename","tiinlockserver","startup")
  6. shell.run("edit","312")
  7. print("Don't forget to set the client program as startup on all door computers!")
  8. local red = rednet.open
  9. red("left")
  10. red("right")
  11. red("top")
  12. red("back")
  13. red("bottom")
  14. red("front")
  15. print("Server receiving on all sides.")
  16. local scrap, msg = rednet.receive()
  17. local tiin = fs.open("312", "r")
  18. local tiinr = tiin.readAll()
  19. if msg == tiinr then
  20. rednet.broadcast("tiingood")
  21. os.reboot()
  22. else
  23. rednet.broadcast("x")
  24. os.reboot()
  25. end
Add Comment
Please, Sign In to add comment