Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Enter the side the disk drive is on")
- local side = read()
- if disk.isPresent(side) == false then -- detects if there is a disk
- print("No Disk")
- end
- while(true) do
- if (disk.isPresent(side) == true) and (disk.hasAudio(side) == true) then -- if there is a disk and it has audio it will play
- local diskname = disk.getAudioTitle(side)
- print("Now Playing: " , diskname)
- disk.playAudio(side)
- sleep(136)
- end
- if (disk.isPresent(side) == true) and (disk.hasAudio(side) == false) then -- if there is a disk and it dosent have audio aka a floppy disk, then it will eject it
- print("Invalid Disk")
- disk.eject(side)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement