If a creature is grappled, can it still attack and use its special abilities?

The grappled condition limits movement, not attacks, spellcasting, and the like. That said, many grappling abilities, such as a roper’s tendril attack, also deliver effects like the restrained condition.