How to make an object (or material) render on top of others?

Sorry for the double post, found my answer here with the script