Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos (1,1)
- print "JukebOS 1.0"
- local monitor = peripheral.wrap("top")
- monitor.clear()
- monitor.setTextScale(1.5)
- while true do
- while not disk.hasAudio("left") do
- monitor.setCursorPos(5,2)
- monitor.write("Inserez un cd audio")
- sleep(0.01)
- end
- monitor.clear()
- monitor.setCursorPos(5,2)
- monitor.write("||")
- monitor.setCursorPos(8,2)
- monitor.write(disk.getAudioTitle("left"))
- local stop2 = false
- local stop1 = true
- while stop2 == false do
- sleep(0.1)
- if redstone.getInput("back") then
- monitor.setCursorPos(5,2)
- monitor.write("> ")
- disk.playAudio("left")
- stop1 = false
- sleep(1)
- end
- if (redstone.getInput("right")) and (stop1 == false) then
- monitor.setCursorPos(5,2)
- monitor.write("||")
- disk.stopAudio("left")
- stop1 = true
- sleep(1)
- end
- if ((redstone.getInput("right")) and (stop1 == true)) or (not disk.hasAudio("left")) then
- stop2 = true
- disk.eject("left")
- monitor.clear()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment