Hexapod InverseKinemetics Problem

Please post your final code for future reference,

Thanks,