Hi there !

What is the difference between the following sentences ?

If you are a good boy, I will buy you an icecream .

If you were a good boy, I would buy you an icecream .

Thanks in advance [F]
If you are a good boy, I will buy you an ice cream.-- He might be a good boy.

If you were a good boy, I would buy you an ice cream -- He is not a good boy.
Well, the differences( there are some ) between the first and the second sentence are:
1. The intention behind the sentences: While in the first sentence one tries to provide information about the future result of a present action, ( e.g. :if I commit a crime, I will go to jail as a result after the crime); the second sentences talks about imaginary situations, or desires and the subjunctive mood of the verbs is used in the "if " part of the sentence , i.e. the verbs are used basically in their past tense, taking special care of the verb "to be" which is used with the "were" conjugation for this kind of construction ( ej: If I were Superman, I would have X- ray vision- I am not superman, therefore I don't have X-ray vision).


in the indicative mood( i.e. the usual conjugation of verbs and sentences) we conjugate the verb to be in past like this:

I was
you were
he was
she was
it was
you were
we were
they were

while for the subjunctive mood ( i.e.the one used for imaginary situations, wishes and the like) the verb to be is conjugated in the following form:
I were
you were
he were
she were
it were
you were
we were
they were

I hope that this answer may help you with the difference between the 2 sentences