function ScopeHUD.willUnmount(X)X.Maid:Destroy()end function ScopeHUD.render(X)return new("\070\114\097\109\101",{Active=true;Draggable=true;Position=X.state.IsToolModeEnabled and UDim2.new(0,5.0,1,-4.0)or UDim2.new(0,5.0,0,4.0),AnchorPoint=X.state.IsToolModeEnabled and Vector2.new(0,1)or Vector2.new(0,0);Size=X.ContainerSize;BackgroundTransparency=1,[Roact.Event.InputBegan]=X.OnInputBegin,[Roact.Event.InputEnded]=X.OnInputEnd},Support.Merge(X:BuildScopeHierarchyButtons(),{Layout=new("\085\073\076\105\115\116\076\097\121\111\117\116",{[Roact.Ref]=X.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=X.props.Core;IsToolModeEnabled=X.state.IsToolModeEnabled})}))end

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
