The reason the model becomes invisible is that it is probably using the alpha channel for transparency. Where did you find this shader..I would need to look at it to be sure...but basically you can fix this easily.

in the model script after you assign the material just set flag translucent off: my.flags &= TRANSLUCENT.

Also you can add something to the shader technique:
alphablendenable=false;
alphatestenable=false;