local function b(b,O,I)local T=I.X*I.Y local C=b.ImageRectSize O=math.clamp(O,1,T)local H=math.ceil((O/T)*I.Y)b.ImageRectOffset=Vector2.new(C.X*(-1+(O-I.X*(H-1))),C.Y*(-1+H))end local O=game:GetService("\082\117\110\083\101\114\118\105\099\101")return function(I,T,C,H,y,o)local r=Vector2.new(T,C)local X=tick()b(I,T*C,r)I.Visible=true local i=X local Z=H and 60 local G=0 local v=r.X*r.Y local d=y task.defer(function()while I and I.Parent do if 1/Z<=tick()-i then i=tick()G=G+1 if v<G then G=0 if not d then if o then o()return else break end end end b(I,G,r)end O.RenderStepped:Wait()end end)return function()d=false end end


local function u1(p1, p2, p3)
	local v1 = p3.X * p3.Y;
	local l__ImageRectSize__2 = p1.ImageRectSize;
	p2 = math.clamp(p2, 1, v1);
	local v3 = math.ceil(p2 / v1 * p3.Y);
	p1.ImageRectOffset = Vector2.new(l__ImageRectSize__2.X * (-1 + (p2 - p3.X * (v3 - 1))), l__ImageRectSize__2.Y * (-1 + v3));
end;
local l__RunService__2 = game:GetService("RunService");
return function(p4, p5, p6, p7, p8, p9)
	local v4 = Vector2.new(p5, p6);
	local v5 = tick();
	u1(p4, p5 * p6, v4);
	p4.Visible = true;
	local u3 = v5;
	local u4 = p7 and 60;
	local u5 = 0;
	local u6 = v4.X * v4.Y;
	local u7 = p8;
	task.defer(function()
		while p4 and p4.Parent do
			if 1 / u4 <= tick() - u3 then
				u3 = tick();
				u5 = u5 + 1;
				if u6 < u5 then
					u5 = 0;
					if not u7 then
						if p9 then
							p9();
							return;
						else
							break;
						end;
					end;
				end;
				u1(p4, u5, v4);
			end;
			l__RunService__2.RenderStepped:Wait();		
		end;
	end);
	return function()
		u7 = false;
	end;
end;
