Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local status
- fs.makeDir("saves")
- function speichern()
- local file = fs.open("saves/", "w")
- io.write(status)
- file.close()
- end
- function laden()
- file = fs.open("saves/", "r")
- local status = io.read()
- file.close()
- end
- function torauf()
- for i = 1,4 do
- rs.setBundledOutput("bottom", colours.orange)
- sleep(0,5)
- rs.setBundledOutput("bottom", colours.cyan)
- sleep(0,5)
- end
- end
- function torzu()
- for i = 1,4 do
- rs.setBundledOutput("bottom", colours.magenta)
- sleep(0,5)
- rs.setBundledOutput("bottom", colours.cyan)
- sleep(0,5)
- 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
- while true do
- laden()
- abfrage()
- speichern()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement