The following three bits of code are World Scripts. World Scripts are a little like a mini-module in that they change how the game works. Putting in these world scripts there is a hard way and an easy way.
The hard way is to follow the info here: https://foundryvtt.wiki/en/basics/world-scripts
The easy way is to use the World Scripter module. When it is loaded, you just load the world scripts into the World Scripter compendium and refresh your screen (F5).
You can find more info on World Scripter at https://foundryvtt.com/packages/world-scripter
Foundry VTT Community Wiki
World Scripter, an Add-on Module for Foundry Virtual Tabletop