adverb An adverb modifies or describes a verb, adjective, or another adverb. In this case, 'painfully' describes how something is done in a painful manner.
adjective a word that describes or modifies a noun or pronoun, in this case, 'sad' describes a feeling of unhappiness or sorrow