The file serving scripts themselves are not illegal, however, if you are obtaining files such as mp3s, movies, software, cracks, serials, games and other warez (or copyrighted material) then it is illegal. I think this is what Yoda was implying.
Regards,