for k, v in ipairs(ents.FindByClass("func_movelinear")) do local p = v:GetPos()[axis] order[p[axis]] = order[p[axis]] or {} table.insert(order[p[axis]], v) end
local sortOrder = {}
for k, _ in pairs(order) do table.insert(sortOrder, k) end
table.sort(sortOrder, function(a, b) return a > b end)
for i = 1, #sortOrder do for k, v in pairs(order[sortOrder[i]]) do v:Fire("SetSpeed", 200) v:Fire("SetPosition", (i / #sortOrder)) end end