Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local schalterSide = "right"
- local clockAusgang = "bottom"
- local LampenSide = "top"
- local timer = "an"
- function Clock()
- if rs.getInput("schalterSide") == true then
- timer = "an"
- rs.setOutput("clockAusgang",true)
- sleep(0.5)
- rs.setOutput("clockAusgang",false)
- else
- timer = "aus"
- end
- sleep(1)
- end
- function Time()
- if timer == "an" then
- rs.setOutput("LampenSide",true)
- else
- rs.setOutput("LampenSide",false)
- end
- shell.run("clear")
- print(textutils.formatTime(os.time(), true))
- print("Timer ",timer)
- sleep(1)
- end
- while true do
- parallel.waitForAny(Time,Clock)
- end
Advertisement