As a developer, it is currently impossible to determine the 2D gui scaling factor
Consider a 64x64 image:
Using the image as-is
If you use this as-is at 64x64, you get the exact same image on a 1x screen. This is good:
But when the screen scales up, shown here at 2x, the image becomes blurry. This is bad.
Using a higher-resolution image
If you use a higher resolution image, you get the correct image at the scale you uploaded it at, but higher scales become blurry and lower scales suffer from downsampling artefacts:
Observe how the subtle transitions between light and dark areas become washed out and overall lower-contrast. This also has the obvious issue of loading unnecessarily large images on devices where texture memory may be at a premium.
The solution
It seems to me that the only solution here is to read the gui scaling factor and select the correct image to display. Roblox has an API for this, but it’s locked. So my suggestion is to unlock it.