Look in the code to see how it works!
I made this mainly for my interminable rooms game, but you can use it if you want! Credit @RandomMan370Again please!