Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- COMMAND LIST
- print("Reactor ON/OFF")
- print("Turbine ON/OFF")
- local reactor = peripheral.wrap("BigReactors-Reactor_0")
- local turbine = peripheral.wrap("BigReactors-Turbine_0")
- -- Turn on
- while true do
- local message = read()
- if message == "reactor on" then
- reactor.setActive(true)
- print("Reactor is now turned on")
- elseif message == "turbine on" then
- turbine.setActive(true)
- print("Turbine is now turned on")
- end
- -- Turn off
- if message == "reactor off" then
- reactor.setActive(false)
- print("Reactor is now turned off")
- elseif message == "turbine off" then
- turbine.setActive(false)
- print("Turbine is now turned off")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment