What is the function of an event when creating scripts in Scratch?
A. It tells the backdrop and sprites to change costumes.
B. It designates when the script should begin running.
C. It tells the loop how many times to repeat.
D. It runs the action that is set in the conditional statement.