Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cPrint = function(text)
- local x,y2 = term.getCursorPos()
- local x, y = term.getSize()
- term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), y2)
- print(text)
- end
- shell.run("clear")
- cPrint("\n \n \n")
- cPrint("1; Shutdown")
- cPrint("2; Mass Shutdown")
- cPrint("\n")
- write("Selection: ")
- input = tonumber(read())
- if input == 1 then
- write("\nComputer ID: ")
- rednet.send(tonumber(read()), "shutdown")
- elseif input == 2 then
- rednet.broadcast("shutdown")
- end
Advertisement
Add Comment
Please, Sign In to add comment