Materialize Local position

is there any way to set up the Materialize shader from the marketplace to use the local z coordinates of the model instead of a absolute world position z coordinate? I’ve been tinkering with the shader for ages, it’s probably something simple but i’m no expert at materials, there must be a way to set it up so that you can rotate your model and keep the effect. ( I wanted to use it for a sword, that materialises when you attack, etc. )