Made this when @KITTENGAMER999 said that it should be a block in his project: Scratch Needs These Blocks! See inside the code and use the make triangle block that I made. Export the sprite to use it in other projects. Check out the cooler any polygon drawing project here: https://scratch.mit.edu/projects/798977736/
Thanks to @KITTENGAMER999 for the idea, and thanks to @henrymilbert for help with the triangle logic.