For anyone looking in the future, I figured it out with this post and video and then created the below code