My friend rejected me and said he only wants to be friends but if I tell him I will have sex with him would he love me or would it ruin the friendship?
Your friend made themselves perfectly clear that they do not love you and only wants friendship and by offering sex you are taking your own self respect away and your friend will not respect you. Having sex with someone should only be an act of love by both people and not a bargaining chip. Say nothing or you may well lose the respect from your friend which will end the friendship.