material proxies and Lua

Is there any way to control material proxies using Lua? Something similar to the fire effect from tf2. Basically I have this shield material that makes use of an animated detail texture, as the armor of the player gets lower, I want the shield becomes more apparent. I was thinking of using Entity:SetSkin and Compiling the player model with 10 skins, but that seemed like a horrible way of doing it
Use this and look for the example Chrisaster gave in the file.

God damnit,ninja’d four times in a week.

Exactly what I needed, thanks guys.