Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- statuss = "status"
- local status
- function speichern()
- local file = fs.open(statuss, "w")
- file.writeLine(status)
- file.close()
- end
- function laden()
- file = fs.open(statuss, "r")
- status = file.readLine()
- file.close()
- end
- function torauf()
- for i = 1,4 do
- rs.setBundledOutput("left", colours.orange)
- sleep(1)
- rs.setBundledOutput("left", colours.cyan)
- sleep(1)
- end
- end
- function torzu()
- for i = 1,4 do
- rs.setBundledOutput("left", colours.magenta)
- sleep(1)
- rs.setBundledOutput("left", colours.cyan)
- sleep(1)
- end
- end
- function abfrage()
- if rs.testBundledInput("right", colours.green) then
- if status == zu then
- torauf()
- status = offen
- else
- torzu()
- status = zu
- end
- end
- end
- local status = read()
- while true do
- speichern()
- laden()
- abfrage()
- speichern()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement