You could probably set that up with variables. Just make a variable for each character that you want to make it possible to have a relationship with. When your main character does something that makes the relationship points higher, just increase the variable of that character through an event. You could also decrease it for negative actions. In the ending, set up a conditional branch where the variables have to be a certain level for each character.