From the Super Mario Wiki
Swipin' Stus resemble the Soarin' Stus, except they are larger and have green pants instead of blue. If the player looks closely, they will also see that it has darker skin than a typical Strollin' Stu. Swipin' Stus attack when Mario walks beneath them, attempting to land on him. If a Swipin' Stu succeeds, it will steal Mario's Cap, and spontaneously grow a mustache similar to Mario's. Mario will then suffer from a sun-stroke and slowly lose health. To retrieve his cap, Mario must either Ground Pound onto the Swipin' Stu's head and take it back, or re-enter Pinna Park for the game to reset its position.