Advertisement
bobmarley12345

ccpcrestarter

Feb 6th, 2021 (edited)
692
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. ComputerName = "computer_455"
  2. ButtonInputSide = "bottom"
  3.  
  4. Computer = peripheral.wrap(ComputerName)
  5.  
  6. function RestartComputer()
  7.     Computer.reboot()
  8. end
  9.  
  10. function Main()
  11.     term.clear()
  12.     term.setCursorPos(1, 1)
  13.     print("ME System Info Restarter lol")
  14.     while true do
  15.         os.pullEvent("redstone")
  16.         if (rs.getInput(ButtonInputSide)) then
  17.             print("Restarting the computer...")
  18.             RestartComputer()
  19.             print("Success!")
  20.         end
  21.     end
  22. end
  23.  
  24. Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement