based on a true story

Based on a true story is the phrase used with scripts that consist of a storyline that has at least some basis in real historical events and may contain only a few factual elements. These films, loosely based on various biographies, stories, or events, may/may not significantly alter the characters or situations for greater dramatic effect. "Inspired by a true story" indicates the film is even looser with the factual basis of the events.