Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local rs = component.redstone
- local colors = require("colors")
- local sides = require("sides")
- local Reactor_1 = component.proxy(component.get("e8e8"))
- local reactoroff
- local reactor1check
- local reactoron
- local MaxHeat = Reactor_1.getMaxHeat()
- local Safe = MaxHeat/2
- local Heat = Reactor_1.getHeat()
- print(MaxHeat)
- print(Safe)
- reactoroff = function()
- rs.setOutput(sides.up, 0)
- os.sleep(1)
- print("Reactor_Off")
- reactor1check()
- os.sleep(1)
- end
- reactor1check = function()
- while Heat < Safe do
- Heat = Reactor_1.getHeat()
- print(Heat)
- print(Safe)
- print(MaxHeat)
- os.sleep(1)
- reactoron()
- end
- end
- reactoron = function()
- if Heat < Safe then
- rs.setOutput(sides.up, 253)
- os.sleep(1)
- print(Heat)
- print("Reactor_On")
- os.sleep(1)
- reactor1check()
- else
- reactoroff()
- end
- end
- reactoron()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement