The text is a proverbial expression advising that if one stays away from bad actions or influences, they will not be affected by them. It does not play on different meanings of a word or similar-sounding words for a humorous or rhetorical effect.
Avoid evil and it will avoid thee .