Why does this applescript not actually set the input volume to zero?
As far as I can tell, the script works as expected, the problem is in the OS X audio input code. When I run it, the slider goes to 0%, verified by mousing over the slider until the tooltip appears:



This is the same as if I drag the volume slider manually.

The problem is seemingly that "0%" doesn't actually mean off, but rather a very low threshold. In some quick testing, I could record the sound of my finger tapping on my MacBook Pro's casing near the mic (on most machines I believe it's around the right speaker grill) when the volume was set to 0. I could replicate that regardless of whether I set the slider manually or via AppleScript. It did seem to be low enough that virtually any other sound isn't picked up, but clearly the microphone isn't truly off.

As far as I can tell, there's no way to properly mute the built-in mic. The best I can suggest is changing the audio input to use the line in, if your Mac is equipped with a line in port. Doing that via AppleScript requires some GUI scripting unfortunately, but this should do it (source):

tell application "System Preferences"
   activate
   set current pane to pane id "com.apple.preference.sound"
end tell
tell application "System Events"
   tell process "System Preferences"
       set frontmost to true
       --get properties of UI element of tab group of window "Sound"
       click radio button "input" of tab group of window "Sound"
       tell row 2 of table 1 of scroll area 1 of tab group 1 of window "Sound" to set selected to true
   end tell
end tell


If you have more than the two standard audio inputs (Mic and Line In), you may need to change the number in row 2 to whichever is appropriate, according to the order in your Input preferences.