I will probably not use this, sooooo it is for you guys instead.
Thanks to @potatoanimator for a bit of code. You may have to edit some code to make it work in your project