First of all copy and paste the LimitedSharpen script in to a new, empty text-file. Save this as limitedsharpen.avsi into your AviSynth plugin-folder. The missing function "yv12lutxy()" is contained in the MaskTools plugin, which should be unzipped into a directory other than your plugin-folder (just create a subdirectory). Then, as seen in the script I posted, you'll load the MaskTools plugin, pointing to the correct location, of course.
EDIT: Karyudo beat me about the first part of the answer