Sorry I took so long to respond, Communist Duke. I haven't checked in a while.
That could possibly work, but there are a couple of minor flaws.
...in which student #6 just came in...
I would be able to hear, and then see, somebody breaking the lock on a window. Locks are usually on the inside, anyway, so the culprit would be able to break the lock without being inside or breaking the window, which would make noise.
Also, I believe I said that the window in the victim's room was able to be opened in a comment on page two, but you may not have read all those comments (I don't blame you).
Your theory may work if the culprit got into the victim's room a few minutes before the victim actually got there, but there is the issue of being able to hide until the time to strike. It is an abandoned school, after all; the furniture shouldn't be there. In your defense, the victim would be trusting of his murderer, they are friends in this riddle. It doesn't explain the small blood splotches leading up to his body, though, and if the victim were attacked in the same spot he fell down and died at, then the small pool of blood would be a little bigger.
Your theory almost works, and it may actually be a possible answer, but try to think harder. If I overlooked something, or if you think I have something wrong, just say so.