local monitor = peripheral.wrap('monitor_1')
function clrmonitor()
monitor.clear()
monitor.setCursorPos(1,1)
end
clrmonitor()
while true do
a = 1
while a > 0 do
a = redstone.getAnalogInput("back")
if a == 14 then
clrmonitor()
monitor.write("Currently playing:")
monitor.setCursorPos(3,3)
monitor.write("Still Alive")
disk.playAudio("right")
b = 1
end
if a == 13 then
clrmonitor()
monitor.write("Currently playing:")
monitor.setCursorPos(3,3)
monitor.write("Want You Gone")
disk.playAudio("left")
b = 2
end
sleep(1.5)
end
end
Comments