This isn't the exact function (the damage types are wrong, server and minigame prefs for fall damage don't work, it doesn't check for Ground fall/Wall smack) but this is the function from Blockland v0002:
function Armor::onImpact(%this, %obj, %collidedObject, %vec, %vecLen)
{
//echo("armor impact");
%obj.damage(0, VectorAdd(%obj.getPosition(),%vec),
%vecLen * %this.speedDamageScale, "Impact");
%time = ( ( (%vecLen - 10) / 40) * 6) + 2;
%time = %time * 1000;
if(%time > 8000)
%time = 8000;
if(%time < 2000)
%time = 2000;
// tumble(%obj, %time);
}