function ScopeHUD.willUnmount(n)n.Maid:Destroy()end function ScopeHUD.render(n)return new("\070\114\097\109\101",{Active=true;Draggable=true,Position=n.state.IsToolModeEnabled and UDim2.new(0,5.0,1,-4.0)or UDim2.new(0,5.0,0,4.0),AnchorPoint=n.state.IsToolModeEnabled and Vector2.new(0,1)or Vector2.new(0,0),Size=n.ContainerSize,BackgroundTransparency=1;[Roact.Event.InputBegan]=n.OnInputBegin;[Roact.Event.InputEnded]=n.OnInputEnd},Support.Merge(n:BuildScopeHierarchyButtons(),{Layout=new("\085\073\076\105\115\116\076\097\121\111\117\116",{[Roact.Ref]=n.LayoutRef,FillDirection=Enum.FillDirection.Horizontal,HorizontalAlignment=Enum.HorizontalAlignment.Left;VerticalAlignment=Enum.VerticalAlignment.Center,SortOrder=Enum.SortOrder.LayoutOrder;Padding=UDim.new(0,2.5)}),ModeToggle=new(ModeToggle,{Core=n.props.Core;IsToolModeEnabled=n.state.IsToolModeEnabled})}))end
--- Cleans up tracking resources.
function ScopeHUD:willUnmount()
	self.Maid:Destroy()
end

function ScopeHUD:render()
	return new(
		"Frame",
		{
			Active = true,
			Draggable = true,
			Position = self.state.IsToolModeEnabled and UDim2.new(0, 10 / 2, 1, -8 / 2)
				or UDim2.new(0, 10 / 2, 0, 8 / 2),
			AnchorPoint = self.state.IsToolModeEnabled and Vector2.new(0, 1) or Vector2.new(0, 0),
			Size = self.ContainerSize,
			BackgroundTransparency = 1,
			[Roact.Event.InputBegan] = self.OnInputBegin,
			[Roact.Event.InputEnded] = self.OnInputEnd,
		},
		Support.Merge(self:BuildScopeHierarchyButtons(), {
			Layout = new("UIListLayout", {
				[Roact.Ref] = self.LayoutRef,
				FillDirection = Enum.FillDirection.Horizontal,
				HorizontalAlignment = Enum.HorizontalAlignment.Left,
				VerticalAlignment = Enum.VerticalAlignment.Center,
				SortOrder = Enum.SortOrder.LayoutOrder,
				Padding = UDim.new(0, 5 / 2),
			}),
			ModeToggle = new(ModeToggle, {
				Core = self.props.Core,
				IsToolModeEnabled = self.state.IsToolModeEnabled,
			}),
		})
	)
end
