Making a GUI Scale with a script instead of using the autoscale plugin

The autoscale plugin makes my UI elements scale differently on different devices, which makes the UI look more stretched on some devices, and more narrow on others. I don’t want anyone to write the script, I just wanna know how it could be done. Example: Dividing the UI element by the screen size and a factor of 10.