How can I prevent modders/hackers from tearing into a game I make?

Im worried about people stealing code, models, and other things. How can I prevent this?

You Cant. I suppose you can obfuscate your code. I suppose you can have complicate check functions in you network library. But in the end of the day you cant protect against everything and the unknowen. No one can.

The only way to prevent it is to not distribute your game. People rip stuff from AAA games all the time; if big companies with huge budgets can’t prevent it then you certainly can’t.

Clients can’t directly change values on a server. They can however exploit weaknesses in the servers client validation or simply have an aimbot tell the server that they just shot directly at another players head.
They don’t even need to get into your code for an aimbot to be effective. Server say to client “you see a player at this location” aimbot says back “Okay, I just shot at that location”.
I like to use refraction to prevent this. Tell the client the player is somewhere other than where he is, client decrypts this value to work out where to display actual location of player. If the client declares a shot at the location the server said the player was then it was actually a miss. If the player shoots at where the player was properly displayed to be then it is a hit.
Like fish in the water, they arn’t actually in the location you see them. Make the aimbot look through water so that it can’t see clearly, while giving the player a clear vision.