improvise

Definition

To create or perform something on the spot, without prior preparation.

中文 在没有事先准备的情况下现场创作或表演某事。

Example

"The actor had to improvise his lines when the script was lost during filming."