How can I add functions like automatic LP and redistributed for holders?

Hi guys, I really wanna know how can I add this 2 functions in my contract. I wanna specify that my contract it's verified on bscscan so I dont wanna copy the SafeMoon.sol cause it has alot of errors when compiling.Im begginer in solidity but im curios if you can add this functions in contract or you must create a new one from scratch?