promotional bannermobile promotional banner

Script Interpreter [v1.21.120+]

Script Interpreter allows players to run JavaScript code within Minecraft.
MCPEDL.png

MCPEDL.png

Description

This Add-On works on Minecraft 1.21.120 and above, including mobile and Windows 10/11.

Script Interpreter is a Bedrock add-on allows you to run Minecraft scripts in-game and returns feedback instantly.

What is Scripting / Script API

Introduction to Script Interpreter

Script Interpreter Form

This add-on allows you to run JavaScript code and reports an error condition immediately in Minecraft in-game using this interpreter. This is mainly used by me to try and explore new Script APIs.

However you can only run JavaScript code in this add-on, because the scripting engine only supports JavaScript.

Here are some examples executing JavaScript in-game:

  1. This script makes the world / script engine say "running"

Example 1 code

Example 1 result

  1. This script shows the script has error.

Example 2 code

Example 2 result

Get it? Cause Aether dimension does not exist in Minecraft.

Script Interpreter Item

repl item

  1. You can get the JavaScript Interpreter [Use] item through the following methods:
  • Script event command: /function repl
  • Slash Command: /jayly:interpreter

IMPORTANT: Slash command is only available behind beta versions of interpreter only.

  1. Use the enchantment book with the name JavaScript Interpreter [Use] to open the interpreter
  2. Type your javascript code in the form. Best thing is that this form has multi-line supported, meaning you can write multiple lines of code here.
  3. Press Submit button to start executing your code.

In case you want to disable your code, you have to run /reload command which requires operator permission to execute the command.

Script Block

image

The Script Block can store and execute JavaScript code in a Minecraft world. It cannot be obtained or used in Survival mode without cheats.

Obtaining

The script blocks can either be obtained by using various commands, such as /give @s interpreter:script_block or /setblock ~ ~ ~ interpreter:script_block, or by pressing the pick block control on an existing script block.

Script blocks are not flammable, and have the same blast resistance as bedrock. They cannot cannot be mined in Survival mode, however they can be pushed with pistons and sticky pistons and the data inside the block persists.

Script Block Usage

A script block can execute JavaScript code when activated by pressure plates and buttons currently. Script output is displayed when player activates the script block.

Modification

To enter command or modify the script block, players must interact with the script block. The scripts can be entered in the text input within the modal form. The text limit for scripts in a script block is 32,767 characters, you can scroll through lines of code just like the NPC text prompt UI.

Scripts in a script block do not need to be prefixed with imports (e.g. import { world } from "@minecraft/server") as they do in the actual JavaScript files.

When finished inputing JavaScript code, save the code into the script block by pressing 'Save' button. Upon pressing the button it will not immediately execute scripts unlike the Script Interpreter item.

Startup Scripts

Startup script form

This add-on allows you to add scripts to run automatically when Minecraft loads the add-on. Here's how:

  1. Open Startup Scripts form by typing /function repl/startup, and hitting Enter.

  2. Click on 'Create New' button on the form.

  3. A new form appears with an input field, give your task a name (e.g., "Run Block Filling Procedure") and check Add Script Code to write scripts for the task.

  4. press 'Add Script Code', which redirects you to write some scripts for the task.

  5. After writing the script, Click 'Save Scripts' to finish setting it up.

This should automatically launch the task when you load the add-on.

Function Commands

The add-on also provides function commands to access Script Interpreter.

  • /function repl: Access Script Interpreter
  • /function repl/startup: Access Script Startup settings
  • /function repl/shutdown: Access Script Shutdown settings (Beta)

Custom Commands

The add-on also provides custom slash commands to access Script Interpreter.

  • /jayly:interpreter - Opens Interpreter.
  • /jayly:javascript - Opens the JavaScript interpreter.
  • /jayly:version - Displays the version of the interpreter.
  • /jayly:scriptdata - Manage script data (options: clear, stats).
  • /jayly:help - Displays help information about available commands.

Shutdown Scripts

shutdown script form

This add-on allows you to add scripts to run automatically when Minecraft is shutting down. Here's how:

  1. Open shutdown Scripts form by typing /function repl/shutdown, and hitting Enter.

  2. Click on 'Create New' button on the form.

  3. A new form appears with an input field, give your task a name (e.g., "Run Cleanup Procedure") and check Add Script Code to write scripts for the task.

  4. press 'Add Script Code', which redirects you to write some scripts for the task.

  5. After writing the script, Click 'Save Scripts' to finish setting it up.

This should automatically launch the task when the world shuts, or when before shutdown event is called.

Installation

First you go to the download section download Script Interpreter (with or without experimentals), then the add-on will be downloaded to your device.

Using Interpreter with Beta API features

Import the add-on to Minecraft.

IMPORTANT: Enable Beta APIs experiments in world settings. These experiments are needed to run Script Interpreter with Beta API features.

experiments

Enable Experiments in New Create World Screen

Enable Script Modules

Modules supported by default in Script Interpreter are:

  • @minecraft/server
  • @minecraft/server-ui
  • @minecraft/server-gametest
  • @minecraft/server-admin
  • @minecraft/diagnostics
  • @minecraft/vanilla-data
  • @minecraft/math
  • @minecraft/gameplay-utilities

Check this guide on Enabling Every Script Modules for more infomation.

Using Script Interpreter in Bedrock Dedicated Servers

Check this guide on Using Script Interpreter in Bedrock Dedicated Servers for more infomation.

Enable modules in Bedrock Dedicated Servers

Check this guide on Enabling modules in Bedrock Dedicated Servers for more infomation.

The Script Interpreter [v1.21.120+] Team

profile avatar
Owner
  • 23
    Followers
  • 7
    Projects
  • 102.9K
    Downloads

More from JaylyView all

  • Jayly's Cinematic Editor v2.2.3 project image

    Jayly's Cinematic Editor v2.2.3

    • 42.3K
    • Addons

    Jayly's Cinematic Editor controls your camera to change perspectives and designing cinematic scenes within Minecraft.

    • 42.3K
    • February 14, 2026
    • Addons
    • +4
  • Jayly's Cinematic Runtime v1.0.5 project image

    Jayly's Cinematic Runtime v1.0.5

    • 4.7K
    • Addons

    Jayly's Cinematic Runtime controls your camera in Minecraft. This add-on provides support for mobile and console.

    • 4.7K
    • February 14, 2026
    • Addons
    • +3
  • Bedrock Statistics (with a search bar) project image

    Bedrock Statistics (with a search bar)

    • 20.7K
    • Addons

    The Add-On that tracks player statistics in the form of numerical data in a Minecraft world. Similar to the statistics in-game feature presented in Java Edition.

    • 20.7K
    • February 14, 2026
    • Addons
    • +4
  • Jayly's Better Mace project image

    Jayly's Better Mace

    • 4.2K
    • Addons

    This Minecraft add-on makes the mace smashing attack more dramatic via cutscene and particle effects.

    • 4.2K
    • January 18, 2026
    • Addons
    • +4
  • Jayly's Cinematic Editor v2.2.3 project image

    Jayly's Cinematic Editor v2.2.3

    • 42.3K
    • Addons

    Jayly's Cinematic Editor controls your camera to change perspectives and designing cinematic scenes within Minecraft.

    • 42.3K
    • February 14, 2026
    • Addons
    • +4
  • Jayly's Cinematic Runtime v1.0.5 project image

    Jayly's Cinematic Runtime v1.0.5

    • 4.7K
    • Addons

    Jayly's Cinematic Runtime controls your camera in Minecraft. This add-on provides support for mobile and console.

    • 4.7K
    • February 14, 2026
    • Addons
    • +3
  • Bedrock Statistics (with a search bar) project image

    Bedrock Statistics (with a search bar)

    • 20.7K
    • Addons

    The Add-On that tracks player statistics in the form of numerical data in a Minecraft world. Similar to the statistics in-game feature presented in Java Edition.

    • 20.7K
    • February 14, 2026
    • Addons
    • +4
  • Jayly's Better Mace project image

    Jayly's Better Mace

    • 4.2K
    • Addons

    This Minecraft add-on makes the mace smashing attack more dramatic via cutscene and particle effects.

    • 4.2K
    • January 18, 2026
    • Addons
    • +4