Passing selected folder path to custom Service executing AppleScript

Solution 1:

At the top of the screen, above your action, there should be a list-box that says Service receives selected <text> in <any application>. Changing <text> to folders should give you the folders as input.