For filling, in a heavy saucepan combine sugar and flour. Gradually stir in milk. Cook and stir over med-hi heat til thickened and bubbly. Cook and stir for 2 more minutes. Remove from heat. Gradually stir about 1 cup of the hot mixture into the beaten egg.(If you do it too fast and don't stir enough it will start to cook your eggs and you'll get egg bits) Stir the egg mixture back into the saucepan. Bring to a gentle boil. Cook and stir 2 more minutes. Remove from heat. Stir in peanut butter, butter and vanilla until mixed through.
Poor warm filling into prepared crust and cool on a wire rack for 1 hour.
Chill at least three hours and top with whipped cream before serving.