Probably overcomplicated, but I wanted to try my hand at creating a procedural script.