accentColor = colors.gray buttonColor = colors.lightGray backgroundColor = colors.black peripherals = peripheral.getNames() if #peripherals < 0 then print "No drive" else driveCount = 0 for n = 1, #peripherals do local driveCheck = peripherals[n] if peripheral.getType(driveCheck) == "drive" then drive = driveCheck driveCount = driveCount + 1 end end if driveCount > 1 then print("Too many disk drives. Please remove some and try again") exit() end end function playDisc() disk.playAudio(drive) print(disk.getAudioTitle(drive)) end function ejectDisc() disk.eject() end function stopDisc() disk.stopAudio() end if disk.isPresent(drive) and disk.hasAudio(drive) then playDisc(drive) elseif disk.isPresent(drive) then print "Not a music disc" else print "No disc" end