Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m=peripheral.wrap("back")
- a=0
- b=0
- c=0
- while true do
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.white)
- if a==0 then
- rs.setOutput("right",true)
- term.setBackgroundColor(colors.red)
- term.write("Wand nach hinten")
- else
- rs.setOutput("right",false)
- term.setBackgroundColor(colors.green)
- term.write("Wand nach vorne")
- end
- term.setCursorPos(1,3)
- if b==0 then
- rs.setOutput("top",false)
- term.setBackgroundColor(colors.red)
- term.write("Alles Anhalten")
- else
- rs.setOutput("top",true)
- term.setBackgroundColor(colors.green)
- term.write("Betriebsbereit")
- end
- term.setCursorPos(1,5)
- if c==0 then
- rs.setOutput("left",true)
- term.setBackgroundColor(colors.red)
- term.write("Tür zu")
- else
- rs.setOutput("left",false)
- term.setBackgroundColor(colors.green)
- term.write("Tür auf")
- end
- print(1)
- event, side, xPos, yPos = os.pullEvent("mouse_click")
- print(1.5)
- if yPos==1 then
- if a==0 then
- a=1
- else
- a=0
- end
- end
- if yPos==3 then
- if b==0 then
- b=1
- else
- b=0
- end
- end
- if yPos==5 then
- if c==0 then
- c=1
- else
- c=0
- end
- end
- print(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement