How can i revive it??? !yellowing pineaple, was on counter close to heater](https://i.stack.imgur.com/KixsG.jpg)
It's perfectly normal behaviour - it indicates that the main plant has become fully mature and will soon die down, putting extra effort into the vegetative propagation stage, growing suckers and slips at the soil surface and up by the fruit. When pineapple is grown for the fruit it rarely reaches the fully yellow stage since it becomes soft and difficult to cut open without considerable damage to the flesh. So the fruit we see in the markets is often green with just a hint of yellow. When fully yellow the fruit can fill the room with a sweet aroma.
Since the main plant is coming to the end of its useful life, accept that fact, cut out the main stalk and fruit when the time seems right and focus on encouraging one or more of the suckers at the base of the plant if you wish it to continue into the next stage of its growth, which will be to send up a new main stalk with its own, probably smaller, fruit.