“If we claim to have fellowship with him and yet walk in the darkness, we lie and do not live out the truth.”
1 John 1:6
Matthew 7 tells us that people will often live like Christians in the eyes of outsiders by telling prophesies and speaking in tongues and even preaching, but Jesus will say to them “I never knew you, get away from me, evildoer.” Jesus never had a real relationship with these people so they are doomed. All their efforts to buy a relationship Him was for nothing because they never actually believed in Him. That is the will of God and the will of God is the only way we can have an eternal relationship with Him. They do not do that but instead they do what they THINK God’s will is. they are living in darkness because they never allowed the light to enter out of lack of trust in His promise so when they tell Christ they did all these things for Him, it is a blatant lie. They did it for themselves that is sin, and it is a ticket to eternal darkness.