-- Probably a bit unorthodox, but hey, it works


DefaultX = 1304
Causes = 534

local Change = script.Parent.Parent
local LastChange = tick()

function Size()
	repeat wait() until Change.Parent.AbsoluteSize.X ~= 0
	LastChange = tick()
	local ResolutionX = Change.Parent.AbsoluteSize.X
	local x = ResolutionX / DefaultX
	local z = x * Causes
	local y = z / Causes

	local Percentage = Change.AbsoluteSize.X / ResolutionX
	script.Parent.Scale = y
end

Change.Changed:connect(function()
	if tick() - LastChange > 0.1 then
		Size()
	end
end)

Size()
