modify this so that it also shows meters you're away from it, live

```
-- Declare global tables to store centers and waypoint statuses
centers = {}
local waypoints = {}
local proximityDistance = 100  -- Distance at which waypoints turn red

if SERVER then
    util.AddNetworkString("ShowWaypoint")

    -- Function to send waypoint data to the client
    local function SendWaypointToClient(ply, pos, index)
        net.Start("ShowWaypoint")
        net.WriteVector(pos)
        net.WriteUInt(index, 16)
        net.Send(ply)
    end

    -- Send trigger positions to clients when a player spawns
    concommand.Add("waypoints", function(ply)
        print("PlayerInitialSpawn hook called")

        -- Find all trigger entities that could potentially be set for autosave
        local triggers = {}
        for _, ent in pairs(ents.GetAll()) do
            if string.find( ent:GetClass(), 'button' ) or ent:GetClass() == 'func_button' then
                table.insert(triggers, ent)
            end
        end

        -- Sort triggers by entindex
        table.sort(triggers, function(a, b) return a:EntIndex() < b:EntIndex() end)

        -- Store centers and send positions to clients
        centers = {}  -- Clear the centers table

        for index, ent in ipairs(triggers) do
            local min, max = ent:GetCollisionBounds()
            local center = ent:GetPos() + (min + max) / 2
            centers[index] = center

            SendWaypointToClient(ply, center, index)
            print("Trigger entity found:", ent)
            print("TriggerPos" .. index .. " sent to client:", center)
        end

        -- After all triggers, find the nearest trigger_changelevel
        local triggerChangelevels = ents.FindByClass("trigger_changelevel")
        if #triggerChangelevels > 0 then
            local nearest = triggerChangelevels[1]
            local minDist = ply:GetPos():Distance(nearest:GetPos())

            for i = 2, #triggerChangelevels do
                local dist = ply:GetPos():Distance(triggerChangelevels[i]:GetPos())
                if dist < minDist then
                    nearest = triggerChangelevels[i]
                    minDist = dist
                end
            end

            local index = #centers + 1
            local changelevelCenter = nearest:GetPos() + (nearest:OBBMins() + nearest:OBBMaxs()) / 2
            centers[index] = changelevelCenter
            SendWaypointToClient(ply, changelevelCenter, index)
            print("trigger_changelevel entity found:", nearest)
            print("TriggerPos" .. index .. " sent to client:", changelevelCenter)
        end

        print("Total number of centers found:", #centers)
    end)

else -- CLIENT
    -- Retrieve the trigger positions from the server
    net.Receive("ShowWaypoint", function()
        local pos = net.ReadVector()
        local index = net.ReadUInt(16)
        waypoints[index] = { position = pos, isReached = false }
    end)

    -- Display all waypoints and change color based on proximity
    hook.Add("HUDPaint", "DrawWaypoints", function()
        if #waypoints == 0 then return end

        local plyPos = LocalPlayer():GetPos()

        for i, waypoint in ipairs(waypoints) do
            if waypoint and waypoint.position then
                local pos = waypoint.position:ToScreen()
                local distance = plyPos:Distance(waypoint.position)

                -- Determine color based on distance
                local color
                if distance <= proximityDistance then
                    table.RemoveByValue( waypoints, waypoint )
                else
                    color = Color(155, 255, 0, 255)  -- Default color
                end

                -- Draw the waypoint
                surface.SetDrawColor(color)

                -- Draw a circle for each waypoint
                for j = 0, 4 do
                    surface.DrawCircle(pos.x, pos.y, 4.9 + j)
                end

                -- Optionally, draw text label
                draw.SimpleTextOutlined("Waypoint " .. i, "Default", pos.x, pos.y - 20, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, color_black)
            end
        end
    end)
end
```