melhores o ui, deixe mais sério e compacto:
using System.Text;
using Oxide.Core.Plugins;
using Oxide.Game.Rust.Cui;
using UnityEngine;

namespace Oxide.Plugins
{
    [Info("QuarryComputerUi", "YourName", "1.0.0")]
    public class QuarryComputerUi : RustPlugin
    {
        [PluginReference]
        private Plugin ImageLibrary;

        private static class UIConfig
        {
            public static string BackgroundColor = "0.2 0.2 0.2 1";
            public static string TitleColor = "1 1 1 1";
            public static string ButtonTextColor = "1 1 1 1";
            public static string ButtonCloseColor = "0.8 0.2 0.2 1";
            public static string ButtonActionColor = "0.2 0.6 1 1";
            public static string ButtonRemoveColor = "0.9 0.5 0.2 1";
            public static string PanelAnchorMin = "0.3 0.1";
            public static string PanelAnchorMax = "0.7 0.9";
            public static string TitleText = "Resource Management";
            public static string UpgradeButtonText = "Upgrade";
            public static string RemoveButtonText = "Remove";
            public static int TitleFontSize = 24;
            public static int ButtonFontSize = 16;
            public static int LabelFontSize = 12;
        }

        private void OnServerInitialized()
        {
            foreach (var player in BasePlayer.activePlayerList)
            {
                CloseUI(player);
            }
        }

        private void Unload()
        {
            foreach (var player in BasePlayer.activePlayerList)
            {
                CloseUI(player);
            }
        }

        [ChatCommand("ui")]
        private void OpenUI(BasePlayer player)
        {
            CuiHelper.DestroyUi(player, "QuarryComputerUi_Background");
            var container = new CuiElementContainer();
            AddMainPanel(container);
            AddTitle(container);
            AddResourceTable(container);
            AddButtons(container);
            CuiHelper.AddUi(player, container);
        }

        private void AddMainPanel(CuiElementContainer container)
        {
            container.Add(
                new CuiPanel
                {
                    Image = { Color = UIConfig.BackgroundColor },
                    RectTransform = { AnchorMin = UIConfig.PanelAnchorMin, AnchorMax = UIConfig.PanelAnchorMax },
                    CursorEnabled = true,
                },
                "Overlay",
                "QuarryComputerUi_Background"
            );
        }

        private void AddTitle(CuiElementContainer container)
        {
            container.Add(
                new CuiLabel
                {
                    Text =
                    {
                        Text = UIConfig.TitleText,
                        FontSize = UIConfig.TitleFontSize,
                        Align = TextAnchor.MiddleCenter,
                        Color = UIConfig.TitleColor,
                    },
                    RectTransform = { AnchorMin = "0 0.95", AnchorMax = "1 1" },
                },
                "QuarryComputerUi_Background"
            );
        }

        private void AddButtons(CuiElementContainer container)
        {
            AddCloseButton(container, "0.88 0.92", "0.98 0.98");
            AddActionButton(container, UIConfig.UpgradeButtonText, "ui.upgrade", "0.1 0.05", "0.45 0.12");
            AddActionButton(container, UIConfig.RemoveButtonText, "ui.remove", "0.55 0.05", "0.9 0.12");
        }

        private void AddCloseButton(CuiElementContainer container, string anchorMin, string anchorMax)
        {
            container.Add(
                new CuiButton
                {
                    Button =
                    {
                        Color = UIConfig.ButtonCloseColor,
                        Command = "ui.close",
                        Close = "QuarryComputerUi_Background",
                    },
                    RectTransform = { AnchorMin = anchorMin, AnchorMax = anchorMax },
                    Text =
                    {
                        Text = "X",
                        FontSize = UIConfig.ButtonFontSize,
                        Align = TextAnchor.MiddleCenter,
                        Color = UIConfig.ButtonTextColor,
                    },
                },
                "QuarryComputerUi_Background"
            );
        }

        private void AddActionButton(CuiElementContainer container, string buttonText, string command, string anchorMin, string anchorMax)
        {
            container.Add(
                new CuiButton
                {
                    Button =
                    {
                        Color = UIConfig.ButtonActionColor,
                        Command = command,
                        Close = "QuarryComputerUi_Background",
                    },
                    RectTransform = { AnchorMin = anchorMin, AnchorMax = anchorMax },
                    Text =
                    {
                        Text = buttonText,
                        FontSize = UIConfig.ButtonFontSize,
                        Align = TextAnchor.MiddleCenter,
                        Color = UIConfig.ButtonTextColor,
                    },
                },
                "QuarryComputerUi_Background"
            );
        }

        private void AddResourceTable(CuiElementContainer container)
        {
            float startY = 0.85f;
            float stepY = 0.09f; // Reduced even further to tighten spaces
            AddResourceRow(container, "crude.oil", 3, "0.1", startY);
            AddResourceRow(container, "hq.metal.ore", 2, "0.1", startY - stepY);
            AddResourceRow(container, "metal.ore", 45, "0.1", startY - 2 * stepY);
            AddResourceRow(container, "stones", 300, "0.1", startY - 3 * stepY);
            AddResourceRow(container, "sulfur.ore", 40, "0.1", startY - 4 * stepY);
        }

        private void AddResourceRow(CuiElementContainer container, string resourceName, int quantity, string startX, float startY)
        {
            float imageWidth = 0.06f; // Adjust image size to ensure compactness
            string anchorMinImage = $"{startX} {startY}";
            string anchorMaxImage = $"{float.Parse(startX) + imageWidth} {startY + imageWidth}";
            string anchorMinLabel = $"{float.Parse(startX) + imageWidth + 0.01f} {startY}";
            string anchorMaxLabel = $"{float.Parse(anchorMinLabel.Split(' ')[0]) + 0.3f} {startY + imageWidth}";
            UI_AddImage(container, resourceName, 0, anchorMinImage, anchorMaxImage);
            AddLabel(container, $"{resourceName.Replace(".", " ")}: {quantity}", anchorMinLabel, anchorMaxLabel);
        }

        private void AddLabel(CuiElementContainer container, string text, string anchorMin, string anchorMax)
        {
            container.Add(
                new CuiLabel
                {
                    Text =
                    {
                        Text = text,
                        FontSize = UIConfig.LabelFontSize,
                        Align = TextAnchor.MiddleLeft,
                        Color = UIConfig.ButtonTextColor,
                    },
                    RectTransform = { AnchorMin = anchorMin, AnchorMax = anchorMax },
                },
                "QuarryComputerUi_Background"
            );
        }

        private void UI_AddImage(CuiElementContainer container, string shortname, ulong skin, string anchorMin, string anchorMax, string color = "1 1 1 1")
        {
            string imageUrl = (string)ImageLibrary?.Call("GetImage", shortname, skin);
            if (imageUrl == null)
            {
                PrintError($"Failed to get image for item: {shortname}");
                return;
            }

            container.Add(
                new CuiElement
                {
                    Parent = "QuarryComputerUi_Background",
                    Components =
                    {
                        new CuiRawImageComponent { Png = imageUrl, Color = color },
                        new CuiRectTransformComponent { AnchorMin = anchorMin, AnchorMax = anchorMax },
                    },
                }
            );
        }

        [ConsoleCommand("ui.close")]
        private void CmdCloseUI(ConsoleSystem.Arg args)
        {
            var player = args?.Player();
            if (player != null)
            {
                CloseUI(player);
            }
        }

        [ConsoleCommand("ui.remove")]
        private void CmdRemove(ConsoleSystem.Arg args)
        {
            var player = args?.Player();
            if (player != null)
            {
                PrintToChat(player, "You clicked on Remove!");
                CloseUI(player);
            }
        }

        [ConsoleCommand("ui.upgrade")]
        private void CmdUpgrade(ConsoleSystem.Arg args)
        {
            var player = args?.Player();
            if (player != null)
            {
                PrintToChat(player, "You clicked on Upgrade!");
                CloseUI(player);
            }
        }

        private void CloseUI(BasePlayer player)
        {
            CuiHelper.DestroyUi(player, "QuarryComputerUi_Background");
        }
    }
}