Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.setCursorPos(1,1)
- print("Reactor CONTROL")
- term.setCursorPos(1,2)
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.red)
- print("ON")
- term.setCursorPos(1,4)
- print("OFF")
- while true do --loop for the button
- local event, button, X, Y = os.pullEventRaw()
- if(event == "mouse_click") then
- if(X >=1 and X <=2 and Y==2 and button ==1) then
- rs.setOutput("back",true)
- elseif(X >=1 and X <=3 and Y==4 and button ==1) then
- rs.setOutput("back",false)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement