Want to make a greedy mesher, but do not understand

Hello, im tryna make a greedy mesher script, however i tried implementing it into my current system, but i couldn’t figure it out how to implement it. Im using 3d however this guide: How to make a Greedy Mesher , did not make sense when trying to put it into 3d. this is my script.

for x = -64, 64, 2 do
    for y = 0, 64, 2 do
        for z = -64, 64, 2 do

            local pnt = math.noise(x / 50, y / 100, z / 50)

            if pnt > 0.05 then
                local prt = Instance.new("Part")
                prt.Size = Vector3.new(2,2,2)
                prt.Position = Vector3.new(x,y,z)
                prt.Anchored = true
                prt.Parent = workspace
            end
        end
    end
end