local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))() local Window = Rayfield:CreateWindow({ Name = "DexHub | Ore ESP", LoadingTitle = "DexHub Initializing...", LoadingSubtitle = "DexHub", ConfigurationSaving = { Enabled = false } }) local VisualsTab = Window:CreateTab("Visuals", 4483362458) local LightingTab = Window:CreateTab("Lighting", 4483362458) local ESPEnabled = false local FilteredOre = "All" local ActiveVisuals = {} local Lighting = game:GetService("Lighting") local OriginalFogStart = Lighting.FogStart local OriginalFogEnd = Lighting.FogEnd local OriginalBrightness = Lighting.Brightness local OriginalClockTime = Lighting.ClockTime local function clearESP() for _, item in pairs(ActiveVisuals) do if item then item:Destroy() end end table.clear(ActiveVisuals) end local function applyESP(ore) if not ESPEnabled then return end if FilteredOre ~= "All" and ore.Name ~= FilteredOre then return end if ore:FindFirstChild("DexHub_Visuals") then return end local highlight = Instance.new("Highlight") highlight.Name = "DexHub_Visuals" highlight.FillColor = Color3.fromRGB(170, 0, 255) highlight.Parent = ore table.insert(ActiveVisuals, highlight) local billboard = Instance.new("BillboardGui") billboard.Name = "DexHub_Tag" billboard.Size = UDim2.new(0, 200, 0, 50) billboard.AlwaysOnTop = true billboard.Parent = ore table.insert(ActiveVisuals, billboard) local label = Instance.new("TextLabel") label.Size = UDim2.new(1, 0, 1, 0) label.BackgroundTransparency = 1 label.TextColor3 = Color3.fromRGB(255, 255, 255) label.Font = Enum.Font.GothamBold label.TextSize = 14 label.Parent = billboard task.spawn(function() while ESPEnabled and ore.Parent and (FilteredOre == "All" or ore.Name == FilteredOre) do local char = game.Players.LocalPlayer.Character if char and char:FindFirstChild("HumanoidRootPart") then local dist = (char.HumanoidRootPart.Position - ore.Position).Magnitude label.Text = string.format("%s\n[%d studs]", ore.Name, math.floor(dist)) end task.wait(0.2) end if billboard then billboard:Destroy() end if highlight then highlight:Destroy() end end) end local function getOreTypes() local types = {"All"} local seen = {} if workspace:FindFirstChild("PlacedOre") then for _, ore in ipairs(workspace.PlacedOre:GetChildren()) do if not seen[ore.Name] then table.insert(types, ore.Name) seen[ore.Name] = true end end end return types end LightingTab:CreateToggle({ Name = "Fullbright", CurrentValue = false, Callback = function(Value) if Value then Lighting.Brightness = 2 Lighting.ClockTime = 14 Lighting.GlobalShadows = false else Lighting.Brightness = OriginalBrightness Lighting.ClockTime = OriginalClockTime Lighting.GlobalShadows = true end end, }) LightingTab:CreateToggle({ Name = "No Fog", CurrentValue = false, Callback = function(Value) if Value then Lighting.FogStart = 100000 Lighting.FogEnd = 100000 else Lighting.FogStart = OriginalFogStart Lighting.FogEnd = OriginalFogEnd end end, }) local OreDropdown = VisualsTab:CreateDropdown({ Name = "Filter Ores", Options = getOreTypes(), CurrentOption = {"All"}, Flag = "DexHub_Filter", Callback = function(Option) FilteredOre = Option[1] clearESP() if ESPEnabled then for _, ore in ipairs(workspace.PlacedOre:GetChildren()) do applyESP(ore) end end end, }) VisualsTab:CreateButton({ Name = "Refresh Ore List", Callback = function() OreDropdown:Set(getOreTypes()) end, }) VisualsTab:CreateToggle({ Name = "Enable ESP", CurrentValue = false, Callback = function(Value) ESPEnabled = Value if ESPEnabled then for _, ore in ipairs(workspace.PlacedOre:GetChildren()) do applyESP(ore) end else clearESP() end end, }) VisualsTab:CreateButton({ Name = "Unload DexHub", Callback = function() ESPEnabled = false clearESP() Lighting.Brightness = OriginalBrightness Lighting.ClockTime = OriginalClockTime Lighting.FogEnd = OriginalFogEnd Lighting.GlobalShadows = true Rayfield:Destroy() end, })