Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Deckenbeleuchtung --
- local side = "top"
- function drawPage()
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.blue)
- term.clear()
- term.setCursorPos(1,2)
- print(" ")
- term.setCursorPos(1,3)
- print("Licht an")
- term.setCursorPos(1,5)
- print("Licht aus")
- end
- drawPage()
- while true do
- local button,X,Y = os.pullEvent()
- if X >=1 and X <=10 and Y == 3 and button == 1 then
- redstone.setOutput(side,true)
- print("Licht ist an.")
- elseif X >=1 and X <=10 and Y == 5 and button == 1 then
- redstone.setOutput(side,false)
- print("Licht ist aus.")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement