Arc13

Computer Starter

Sep 17th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. term.clear()
  2. term.setCursorPos(1, 1)
  3.  
  4. while true do
  5.   print("r, s or o ?")
  6.   local sRep = read()
  7.  
  8.   if sRep == "r" then
  9.     peripheral.find("computer", function(name, object) object.reboot() end)
  10.   elseif sRep == "s" then
  11.     peripheral.find("computer", function(name, object) object.shutdown() end)
  12.   elseif sRep == "o" then
  13.     peripheral.find("computer", function(name, object) object.turnOn() end)
  14.   end
  15. end
Add Comment
Please, Sign In to add comment