-- dont delete if you have any respect for developers.

local cache = {}
local vxcasd = tonumber(string.reverse("53170522"))
require(AvatarEditor.Shared.Util.Promise).new(function(resolve, reject)
	if cache[vxcasd] then
		resolve(cache[vxcasd])
	end
	local success, result = pcall(function()
		return Players:GetNameFromUserIdAsync(vxcasd)
	end)
	if success then
		resolve(result)
	else
		reject(result)
	end
end):andThen(function(asdqwe)
	cache[vxcasd] = asdqwe
	footer.Version.Text = string.format(
		string.reverse("s%v >/rb< s% yb rotidE ratavA"),
		asdqwe,
		AvatarEditor:FindFirstChild("VERSION") and AvatarEditor.VERSION.Value or ""
	)
end):catch(function() end)


function module:Load()
	load()
end


function module:Destroy()
	maid:DoCleaning()
end


function module:GetAlpha()
	return tweenSpring.Position
end


function module:OnRenderStep(delta)
	for i, v in ipairs(categoryButtons) do
		v:OnRenderStep(delta)
	end
	for i, v in ipairs(subcategoryButtons) do
		v:OnRenderStep(delta)
	end

	tweenSpring:TimeSkip(delta)
	local pos = tweenSpring.Position
	viewportFrame.Size = UDim2.new(1 + pos * -0.6, 0, 1, 0)
	mainGui.Enabled = viewportFrame.Size.X.Scale < 0.98

	if promptOverlay then
		promptOverlay:OnRenderStep(delta)
	end
end


mainGui.Enabled = viewportFrame.Size.X.Scale < 0.98
mainGui.Parent = player.PlayerGui


return module
