BigGamingGamers

Ractor

Nov 26th, 2020 (edited)
5,673
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. local BUFFER_MAX = 10000000
  2. local MIN_THRESHOLD = .5
  3. local MAX_THRESHOLD = .8
  4.  
  5. print("Software Control is On...")
  6. local reactor = peripheral.wrap("back")
  7. while(true) do
  8. local currentEnergy = reactor.getEnergyStored() / BUFFER_MAX
  9. if (currentEnergy < MIN_THRESHOLD) then
  10. reactor.setActive(true)
  11. elseif(currentEnergy > MAX_THRESHOLD) then
  12. reactor.setActive(false)
  13. end
  14. sleep(.5)
  15. end
Add Comment
Please, Sign In to add comment