local TweenService = game:GetService("TweenService") local UserInputService = game:GetService("UserInputService") local ScreenGui = Instance.new("ScreenGui") local MainFrame = Instance.new("Frame") local CloseButton = Instance.new("TextButton") local TitleLabel = Instance.new("TextLabel") local PartNameLabel = Instance.new("TextLabel") local MenuButton = Instance.new("TextButton") local ConfigFrame = Instance.new("Frame") local OpenKeyLabel = Instance.new("TextLabel") local OpenKeyButton = Instance.new("TextButton") local UICorner = Instance.new("UICorner") ScreenGui.Name = "PartIdentifier" ScreenGui.Parent = game.CoreGui MainFrame.Name = "MainFrame" MainFrame.Parent = ScreenGui MainFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50) MainFrame.Position = UDim2.new(0.5, -225, 0.5, -150) MainFrame.Size = UDim2.new(0, 450, 0, 300) MainFrame.Active = true MainFrame.Draggable = true MainFrame.ClipsDescendants = true UICorner.CornerRadius = UDim.new(0, 20) UICorner.Parent = MainFrame TitleLabel.Name = "TitleLabel" TitleLabel.Parent = MainFrame TitleLabel.BackgroundColor3 = Color3.fromRGB(100, 100, 100) TitleLabel.Size = UDim2.new(1, 0, 0.1, 0) TitleLabel.Font = Enum.Font.SourceSansBold TitleLabel.Text = "Part Identifier" TitleLabel.TextColor3 = Color3.fromRGB(255, 255, 255) TitleLabel.TextScaled = true CloseButton.Name = "CloseButton" CloseButton.Parent = MainFrame CloseButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50) CloseButton.Position = UDim2.new(0.85, 0, 0, 0) CloseButton.Size = UDim2.new(0.15, 0, 0.1, 0) CloseButton.Font = Enum.Font.SourceSansBold CloseButton.Text = "X" CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255) CloseButton.TextScaled = true PartNameLabel.Name = "PartNameLabel" PartNameLabel.Parent = MainFrame PartNameLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255) PartNameLabel.Position = UDim2.new(0.15, 0, 0.1, 0) PartNameLabel.Size = UDim2.new(0.85, 0, 0.9, 0) PartNameLabel.Font = Enum.Font.SourceSans PartNameLabel.Text = "Select a part to see its name" PartNameLabel.TextColor3 = Color3.fromRGB(0, 0, 0) PartNameLabel.TextScaled = false PartNameLabel.TextSize = 20 MenuButton.Name = "MenuButton" MenuButton.Parent = MainFrame MenuButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50) MenuButton.Position = UDim2.new(0, 0, 0, 0) MenuButton.Size = UDim2.new(0.15, 0, 0.1, 0) MenuButton.Font = Enum.Font.SourceSansBold MenuButton.Text = "≡" MenuButton.TextColor3 = Color3.fromRGB(255, 255, 255) MenuButton.TextScaled = true ConfigFrame.Name = "ConfigFrame" ConfigFrame.Parent = MainFrame ConfigFrame.BackgroundColor3 = Color3.fromRGB(70, 70, 70) ConfigFrame.Position = UDim2.new(0, 0, 0.1, 0) ConfigFrame.Size = UDim2.new(0.15, 0, 0.9, 0) ConfigFrame.Visible = false OpenKeyLabel.Name = "OpenKeyLabel" OpenKeyLabel.Parent = ConfigFrame OpenKeyLabel.BackgroundColor3 = Color3.fromRGB(70, 70, 70) OpenKeyLabel.Position = UDim2.new(0, 0, 0, 0) OpenKeyLabel.Size = UDim2.new(1, 0, 0.5, 0) OpenKeyLabel.Font = Enum.Font.SourceSans OpenKeyLabel.Text = "Toggle UI" OpenKeyLabel.TextColor3 = Color3.fromRGB(255, 255, 255) OpenKeyLabel.TextScaled = true OpenKeyButton.Name = "OpenKeyButton" OpenKeyButton.Parent = ConfigFrame OpenKeyButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100) OpenKeyButton.Position = UDim2.new(0, 0, 0.5, 0) OpenKeyButton.Size = UDim2.new(1, 0, 0.5, 0) OpenKeyButton.Font = Enum.Font.SourceSansBold OpenKeyButton.Text = "Set Key" OpenKeyButton.TextColor3 = Color3.fromRGB(255, 255, 255) OpenKeyButton.TextScaled = true local highlightedPart local originalColor local openKey = Enum.KeyCode.I local uiOpen = true local isSettingKey = false local function highlightPart(part) if highlightedPart then highlightedPart.BrickColor = originalColor end highlightedPart = part originalColor = part.BrickColor highlightedPart.BrickColor = BrickColor.new("Bright green") end local function unhighlightPart() if highlightedPart then highlightedPart.BrickColor = originalColor highlightedPart = nil end end local function toggleConfig() ConfigFrame.Visible = not ConfigFrame.Visible end local function setKey() OpenKeyLabel.Text = "Press any key..." isSettingKey = true local connection connection = UserInputService.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.Keyboard then openKey = input.KeyCode OpenKeyButton.Text = "Key: " .. input.KeyCode.Name OpenKeyLabel.Text = "Toggle UI" isSettingKey = false connection:Disconnect() end end) end CloseButton.MouseButton1Click:Connect(function() MainFrame.Visible = false uiOpen = false unhighlightPart() end) OpenKeyButton.MouseButton1Click:Connect(function() setKey() end) MenuButton.MouseButton1Click:Connect(function() toggleConfig() end) local player = game.Players.LocalPlayer local mouse = player:GetMouse() mouse.Button1Down:Connect(function() if uiOpen and mouse.Target and mouse.Target:IsA("BasePart") then local part = mouse.Target highlightPart(part) PartNameLabel.Text = "Part Name: " .. part.Name end end) UserInputService.InputBegan:Connect(function(input, processed) if not processed and input.KeyCode == openKey and not isSettingKey then uiOpen = not uiOpen MainFrame.Visible = uiOpen if not uiOpen then unhighlightPart() -- Des-seleccionar la parte cuando la UI se cierre end end end)