%a = vectorAdd(%col.position, vectorScale(%half, 0.1));
%c = vectorAdd(%col.position, vectorScale(%half, 1.9));
What exactly are you doing here? Shouldn't you be checking the base, the center, and the top of the model, rather than the center, slightly above the center, and a position ~50% above the model?
I like the concept of the script but I'm just not following why you're checking those 3 points. Also I'd recommend adding a check for isCrouched() so players can duck behind objects and such.