How the Triangular script works
Creating a triangle in After Effects is surprisingly long winded: first you have to click+hold the shape tool to bring up the polygon option, then when you click and drag your shape you have to press down on the keyboard to reduce the number of points until you create a triangle.
With the Triangular script: All you have to do is select the layer you want to add a triangle mask to, and hit the button!
Alternatively, if you want to create a triangle shape layer, just make sure no layers are selected and hit the button.