TGViewer
ботик ботик @botikst · 22 subscribers
Post #57 147
Скрипт удар по определенному мобу
import { world, system } from "@minecraft/server";

const mobcom = {
"minecraft:cow": "title @a title муу",
"minecraft:chicken": "title @a title чикен, банано",
"minecraft:cat": "title @a title мур",
"minecraft:pig": "title @a title свинота",
};
world.afterEvents.entityHitEntity.subscribe((event) => {
const { hitEntity, damagingEntity } = event;
if (damagingEntity?.typeId === "minecraft:player" && mobcom[hitEntity.typeId]) {
try {
damagingEntity.runCommandAsync(mobcom[hitEntity.typeId]);
} catch (error) {
console.error("Ошибка выполнения команды:", error);
}
}
});
More from @botikst
  1. Sep 6, 2026пример WebSocket10
  2. Sep 6, 2026Файл скрипт WebSocket10
  3. Sep 6, 2026файл apk termux
  4. Sep 6, 2026Скрипт WebSocket10 const TelegramBot = require('node-telegram-bot-api'); const WebSocket =…
  5. Sep 6, 2026Команды termux: termux-setup-storage pkg update && pkg upgrade -y pkg install nodejs-lts n…
  6. Jul 26, 2026Пример «Импульс»
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →