Just repeating a few very good points.

Is the cat in heat??

Definitely confine her to a small room. She'll feel safer and have less opportunity to miss the litter box. Use a large cage if necessary.

Was she an only cat? or could she be missing a house mate?

Is her human available to visit with her? She MUST be so confused right now.

A vet visit would be a great idea. If she is sick in any way OR if she is just stressed, the vet could help. Appropriate medication may be in order.

Find out from her human what she enjoys and then try to provide it. (does she like to be held, a particular food or toy, to play chase ganes....whatever)

Good luck!