xXm0dzXx

Untitled

May 18th, 2012
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. local cPrint = function(text)
  2. local x,y2 = term.getCursorPos()
  3. local x, y = term.getSize()
  4. term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)
  5.  
  6. print(text)
  7. end
  8.  
  9. shell.run("clear")
  10. cPrint("\n \n \n")
  11. cPrint("1; Shutdown")
  12. cPrint("2; Mass Shutdown")
  13. cPrint("\n")
  14. write("Selection: ")
  15. input = tonumber(read())
  16.  
  17. if input == 1 then
  18. write("\nComputer ID: ")
  19. rednet.send(tonumber(read()), "shutdown")
  20. elseif input == 2 then
  21. rednet.broadcast("shutdown")
  22. end
Advertisement
Add Comment
Please, Sign In to add comment