Reactor_Games

Generator

Oct 27th, 2021 (edited)
42
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local com = require("component")
  2. local red = com.redstone
  3.  
  4.  
  5. function getValue()
  6.  
  7. return com.basic_energy_cube.getEnergyStored() / com.basic_energy_cube.getMaxEnergyStored() * 100 -- Измени на свое хранилище com._____.getEnergyStored()
  8.  
  9. end
  10.  
  11. while true do
  12.  
  13. if getValue() >= 90 then
  14.  
  15. red.setOutput(5, 15) -- (5)- Это сторона света редстоун контроллера
  16.  
  17. elseif getValue() <= 10 then
  18.  
  19. red.setOutput(5, 0)
  20.  
  21. end
  22.  
  23.  
  24. end
RAW Paste Data