The script that gives the path to the Text OPEN SOURCE
Key RequiredUniversal

The script that gives the path to the Text OPEN SOURCE

Universal ScriptKystarnikKystarnik 534 views 22 executesUpdated Mar 1, 2026
Unrated
00
Lua Script•59 lines (2125 chars)
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local GuiService = game:GetService("GuiService")
local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")

local BIND_KEY = Enum.KeyCode.H

print("--- Script Started ---")
print("Press [" .. BIND_KEY.Name .. "] to find GUI objects under cursor.")

local function findGuiUnderCursor()
    local mousePos = UserInputService:GetMouseLocation()
    local inset = GuiService:GetGuiInset()
    
    local adjustedX = mousePos.X - inset.X
    local adjustedY = mousePos.Y - inset.Y
    
    local foundObjects = PlayerGui:GetGuiObjectsAtPosition(adjustedX, adjustedY)
    
    print("--- Scanning Coordinates: " .. math.floor(adjustedX) .. ", " .. math.floor(adjustedY) .. " ---")
    
    local found = false
    for _, obj in ipairs(foundObjects) do
        if obj:IsA("TextLabel") or obj:IsA("TextButton") or obj:IsA("TextBox") or obj:IsA("Frame") or obj:IsA("ScrollingFrame") or obj:IsA("ImageLabel") or obj:IsA("ImageButton") then
            found = true
            print("------------------------------------------")
            print("Object Found: " .. obj.ClassName)
            print("Name: " .. obj.Name)
            print("Path: " .. obj:GetFullName())
            
            if obj:IsA("TextLabel") or obj:IsA("TextButton") or obj:IsA("TextBox") then
                print("Text: " .. tostring(obj.Text))
            end
            
            if obj:IsA("ImageLabel") or obj:IsA("ImageButton") then
                print("Image ID: " .. obj.Image)
            end

            local valChild = obj:FindFirstChild("Value")
            if valChild then
                print("Internal Value: " .. tostring(valChild.Value))
            end
            
            break 
        end
    end
    
    if not found then
        warn("No valid GUI objects found under cursor.")
    end
end

UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end
    if input.KeyCode == BIND_KEY then
        findGuiUnderCursor()
    end
end)

Features & Information

When you click on H, it says the path where a certain text is written, hover over any text in any mode and click on H. Then open the F9 console and look at the path to the textLabel

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts