Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local term = require("term")
- local RUNNING = true
- local sides = require("sides")
- function helpdisplay()
- print("type 1-10 for redstone block switch")
- print("stop for stopping")
- end
- one = component.proxy("abc7f50e-4a30-433d-8a56-2e4a19d146fa") --when you want to let this script work you need to change this addres
- two = component.proxy("c4383ff5-d127-4554-b8a7-059fa201ab99")
- -- you need to do that by all you can use ctrl right click with the analyzer
- three = component.proxy("a71b79bf-01bb-49f2-8083-175a9dda6352")
- -- to get the addres and copy it
- four = component.proxy("bb2f54f2-84af-4d96-a2a4-1a29aa222269")
- -- than you can use middel mouse button to paste it
- five = component.proxy("d29ebad3-fedf-49c5-ad9a-f3ea66b49b7b")
- six = component.proxy("aff2ef21-6c6a-483d-9a63-d3e4fae59c3b")
- seven = component.proxy("610e5d88-ee9e-4c19-b84c-c970ebf49ed9")
- eight = component.proxy("fa436d04-feda-4ff0-8782-dab9482dd31d")
- nine = component.proxy("89393a35-319e-4a28-9dcf-b68ee460d086")
- ten = component.proxy("0391f089-2ba8-4620-89e1-f5edd472ce3a")
- while RUNNING do
- term.clear()
- helpdisplay()
- user = nil
- user = io.read()
- if user == "stop" then
- print("STOPPING...")
- os.sleep(0.1)
- RUNNING = false
- term.clear()
- end
- if user == "1" then
- if one.getOutput(sides.up) == 15 then
- do
- one.setOutput(sides.up, 0)
- end
- else
- one.setOutput(sides.up, 15)
- end
- end
- if user == "2" then
- if two.getOutput(sides.up) == 15 then
- do
- two.setOutput(sides.up, 0)
- end
- else
- two.setOutput(sides.up, 15)
- end
- end
- if user == "3" then
- if three.getOutput(sides.up) == 15 then
- do
- three.setOutput(sides.up, 0)
- end
- else
- three.setOutput(sides.up, 15)
- end
- end
- if user == "4" then
- if four.getOutput(sides.up) == 15 then
- do
- four.setOutput(sides.up, 0)
- end
- else
- four.setOutput(sides.up, 15)
- end
- end
- if user == "5" then
- if five.getOutput(sides.up) == 15 then
- do
- five.setOutput(sides.up, 0)
- end
- else
- five.setOutput(sides.up, 15)
- end
- end
- if user == "6" then
- if six.getOutput(sides.up) == 15 then
- do
- six.setOutput(sides.up, 0)
- end
- else
- six.setOutput(sides.up, 15)
- end
- end
- if user == "7" then
- if seven.getOutput(sides.up) == 15 then
- do
- seven.setOutput(sides.up, 0)
- end
- else
- seven.setOutput(sides.up, 15)
- end
- end
- if user == "8" then
- if eight.getOutput(sides.up) == 15 then
- do
- eight.setOutput(sides.up, 0)
- end
- else
- eight.setOutput(sides.up, 15)
- end
- end
- if user == "9" then
- if nine.getOutput(sides.up) == 15 then
- do
- nine.setOutput(sides.up, 0)
- end
- else
- nine.setOutput(sides.up, 15)
- end
- end
- if user == "10" then
- if ten.getOutput(sides.up) == 15 then
- do
- ten.setOutput(sides.up, 0)
- end
- else
- ten.setOutput(sides.up, 15)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement