Since MCPE updates frequently (1.21.x as of 2026), you need an addon that supports and scripting APIs (HoloUI or similar).
Brings Java-like functionality.