Cook pasta according to package directions. Drain and rinse under cold water.
In a saucepan, combine sugar, flour, and salt. Stir in pineapple juice and cook over medium heat until thickened and bubbly. Remove from heat.
Stir a small amount of hot mixture into beaten egg, then return all to the saucepan. Cook and stir for 2 minutes more. Remove from heat and stir in lemon juice. Cool to room temperature.
In a large bowl, combine cooked pasta, egg mixture, pineapple chunks, mandarin oranges, and marshmallows. Fold in whipped topping. Chill before serving.