By conservation of energy, the loss in potential energy ($mgh$) equals the gain in kinetic energy ($(1/2)mv²$). The height fallen is $h = l(1-cosθ)$. Therefore, $v = \sqrt{2gh} = \sqrt{2gl(1-cosθ)}$.