Function File For Command
The function is one of the new commands introduced in the beta version of Minecraft Bedrock 1.8. This command executes actions defined in specific function files. To utilize this command, a behavior pack must be applied to the world.
Once you have applied the behavior pack of the mod titled Function File For Command in your Minecraft world, you can use the following commands:
If you forget these commands, you can use:
For instance, I used the /function kit command to create a chest containing various items.

In the same example, I utilized the /function strike command to hit all entities within a 20-block radius with lightning.
Activate this pack in your world to start using the above commands. You can modify the file and create your own custom command; in this folder, you’ll find the functions folder where all .mcfunction files are located. Open any of them to edit the text. The text you see here represents commands for the game, executed when you run the function command. You can include one or multiple commands in a single file.