Decal spawned via C++ has always the same material

can you submit the code in a readable way though?