First you would need a variable to store the respect points. Declare it on your first passage or in StoryInit (an special passage that is executed when you launch your game). It would be something like this:
<<set $respect to 0>>
We declare it to 0 so we can add or substract from it later.
For the conversation itself there's several ways of doing it. One way could be using the <<link>> and <<replace>> macros like this:
<p>GUARD: Who's there?</p>
<div id="answer">
<p>Your answer:</p>
<<link "Your king!">>
<<replace "#answer">>
<p>YOU: Your king!</p>
<p>GUARD: Your Highness! Sorry for bothering you!</p>
<</replace>>
<<set $respect += 1>>
<</link>>
<<link "Shut up, pleb!">>
<<replace "#answer">>
<p>YOU: Shut up, pleb!</p>
<p>GUARD: Yes, my lord! (Idiot...)</p>
<</replace>>
<<set $respect -= 1>>
<</link>>
</div>
That will give you two different options to answer (the <<link>> macros) each one with different effects. In both of them, we are using the <<replace>> macro to replace the options (encloses in a <div> element with id "answer") with what would be the rest of the conversation. Also in each <<link>> we are modifying the value of the $respect variable with another <<set>> macro.
Finally when we need to check how many respect points we have in order to unlock certain parts of the conversation, we can use an <<if>> or a <<switch>> macro like this:
<p>You heard two guards talking below your window.</p>
<p>GUARD 1: So, what do you think of our king?</p>
<<if $respect == 1>>
<p>GUARD 2: He seems like a nice person.</p>
<<elseif $respect == -1>>
<p>GUARD 2: I don't like him, he seems like a presumptuous man.</p>
<<else>>
<p>GUARD 2: I don't know, I've never spoken to him.</p>
<</if>>
NOTE: This is a very simple example. You would need to use those two code fragments in differents passages in order to Sugarcube to properly update the value of $respect.
If you have any other question, just ask.