Advertisement
MigasRocha

ExtremeReactors ReactorRegulator/Computer ID:11

Dec 26th, 2024
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.01 KB | Gaming | 0 0
  1. reactor = peripheral.find("BigReactors-Reactor")
  2.  
  3. function ReactorCheckOFF()
  4.            
  5.     term.clear()
  6.     term.setCursorPos(1,1)
  7.     term.setTextColor(colors.red)
  8.         textutils.slowPrint("Minimum Buffer Reached")
  9.    
  10.         sleep(2)
  11.    
  12.         term.setCursorPos(1,2)
  13.     term.setTextColor(colors.green)
  14.         textutils.slowPrint("Deactivating Reactor")
  15.     reactor.setActive(false)
  16.    
  17.     sleep(10)
  18.  
  19. end        
  20.  
  21.  
  22. function ReactorCheckON()
  23.  
  24.         term.clear()
  25.         term.setCursorPos(1,1)
  26.         term.setTextColor(colors.orange)
  27.             textutils.slowPrint("Minimum Buffer not Reached")
  28.        
  29.             sleep(2)
  30.        
  31.         term.setTextColor(colors.lime)
  32.         term.setCursorPos(1,2)
  33.             textutils.slowPrint("Activating Reactor")
  34.             reactor.setActive(true)
  35.             sleep(10)
  36.  
  37. end
  38.  
  39. while true do
  40.  
  41. if redstone.getInput("back") == true then
  42.     print("receiving")
  43.     ReactorCheckON()
  44. else
  45.     ReactorCheckOFF()
  46. end
  47.  
  48. sleep(5)
  49.  
  50.  
  51. end
  52.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement