This would be no easy task, but i think it would be best if first person controls was separated from thirst person controls. Essentially two different lua scripts. or at the least have the thirst person aspects being referenced from an "included" script.
It would be easier to isolate issues for third person and add features. Cause even some of the first person functionality might be effecting the third person?