Would a simulated world have to be scripted?
A simulation is often pictured as a movie already edited. Engineering practice is closer to the opposite. We run a model because we do not know what it will do.
Same initial world. Different kinds of run. Unpredictability is not a proof of free will.
Playback
A recording. The same events, every time. A movie already edited.
Deterministic simulation
Same start, same rules, same result. Unknown to us until we run it. Known to the rules.
Stochastic simulation
Noise is part of the instrument. Runs fan. The distribution is the result.
Sensitive system
Tiny differences in start become large differences later. Not free will. Sensitivity.
Run to see what happens
We do not already know the outcome. That is why SpaceX and Tesla run the model.

In 2023 Musk used that practice as an analogy: if higher beings run a world, they might do it to see what happens. Unpredictability is not a proof of free will. It is a reason not to confuse simulation with script.
They might run it to see what happens.
Elon MuskLex Fridman Podcast #4009 November 202353:58
Source notes
If higher beings run a simulation, they might do it to see what happens. SpaceX and Tesla run simulations because the outcome is not already known.
A shift. Simulation here is an instrument for unknown outcomes, not a movie already edited.
Not a demonstration that our world is simulated. Not a claim that the future is written.
Official Lex Fridman episode. Timestamp from the published transcript, about 53:58.