Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- local i,ended
- local rs_in={}
- rednet.open("left")
- local function But1()
- rs_in[1]=not rs_in[1]
- rednet.send(34,tostring(rs_in[1]))
- end
- local function But2()
- rs_in[2]=not rs_in[2]
- rednet.send(33,tostring(rs_in[2]))
- end
- local function But3()
- rs_in[3]=not rs_in[3]
- rednet.send(32,tostring(rs_in[3]))
- end
- local function But4()
- rs_in[4]=not rs_in[4]
- rednet.send(31,tostring(rs_in[4]))
- end
- local function But5()
- rs_in[5]=not rs_in[5]
- rednet.send(27,tostring(rs_in[5]))
- end
- local function But6()
- rs_in[6]=not rs_in[6]
- rednet.send(28,tostring(rs_in[6]))
- end
- local function But7()
- rs_in[7]=not rs_in[7]
- rednet.send(29,tostring(rs_in[7]))
- end
- local function But8()
- rs_in[8]=not rs_in[8]
- rednet.send(30,tostring(rs_in[8]))
- end
- local function End()
- ended=true
- end
- for i=1, 8
- do
- rs_in[i]=false
- end
- button.setTable("Engine 1", But1, 4,14,3,5, true)
- button.setTable("Engine 2", But2, 4,14,7,9, true)
- button.setTable("Engine 3", But3, 4,14,11,13, true)
- button.setTable("Engine 4", But4, 4,14,15,17, true)
- button.setTable("Engine 5", But5, 17,27,3,5, true)
- button.setTable("Engine 6", But6, 17,27,7,9, true)
- button.setTable("Engine 7", But7, 17,27,11,13, true)
- button.setTable("Engine 8", But8, 17,27,15,17, true)
- button.setTable("X", End, 27,29,18,20, false)
- while(true)
- do
- button.heading("Program")
- button.screen()
- local event, side, x, y= os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- if (ended)
- then
- button.stop()
- return
- end
- end
- --script by SolidSnake96AS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement