local RunService = game:GetService("RunService") local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local Camera = workspace.CurrentCamera local map = workspace:FindFirstChild("Map") local house = nil if map then house = map:FindFirstChild("House") or map:FindFirstChild("House II") or map:FindFirstChild("School") or map:FindFirstChild("Cemetry") or map:FindFirstChild("Mansion") or map:FindFirstChild("Ski resort") end local TOOL_PATH = nil if house then TOOL_PATH = house:FindFirstChild("Tools") end if TOOL_PATH then print("Am găsit folderul Tools!") else warn("Folderul Tools nu a fost găsit.") end local ESP_COLOR = Color3.fromRGB(0, 255, 0) -- Green color for visualization local MAX_DISPLAY_DISTANCE = 100 -- Maximum distance to show labels -- Create a folder for our visualization elements local VisualizationFolder = Instance.new("Folder") VisualizationFolder.Name = "ToolVisualization" VisualizationFolder.Parent = game.CoreGui -- Function to create a visualization label local function createLabel() local label = Instance.new("BillboardGui") label.Name = "ToolLabel" label.AlwaysOnTop = true label.Size = UDim2.new(0, 100, 0, 40) label.StudsOffset = Vector3.new(0, 2, 0) local text = Instance.new("TextLabel") text.Name = "InfoText" text.BackgroundTransparency = 1 text.Size = UDim2.new(1, 0, 1, 0) text.Font = Enum.Font.GothamBold text.TextColor3 = ESP_COLOR text.TextStrokeTransparency = 0.4 text.TextSize = 14 text.Text = "Tool" text.Parent = label return label end -- Function to create a visual box around objects local function createBox() local box = Instance.new("BoxHandleAdornment") box.Name = "ToolBox" box.Adornee = nil box.AlwaysOnTop = true box.ZIndex = 10 box.Color3 = ESP_COLOR box.Transparency = 0.7 return box end -- Function to update a visualization for a single tool local function updateToolVisualization(tool, label, box) if not tool or not tool:IsA("BasePart") and not tool:FindFirstChildWhichIsA("BasePart") then label.Enabled = false box.Visible = false return end local targetPart = tool:IsA("BasePart") and tool or tool:FindFirstChildWhichIsA("BasePart") if not targetPart then label.Enabled = false box.Visible = false return end -- Calculate distance to player local distance = (LocalPlayer.Character and LocalPlayer.Character:GetPivot().Position - targetPart.Position).Magnitude or 0 -- Only show if within range if distance > MAX_DISPLAY_DISTANCE then label.Enabled = false box.Visible = false return end -- Update label label.Enabled = true label.Adornee = targetPart label.InfoText.Text = tool.Name .. "\n[" .. math.floor(distance) .. " studs]" -- Update box box.Visible = true box.Adornee = targetPart box.Size = targetPart.Size + Vector3.new(0.1, 0.1, 0.1) end -- Function to find all tools in the specified path local function findTools() if not TOOL_PATH then warn("Tool path not found: Workspace > Map > House > Tools") return {} end local tools = {} for _, tool in pairs(TOOL_PATH:GetChildren()) do table.insert(tools, tool) end return tools end -- Create visualization elements for all tools local visualElements = {} -- Function to initialize the visualization system local function initializeVisualization() -- Clear any existing elements VisualizationFolder:ClearAllChildren() visualElements = {} -- Find tools and create visualization elements local tools = findTools() for _, tool in pairs(tools) do local label = createLabel() label.Parent = VisualizationFolder local box = createBox() box.Parent = VisualizationFolder visualElements[tool] = { label = label, box = box } end print("Tool visualization initialized with " .. #tools .. " tools") end -- Update loop local function updateVisualization() for tool, elements in pairs(visualElements) do updateToolVisualization(tool, elements.label, elements.box) end end -- Monitor for new tools local function monitorTools() if TOOL_PATH then TOOL_PATH.ChildAdded:Connect(function(child) -- Create new visualization elements for the new tool local label = createLabel() label.Parent = VisualizationFolder local box = createBox() box.Parent = VisualizationFolder visualElements[child] = { label = label, box = box } print("New tool detected: " .. child.Name) end) TOOL_PATH.ChildRemoved:Connect(function(child) -- Remove visualization elements for the removed tool if visualElements[child] then visualElements[child].label:Destroy() visualElements[child].box:Destroy() visualElements[child] = nil print("Tool removed: " .. child.Name) end end) end end -- Toggle function to enable/disable visualization local function toggleVisualization() VisualizationFolder.Visible = not VisualizationFolder.Visible return VisualizationFolder.Visible end -- Initialize when the script runs initializeVisualization() monitorTools() -- Connect update function to RenderStepped for smooth updates local connection = RunService.RenderStepped:Connect(updateVisualization) -- Provide a way to toggle the visualization (can be connected to a keybind) local isEnabled = true local UserInputService = game:GetService("UserInputService") UserInputService.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.F3 then -- F3 key to toggle isEnabled = toggleVisualization() print("Tool visualization: " .. (isEnabled and "Enabled" or "Disabled")) end end) -- Cleanup when the script is stopped local function cleanup() if connection then connection:Disconnect() end VisualizationFolder:Destroy() print("Tool visualization cleaned up") end -- Uncomment this if you want the script to automatically clean up after a certain time -- task.delay(60, cleanup) -- Cleanup after 60 seconds -- Return cleanup function for manual cleanup return cleanup