Know the components:
First of all, you must know all the components of this sort of script. In a murder mystery script, there must be a killer, a victim, a detective, and more than one suspect, all rolled into a complex, mind boggling plot. The sequence of events must be such that the suspense builds up, leading the audience to the drop scene.
The next thing you should do is make a list of characters. A murder mystery should have one victim, 4 to 5 potential criminals, and one investigator. You may include supporting characters, but it is better to have six to seven major characters, so you can focus on them fully.
Build the characters:
Now that you have decided the number of characters, it is time to give them personalities. Think of their appearances, professions, relationships with each other, etc. Try to build connections between them, as this will help you in keeping the plot intact. You must remember that there is no fixed rule for building characters. Let your imagination guide you in this matter.
Plan the events:
It is obvious that your story is going to revolve around a murder, but you must have some other elements and events in the script, so that the viewers can connect with it and stay interested. Make a rough draft and plan all the events. Keep in mind your characters, their personalities, and their motives, and you will not face any difficulties in planning the events.
Arrange all the events in a sequence:
After planning all the events, you should arrange them in a sequence and give some final touchs to the plot/story.
Last but not the least, you should start writing the scenes with dialogues. Make sure your characters have dialogues according to their personalities. Every scene or event must lead the story towards its climax, and then towards a resolution.