The film’s writer Christy Hall tells PEOPLE of the changes she spotted: “If those flourishes came from Ryan, I think that’s wonderful”

Blake Lively stars as Lily Bloom in IT ENDS WTH US.

Blake Lively says husband Ryan Reynolds had a hand in some of the dialogue in It Ends With Us —something even the movie’s screenwriter wasn’t aware of!

Lively, the star and producer of the film, told E! News at the New York City premiere on Aug. 6, “The iconic rooftop scene, my husband actually wrote it. Nobody knows that but you now.”

The actress, who also made a cameo in Reynolds’ recent hit Deadpool & Wolverine, which he co-wrote, added, “We help each other. He works on everything I do; I work on everything he does. So his wins, his celebrations are mine and mine are his.” Indeed, Lively makes a cameo in Reynolds’ Marvel blockbuster as Ladypool.

It Ends With Us is based on Colleen Hoover’s bestselling novel published in 2016. The rooftop scene is early in the film when Lily Bloom (Lively) meets Ryle Kincaid (Justin Baldoni, also the director), and features flirty banter.

The film’s screenwriter, Christy Hall, tells PEOPLE the specific scene was “probably the trickiest one to tackle” because it is “perfect in the novel.”

“My first attempt at that scene, I really tried to just honor what Colleen wrote, almost word for word,” says Hall. “I really, really tried because I just think that she did it best. What’s tricky about that scene is it’s long.”

Blake Lively and Ryan Reynolds new york 08 06 24

Blake Lively and Ryan Reynolds on Aug. 6, 2024.CINDY ORD/GETTY

“I am very proud of my work, and I do feel like the beats that needed to be honored in that scene are preserved and they’re there,” adds Hall. “Again, Colleen did it best. She did it first and it’s from her. I do think that that scene is a really beautiful reflection of what she penned from the beginning.”

Hall says she wasn’t aware Reynolds had contributed to the dialogue used in the final version of the sequence.

“There were a couple of little things that I thought had been improvised. Like when he says, ‘Pretty please with a cherry on top,’ and she talks about the maraschino cherries. When I saw a cut I was like, ‘Oh, that’s cute. That must have been a cute improvised thing.’ So if I’m being told that Ryan wrote that, then great, how wonderful.”

“There were a few little flourishes that I did not write, but I assumed that they had been improvised on set. But, again, like I said, the moments that I felt like needed to be honored are there. So I recognize the scene and I’m proud of the scene. And if those flourishes came from Ryan, I think that’s wonderful.”

Blake Lively and Justin Baldoni in "It Ends with Us."

Hall, who handed in her script prior to last year’s writer’s strike and says she rejoined production to give feedback during the film’s edit, says one other moment was also improvised, one shared with Lively and costar Brandon Sklenar, who plays Atlas.

“When Atlas is like, ‘What song do you want played at your funeral?’ [and it’s Creed’s ‘With Arms Wide Open’]. I laughed my ass off when I first saw that, because I assumed that was improvised — maybe Ryan Reynolds wrote those lines!”

“I’d be curious to know where that line came from because I loved that moment. We needed some levity, we needed a laugh, and we got it in that moment,” Hall says. “That’s probably one of the biggest ones that really sticks out to me that I absolutely love.”

It Ends With Us is in theaters Aug. 9.