WELL this wasn’t in the script ...

A man dressed as a pirate is on the run after pulling a knife on a security guard at the Pirates of the Caribbean set on the Gold Coast.

It’s reported the man, dressed like Johnny Depp’s character Captain Jack Sparrow, threatened a security guard with a knife before fleeing into bushland.

He even went to the effort of completing his look with a live parrot on his shoulder.

It’s reported police first thought the man may have been an extra in the film, but he’s since been confirmed as an armed person.

Police crews and a dog squad have been searching the area.