How do I scale materials evenly like a BSP

Hi,

I love slapping on a material onto a BSP. Everything looks good. When I apply that same material to a cube and scale it, the material gets stretched. I have tried to solve this problem but I still can’t get it to work. This should be something that is easy to do , but I cannot find a good way to do it. I have attached my work.