Now hear me out, I know it's not a highly rated movie, but god dam.
A ghost [Casper] lives with his 3 abusive uncles [also ghosts] He is utterly lonely, which is why he is friendly to humans. A dad and his daughter move in[human], and Casper falls in love with her. His dad {Caspers] made a machine to try and bring his dead son back to life, they get it working and Casper wants to use it so he can be with his love. The human girls (cat i think) dad dies, and as Casper was about to use the machine he says sadly, "Come on Dr., you need this more than I do" Sacrificng a life as a human again with the girl he loves, so she can have a father. THe machine used fuel, that there was only one left, so Casper knew there was no chance he could ever live a life as human.
He is rewarded for his sacrifice, by being able to be human for one night. He kisses the girl at 10:00 PM and the turns back into a ghost, destined to be alone forever.
I haven't seen this movie in well over 10 years, but I thought about this the other day, and it fucked me up for a couple hours lol. Again not the best rated movie, but 12 year old me didn't give a shit, and I wathed it a lot