The other students would likely spread rumors. Some might idolize Hermione for her bravery in taking on a troll, while others might be afraid of her. This could lead to a change in her social standing at Hogwarts. She may become more isolated as some students avoid her, or she could gain a group of followers who admire her boldness.
The Sith would also be affected. Maul was an important figure in the Sith world, and his death at the hands of Pre Vizsla would send shockwaves. Darth Sidious, for example, might see this as an opportunity to manipulate the situation further. He could either try to use Pre Vizsla for his own ends or eliminate him as a loose end, depending on how he perceived the threat.
For characters like Itachi, if his spirit or some form of his consciousness was still around in the fanfiction, it would be a complex situation. He sacrificed so much to protect Sasuke, and now Naruto killing him would be a huge irony. Itachi might try to influence the events from the afterlife or through some other means. And Hinata, who loves Naruto, would be deeply concerned for Naruto's state of mind. She would try to support him, but also struggle with the moral implications of what he has done.
Well, in some fanfictions, Harry might use his quick thinking and knowledge of the troll's weaknesses. He could first distract the troll by making noise or using magic to create illusions, then when the troll is off - guard, he strikes with a well - aimed spell, perhaps a blasting charm. Also, he could have some help from his friends. For example, Hermione might provide some crucial information about trolls that helps Harry come up with a plan. Ron could be there to support Harry, maybe by providing a diversion while Harry gets in the perfect position to deliver the fatal blow.
It would greatly impact Harry. He would be devastated by the loss of Hermione, but it could also fuel his determination to fight against the bad guys. He might become more reckless in his pursuit of justice, or he could become more cautious, not wanting to waste Hermione's sacrifice.
The other characters would be deeply shaken. For Hermione's friends like Luna, she would be there to comfort Hermione but also be in awe of Draco's selflessness. Neville might be inspired by Draco's act and start to believe that people can change more than he thought. Draco's death would also send ripples through the Slytherin house. Some might be ashamed of how they had treated Draco before, while others might try to carry on his new - found heroism. As for Hermione herself, she would be forever changed. She would become more determined to fight for good in Draco's memory and might even become a bit more withdrawn as she copes with the loss.
It could also be that the situation was extremely dire. For example, the troll was about to destroy something very important, like a magical artifact that could cause great harm if it fell into the wrong hands, and Hermione saw killing the troll as the only way to prevent that.
For Sasuke, it could be a huge shock. Since they are rivals and friends, seeing Naruto do something so extreme would make Sasuke question his own role and his relationship with Naruto. He might become more determined to find out what led Naruto to this and seek revenge on those responsible. Sakura would be devastated. She has always cared for Naruto and seeing him harm himself in such a way would make her feel powerless and guilty. She might try to use her medical skills to fix the situation, even if it seems impossible.
For Hermione, her friends in Gryffindor might be initially shocked and confused. Harry and Ron, for instance, might not understand why she has Draco's tie and could be suspicious of her actions. They might think she's been influenced by the Slytherins in some way. As for Draco, his Slytherin cronies might tease him about having a Gryffindor tie. They could see it as a sign of weakness or that he's getting too friendly with the enemy.
For Kakashi, it would be like losing his student all over again. He has trained Naruto and seen his growth. His death would make Kakashi question his own role as a teacher and mentor. He might become more withdrawn and blame himself for not being able to prevent Naruto's suicide.
Harry would be deeply affected. Snape was a complex figure in Harry's life, and Remus was also a mentor. Harry would be torn between his loyalty to Remus and his feelings for Snape. He might start to question everything he knew about both of them. Hermione and Ron would also be shocked. They would likely try to understand Remus' reasons but also struggle with the fact that he committed such a heinous act.