OP should replace both parts - fill valve and flapper.
It's easy. You almost don't need tools. Almost.
But, OP, when you install the fill valve BE SURE to put an arch into that rubber line that shoots water down the tube. It needs an arch in order to break what would be a siphon action from tank thru the tube to the bowl.
The whole toilet works as a siphon. When the bowl fills to a certain level (by flushing the tank into the bowl) the siphoning action takes hold and sucks everything out of the bowl down the sewer pipe. Kinda neat if you're a geek like me. But if you're not it's kinda, "who cares?"