local M=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local B=(game:GetService("\080\108\097\121\101\114\115")).LocalPlayer:GetMouse()local f=(game:GetService("\087\111\114\107\115\112\097\099\101")).CurrentCamera local e=script.Parent.Parent local D=require(e.Packages.Flipper)local A=require(e.Creator)local n=require(e.Acrylic)local H=require(script.Parent.Assets)local b=script.Parent local d=D.Spring.new local z=D.Instant.new local p=A.New return function(s)local C=require(e)local R={Minimized=false;Maximized=false;Size=s.Size;CurrentPos=0,TabWidth=0,Position=UDim2.fromOffset(f.ViewportSize.X/2-s.Size.X.Offset/2,f.ViewportSize.Y/2-s.Size.Y.Offset/2)}local U,J,o,j=false local v,I=false local w=false R.AcrylicPaint=n.AcrylicPaint()R.TabWidth=s.TabWidth local q=p("\070\114\097\109\101",{Size=UDim2.fromOffset(4,0);BackgroundColor3=Color3.fromRGB(76,194,255),Position=UDim2.fromOffset(0,17);AnchorPoint=Vector2.new(0,.5);ThemeTag={BackgroundColor3="\065\099\099\101\110\116"}},{p("\085\073\067\111\114\110\101\114",{CornerRadius=UDim.new(0,2)})})local V=p("\070\114\097\109\101",{Size=UDim2.fromOffset(20,20);BackgroundTransparency=1;Position=UDim2.new(1,-20,1,-20)})R.TabHolder=p("\083\099\114\111\108\108\105\110\103\070\114\097\109\101",{Size=UDim2.fromScale(1,1);BackgroundTransparency=1;ScrollBarImageTransparency=1;ScrollBarThickness=0;BorderSizePixel=0;CanvasSize=UDim2.fromScale(0,0);ScrollingDirection=Enum.ScrollingDirection.Y},{p("\085\073\076\105\115\116\076\097\121\111\117\116",{Padding=UDim.new(0,4)})})local S=p("\070\114\097\109\101",{Size=UDim2.new(0,R.TabWidth,1,-66),Position=UDim2.new(0,12,0,54),BackgroundTransparency=1,ClipsDescendants=true},{R.TabHolder,q})R.TabDisplay=p("\084\101\120\116\076\097\098\101\108",{RichText=true,Text="\084\097\098";TextTransparency=0,FontFace=Font.new("\114\098\120\097\115\115\101\116\105\100\058\047\047\049\050\049\056\055\051\054\053\051\054\052",Enum.FontWeight.SemiBold,Enum.FontStyle.Normal);TextSize=28;TextXAlignment="\076\101\102\116",TextYAlignment="\067\101\110\116\101\114",Size=UDim2.new(1,-16,0,28),Position=UDim2.fromOffset(R.TabWidth+26,56);BackgroundTransparency=1;ThemeTag={TextColor3="\084\101\120\116"}})R.ContainerHolder=p("\070\114\097\109\101",{Size=UDim2.fromScale(1,1);BackgroundTransparency=1})R.ContainerAnim=p("\067\097\110\118\097\115\071\114\111\117\112",{Size=UDim2.fromScale(1,1);BackgroundTransparency=1})R.ContainerCanvas=p("\070\114\097\109\101",{Size=UDim2.new(1,-R.TabWidth-32,1,-102),Position=UDim2.fromOffset(R.TabWidth+26,90);BackgroundTransparency=1},{R.ContainerAnim;R.ContainerHolder})R.Root=p("\070\114\097\109\101",{BackgroundTransparency=1;Size=R.Size;Position=R.Position;Parent=s.Parent},{R.AcrylicPaint.Frame;R.TabDisplay;R.ContainerCanvas;S,V})R.TitleBar=(require(script.Parent.TitleBar))({Title=s.Title,SubTitle=s.SubTitle;Parent=R.Root;Window=R})if(require(e)).UseAcrylic then R.AcrylicPaint.AddParent(R.Root)end local G=D.GroupMotor.new({X=R.Size.X.Offset,Y=R.Size.Y.Offset})local t=D.GroupMotor.new({X=R.Position.X.Offset,Y=R.Position.Y.Offset})R.SelectorPosMotor=D.SingleMotor.new(17)R.SelectorSizeMotor=D.SingleMotor.new(0)R.ContainerBackMotor=D.SingleMotor.new(0)R.ContainerPosMotor=D.SingleMotor.new(94)G:onStep(function(M)R.Root.Size=UDim2.new(0,M.X,0,M.Y)end)t:onStep(function(M)R.Root.Position=UDim2.new(0,M.X,0,M.Y)end)local u=0 local O=0 R.SelectorPosMotor:onStep(function(M)q.Position=UDim2.new(0,0,0,M+17)local B=tick()local f=B-O if u~=nil then R.SelectorSizeMotor:setGoal(d(math.abs(M-u)/(f*60)+16))u=M end O=B end)R.SelectorSizeMotor:onStep(function(M)q.Size=UDim2.new(0,4,0,M)end)R.ContainerBackMotor:onStep(function(M)R.ContainerAnim.GroupTransparency=M end)R.ContainerPosMotor:onStep(function(M)R.ContainerAnim.Position=UDim2.fromOffset(0,M)end)local T local k R.Maximize=function(M,B,e)R.Maximized=M R.TitleBar.MaxButton.Frame.Icon.Image=M and H.Restore or H.Max if M then T=R.Size.X.Offset k=R.Size.Y.Offset end local A=M and f.ViewportSize.X or T local n=M and f.ViewportSize.Y or k G:setGoal({X=D[e and"\073\110\115\116\097\110\116"or"\083\112\114\105\110\103"].new(A,{frequency=6}),Y=D[e and"\073\110\115\116\097\110\116"or"\083\112\114\105\110\103"].new(n,{frequency=6})})R.Size=UDim2.fromOffset(A,n)if not B then t:setGoal({X=d(M and 0 or R.Position.X.Offset,{frequency=6});Y=d(M and 0 or R.Position.Y.Offset,{frequency=6})})end end A.AddSignal(R.TitleBar.Frame.InputBegan,function(M)if M.UserInputType==Enum.UserInputType.MouseButton1 or M.UserInputType==Enum.UserInputType.Touch then U=true o=M.Position j=R.Root.Position if R.Maximized then j=UDim2.fromOffset(B.X-B.X*((T-100)/R.Root.AbsoluteSize.X),B.Y-B.Y*(k/R.Root.AbsoluteSize.Y))end M.Changed:Connect(function()if M.UserInputState==Enum.UserInputState.End then U=false end end)end end)A.AddSignal(R.TitleBar.Frame.InputChanged,function(M)if M.UserInputType==Enum.UserInputType.MouseMovement or M.UserInputType==Enum.UserInputType.Touch then J=M end end)A.AddSignal(V.InputBegan,function(M)if M.UserInputType==Enum.UserInputType.MouseButton1 or M.UserInputType==Enum.UserInputType.Touch then v=true I=M.Position end end)A.AddSignal(M.InputChanged,function(M)if M==J and U then local B=M.Position-o R.Position=UDim2.fromOffset(j.X.Offset+B.X,j.Y.Offset+B.Y)t:setGoal({X=z(R.Position.X.Offset),Y=z(R.Position.Y.Offset)})if R.Maximized then R.Maximize(false,true,true)end end if(M.UserInputType==Enum.UserInputType.MouseMovement or M.UserInputType==Enum.UserInputType.Touch)and v then local B=M.Position-I local f=R.Size local e=Vector3.new(f.X.Offset,f.Y.Offset,0)+Vector3.new(1,1,0)*B local A=Vector2.new(math.clamp(e.X,470,2048),math.clamp(e.Y,380,2048))G:setGoal({X=D.Instant.new(A.X),Y=D.Instant.new(A.Y)})end end)A.AddSignal(M.InputEnded,function(M)if v==true or M.UserInputType==Enum.UserInputType.Touch then v=false R.Size=UDim2.fromOffset((G:getValue()).X,(G:getValue()).Y)end end)A.AddSignal(R.TabHolder.UIListLayout:GetPropertyChangedSignal("\065\098\115\111\108\117\116\101\067\111\110\116\101\110\116\083\105\122\101"),function()R.TabHolder.CanvasSize=UDim2.new(0,0,0,R.TabHolder.UIListLayout.AbsoluteContentSize.Y)end)A.AddSignal(M.InputBegan,function(B)if type(C.MinimizeKeybind)=="\116\097\098\108\101"and(C.MinimizeKeybind.Type=="\075\101\121\098\105\110\100"and not M:GetFocusedTextBox())then if B.KeyCode.Name==C.MinimizeKeybind.Value then R:Minimize()end elseif B.KeyCode==C.MinimizeKey and not M:GetFocusedTextBox()then R:Minimize()end end)function R.Minimize(M)R.Minimized=not R.Minimized R.Root.Visible=not R.Minimized if not w then w=true local M=C.MinimizeKeybind and C.MinimizeKeybind.Value or C.MinimizeKey.Name C:Notify({Title="\073\110\116\101\114\102\097\099\101",Content="\080\114\101\115\115 "..(M.." \116\111 \116\111\103\103\108\101 \116\104\101 \105\110\116\101\114\102\097\099\101\046");Duration=6})end end function R.Destroy(M)if(require(e)).UseAcrylic then R.AcrylicPaint.Model:Destroy()end R.Root:Destroy()end local m=(require(b.Dialog)):Init(R)function R.Dialog(B,M)local f=m:Create()f.Title.Text=M.Title local e=p("\084\101\120\116\076\097\098\101\108",{FontFace=Font.new("\114\098\120\097\115\115\101\116\058\047\047\102\111\110\116\115\047\102\097\109\105\108\105\101\115\047\071\111\116\104\097\109\083\083\109\046\106\115\111\110"),Text=M.Content,TextColor3=Color3.fromRGB(240,240,240);TextSize=14,TextXAlignment=Enum.TextXAlignment.Left,TextYAlignment=Enum.TextYAlignment.Top;Size=UDim2.new(1,-40,1,0);Position=UDim2.fromOffset(20,60),BackgroundTransparency=1;Parent=f.Root,ClipsDescendants=false;ThemeTag={TextColor3="\084\101\120\116"}})p("\085\073\083\105\122\101\067\111\110\115\116\114\097\105\110\116",{MinSize=Vector2.new(300,165),MaxSize=Vector2.new(620,math.huge);Parent=f.Root})f.Root.Size=UDim2.fromOffset(e.TextBounds.X+40,165)if e.TextBounds.X+40>R.Size.X.Offset-120 then f.Root.Size=UDim2.fromOffset(R.Size.X.Offset-120,165)e.TextWrapped=true f.Root.Size=UDim2.fromOffset(R.Size.X.Offset-120,e.TextBounds.Y+150)end for M,B in next,M.Buttons do f:Button(B.Title,B.Callback)end f:Open()end local N=(require(b.Tab)):Init(R)function R.AddTab(B,M)return N:New(M.Title,M.Icon,R.TabHolder)end function R.SelectTab(B,M)N:SelectTab(1)end A.AddSignal(R.TabHolder:GetPropertyChangedSignal("\067\097\110\118\097\115\080\111\115\105\116\105\111\110"),function()u=N:GetCurrentTabPos()+16 O=0 R.SelectorPosMotor:setGoal(z(N:GetCurrentTabPos()))end)return R end
-- i will rewrite this someday
local UserInputService = game:GetService("UserInputService")
local Mouse = game:GetService("Players").LocalPlayer:GetMouse()
local Camera = game:GetService("Workspace").CurrentCamera

local Root = script.Parent.Parent
local Flipper = require(Root.Packages.Flipper)
local Creator = require(Root.Creator)
local Acrylic = require(Root.Acrylic)
local Assets = require(script.Parent.Assets)
local Components = script.Parent

local Spring = Flipper.Spring.new
local Instant = Flipper.Instant.new
local New = Creator.New

return function(Config)
	local Library = require(Root)

	local Window = {
		Minimized = false,
		Maximized = false,
		Size = Config.Size,
		CurrentPos = 0,
		TabWidth = 0,
		Position = UDim2.fromOffset(
			Camera.ViewportSize.X / 2 - Config.Size.X.Offset / 2,
			Camera.ViewportSize.Y / 2 - Config.Size.Y.Offset / 2
		),
	}

	local Dragging, DragInput, MousePos, StartPos = false
	local Resizing, ResizePos = false
	local MinimizeNotif = false

	Window.AcrylicPaint = Acrylic.AcrylicPaint()
	Window.TabWidth = Config.TabWidth

	local Selector = New("Frame", {
		Size = UDim2.fromOffset(4, 0),
		BackgroundColor3 = Color3.fromRGB(76, 194, 255),
		Position = UDim2.fromOffset(0, 17),
		AnchorPoint = Vector2.new(0, 0.5),
		ThemeTag = {
			BackgroundColor3 = "Accent",
		},
	}, {
		New("UICorner", {
			CornerRadius = UDim.new(0, 2),
		}),
	})

	local ResizeStartFrame = New("Frame", {
		Size = UDim2.fromOffset(20, 20),
		BackgroundTransparency = 1,
		Position = UDim2.new(1, -20, 1, -20),
	})

	Window.TabHolder = New("ScrollingFrame", {
		Size = UDim2.fromScale(1, 1),
		BackgroundTransparency = 1,
		ScrollBarImageTransparency = 1,
		ScrollBarThickness = 0,
		BorderSizePixel = 0,
		CanvasSize = UDim2.fromScale(0, 0),
		ScrollingDirection = Enum.ScrollingDirection.Y,
	}, {
		New("UIListLayout", {
			Padding = UDim.new(0, 4),
		}),
	})

	local TabFrame = New("Frame", {
		Size = UDim2.new(0, Window.TabWidth, 1, -66),
		Position = UDim2.new(0, 12, 0, 54),
		BackgroundTransparency = 1,
		ClipsDescendants = true,
	}, {
		Window.TabHolder,
		Selector,
	})

	Window.TabDisplay = New("TextLabel", {
		RichText = true,
		Text = "Tab",
		TextTransparency = 0,
		FontFace = Font.new("rbxassetid://12187365364", Enum.FontWeight.SemiBold, Enum.FontStyle.Normal),
		TextSize = 28,
		TextXAlignment = "Left",
		TextYAlignment = "Center",
		Size = UDim2.new(1, -16, 0, 28),
		Position = UDim2.fromOffset(Window.TabWidth + 26, 56),
		BackgroundTransparency = 1,
		ThemeTag = {
			TextColor3 = "Text",
		},
	})

	Window.ContainerHolder = New("Frame", {
		Size = UDim2.fromScale(1, 1),
		BackgroundTransparency = 1,
	})

	Window.ContainerAnim = New("CanvasGroup", {
		Size = UDim2.fromScale(1, 1),
		BackgroundTransparency = 1,
	})

	Window.ContainerCanvas = New("Frame", {
		Size = UDim2.new(1, -Window.TabWidth - 32, 1, -102),
		Position = UDim2.fromOffset(Window.TabWidth + 26, 90),
		BackgroundTransparency = 1,
	}, {
		Window.ContainerAnim,
		Window.ContainerHolder
	})

	Window.Root = New("Frame", {
		BackgroundTransparency = 1,
		Size = Window.Size,
		Position = Window.Position,
		Parent = Config.Parent,
	}, {
		Window.AcrylicPaint.Frame,
		Window.TabDisplay,
		Window.ContainerCanvas,
		TabFrame,
		ResizeStartFrame,
	})

	Window.TitleBar = require(script.Parent.TitleBar)({
		Title = Config.Title,
		SubTitle = Config.SubTitle,
		Parent = Window.Root,
		Window = Window,
	})

	if require(Root).UseAcrylic then
		Window.AcrylicPaint.AddParent(Window.Root)
	end

	local SizeMotor = Flipper.GroupMotor.new({
		X = Window.Size.X.Offset,
		Y = Window.Size.Y.Offset,
	})

	local PosMotor = Flipper.GroupMotor.new({
		X = Window.Position.X.Offset,
		Y = Window.Position.Y.Offset,
	})

	Window.SelectorPosMotor = Flipper.SingleMotor.new(17)
	Window.SelectorSizeMotor = Flipper.SingleMotor.new(0)
	Window.ContainerBackMotor = Flipper.SingleMotor.new(0)
	Window.ContainerPosMotor = Flipper.SingleMotor.new(94)

	SizeMotor:onStep(function(values)
		Window.Root.Size = UDim2.new(0, values.X, 0, values.Y)
	end)

	PosMotor:onStep(function(values)
		Window.Root.Position = UDim2.new(0, values.X, 0, values.Y)
	end)

	local LastValue = 0
	local LastTime = 0
	Window.SelectorPosMotor:onStep(function(Value)
		Selector.Position = UDim2.new(0, 0, 0, Value + 17)
		local Now = tick()
		local DeltaTime = Now - LastTime

		if LastValue ~= nil then
			Window.SelectorSizeMotor:setGoal(Spring((math.abs(Value - LastValue) / (DeltaTime * 60)) + 16))
			LastValue = Value
		end
		LastTime = Now
	end)

	Window.SelectorSizeMotor:onStep(function(Value)
		Selector.Size = UDim2.new(0, 4, 0, Value)
	end)

	Window.ContainerBackMotor:onStep(function(Value)
		Window.ContainerAnim.GroupTransparency = Value
	end)

	Window.ContainerPosMotor:onStep(function(Value)
		Window.ContainerAnim.Position = UDim2.fromOffset(0, Value)
	end)

	local OldSizeX
	local OldSizeY
	Window.Maximize = function(Value, NoPos, Instant)
		Window.Maximized = Value
		Window.TitleBar.MaxButton.Frame.Icon.Image = Value and Assets.Restore or Assets.Max

		if Value then
			OldSizeX = Window.Size.X.Offset
			OldSizeY = Window.Size.Y.Offset
		end
		local SizeX = Value and Camera.ViewportSize.X or OldSizeX
		local SizeY = Value and Camera.ViewportSize.Y or OldSizeY
		SizeMotor:setGoal({
			X = Flipper[Instant and "Instant" or "Spring"].new(SizeX, { frequency = 6 }),
			Y = Flipper[Instant and "Instant" or "Spring"].new(SizeY, { frequency = 6 }),
		})
		Window.Size = UDim2.fromOffset(SizeX, SizeY)

		if not NoPos then
			PosMotor:setGoal({
				X = Spring(Value and 0 or Window.Position.X.Offset, { frequency = 6 }),
				Y = Spring(Value and 0 or Window.Position.Y.Offset, { frequency = 6 }),
			})
		end
	end

	Creator.AddSignal(Window.TitleBar.Frame.InputBegan, function(Input)
		if
			Input.UserInputType == Enum.UserInputType.MouseButton1
			or Input.UserInputType == Enum.UserInputType.Touch
		then
			Dragging = true
			MousePos = Input.Position
			StartPos = Window.Root.Position

			if Window.Maximized then
				StartPos = UDim2.fromOffset(
					Mouse.X - (Mouse.X * ((OldSizeX - 100) / Window.Root.AbsoluteSize.X)),
					Mouse.Y - (Mouse.Y * (OldSizeY / Window.Root.AbsoluteSize.Y))
				)
			end

			Input.Changed:Connect(function()
				if Input.UserInputState == Enum.UserInputState.End then
					Dragging = false
				end
			end)
		end
	end)

	Creator.AddSignal(Window.TitleBar.Frame.InputChanged, function(Input)
		if
			Input.UserInputType == Enum.UserInputType.MouseMovement
			or Input.UserInputType == Enum.UserInputType.Touch
		then
			DragInput = Input
		end
	end)

	Creator.AddSignal(ResizeStartFrame.InputBegan, function(Input)
		if
			Input.UserInputType == Enum.UserInputType.MouseButton1
			or Input.UserInputType == Enum.UserInputType.Touch
		then
			Resizing = true
			ResizePos = Input.Position
		end
	end)

	Creator.AddSignal(UserInputService.InputChanged, function(Input)
		if Input == DragInput and Dragging then
			local Delta = Input.Position - MousePos
			Window.Position = UDim2.fromOffset(StartPos.X.Offset + Delta.X, StartPos.Y.Offset + Delta.Y)
			PosMotor:setGoal({
				X = Instant(Window.Position.X.Offset),
				Y = Instant(Window.Position.Y.Offset),
			})

			if Window.Maximized then
				Window.Maximize(false, true, true)
			end
		end

		if
			(Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch)
			and Resizing
		then
			local Delta = Input.Position - ResizePos
			local StartSize = Window.Size

			local TargetSize = Vector3.new(StartSize.X.Offset, StartSize.Y.Offset, 0) + Vector3.new(1, 1, 0) * Delta
			local TargetSizeClamped =
				Vector2.new(math.clamp(TargetSize.X, 470, 2048), math.clamp(TargetSize.Y, 380, 2048))

			SizeMotor:setGoal({
				X = Flipper.Instant.new(TargetSizeClamped.X),
				Y = Flipper.Instant.new(TargetSizeClamped.Y),
			})
		end
	end)

	Creator.AddSignal(UserInputService.InputEnded, function(Input)
		if Resizing == true or Input.UserInputType == Enum.UserInputType.Touch then
			Resizing = false
			Window.Size = UDim2.fromOffset(SizeMotor:getValue().X, SizeMotor:getValue().Y)
		end
	end)

	Creator.AddSignal(Window.TabHolder.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
		Window.TabHolder.CanvasSize = UDim2.new(0, 0, 0, Window.TabHolder.UIListLayout.AbsoluteContentSize.Y)
	end)

	Creator.AddSignal(UserInputService.InputBegan, function(Input)
		if
			type(Library.MinimizeKeybind) == "table"
			and Library.MinimizeKeybind.Type == "Keybind"
			and not UserInputService:GetFocusedTextBox()
		then
			if Input.KeyCode.Name == Library.MinimizeKeybind.Value then
				Window:Minimize()
			end
		elseif Input.KeyCode == Library.MinimizeKey and not UserInputService:GetFocusedTextBox() then
			Window:Minimize()
		end
	end)

	function Window:Minimize()
		Window.Minimized = not Window.Minimized
		Window.Root.Visible = not Window.Minimized
		if not MinimizeNotif then
			MinimizeNotif = true
			local Key = Library.MinimizeKeybind and Library.MinimizeKeybind.Value or Library.MinimizeKey.Name
			Library:Notify({
				Title = "Interface",
				Content = "Press " .. Key .. " to toggle the interface.",
				Duration = 6
			})
		end
	end

	function Window:Destroy()
		if require(Root).UseAcrylic then
			Window.AcrylicPaint.Model:Destroy()
		end
		Window.Root:Destroy()
	end

	local DialogModule = require(Components.Dialog):Init(Window)
	function Window:Dialog(Config)
		local Dialog = DialogModule:Create()
		Dialog.Title.Text = Config.Title

		local Content = New("TextLabel", {
			FontFace = Font.new("rbxasset://fonts/families/GothamSSm.json"),
			Text = Config.Content,
			TextColor3 = Color3.fromRGB(240, 240, 240),
			TextSize = 14,
			TextXAlignment = Enum.TextXAlignment.Left,
			TextYAlignment = Enum.TextYAlignment.Top,
			Size = UDim2.new(1, -40, 1, 0),
			Position = UDim2.fromOffset(20, 60),
			BackgroundTransparency = 1,
			Parent = Dialog.Root,
			ClipsDescendants = false,
			ThemeTag = {
				TextColor3 = "Text",
			},
		})

		New("UISizeConstraint", {
			MinSize = Vector2.new(300, 165),
			MaxSize = Vector2.new(620, math.huge),
			Parent = Dialog.Root,
		})

		Dialog.Root.Size = UDim2.fromOffset(Content.TextBounds.X + 40, 165)
		if Content.TextBounds.X + 40 > Window.Size.X.Offset - 120 then
			Dialog.Root.Size = UDim2.fromOffset(Window.Size.X.Offset - 120, 165)
			Content.TextWrapped = true
			Dialog.Root.Size = UDim2.fromOffset(Window.Size.X.Offset - 120, Content.TextBounds.Y + 150)
		end

		for _, Button in next, Config.Buttons do
			Dialog:Button(Button.Title, Button.Callback)
		end

		Dialog:Open()
	end

	local TabModule = require(Components.Tab):Init(Window)
	function Window:AddTab(TabConfig)
		return TabModule:New(TabConfig.Title, TabConfig.Icon, Window.TabHolder)
	end

	function Window:SelectTab(Tab)
		TabModule:SelectTab(1)
	end

	Creator.AddSignal(Window.TabHolder:GetPropertyChangedSignal("CanvasPosition"), function()
		LastValue = TabModule:GetCurrentTabPos() + 16
		LastTime = 0
		Window.SelectorPosMotor:setGoal(Instant(TabModule:GetCurrentTabPos()))
	end)

	return Window
end
