Can someone assure me that the code in this video is legal?

Hi everyone. I'm coding a token and trying to set up transaction fees that I want to send back to my wallet. I couldn't find my way around the various forums but I found this youtube video. Since I'm a noob, I'm afraid the code won't be valid and I'll get robbed. Can you solidity pros watch this video and tell me if it's safe?