One of the most viewed threads in this forum provides exactly what you are asking for:
The power of Avisynth: restoring old 8mm films
There was a follow-on thread that also has a tremendous number of views:
Capturing and restoring old 8mm film
The first post in the first thread contains a link to the latest script, along with all the DLLs necessary to make it work. I also posted my version of the script, which is revised to make a significant increase in speed, while reducing the amount of sharpening and increasing the dirt removal effectiveness. You'll find that script posted in the middle of the first thread, under my name. I also posted a later revision of my version in the second thread.