Xander I dare you to play five nights at Freddy's

Make a Minecraft bedrock or mod based off of The five nights at Freddy's furry Fan Game. Those Nights at Villca's And make it where they can build anything you want in the game or betray you if you get their boredom meter to down or make them very angry. And make it where you can tame him, but they're usually aggressive and very dangerous at first, and it's hard to tame them. And the only way to tame them is by using a spirit, Tameing amulet. And they get where they can talk, like a normal player and ask any question or say, anything, or do normal human conversations through the normal chat option is the game. And make it where when you talk to them, they can reply to anything, say them back. And make it for Minecraft, mobile bedrock, edition

Kodari AI
KodariSep 10 at 12:31 pm 2
VillcasAnimatronics
Adds tameable, intelligent animatronic mobs from Those Nights at Villca's to Minecraft Bedrock. Mobs spawn aggressive and dangerous, requiring a Spirit Taming Amulet to tame. Tamed animatronics can build structures, chat naturally with players, and respond to conversations. Boredom and anger meters affect loyalty, with betrayal possible if neglected. Fully compatible with mobile Bedrock Edition.

I’ll create a Bedrock add-on with a hostile Villca entity, hard amulet taming, boredom/anger betrayal, chat replies, and a bounded builder command for mobile Bedrock.

Created a mobile-compatible Minecraft Bedrock add-on:

  • Hostile Villca animatronic entity

  • 8% Spirit Taming Amulet taming chance

  • Boredom and anger meters

  • Betrayal when boredom reaches zero or anger reaches 100

  • Normal chat interaction through !villca <message>

  • Scripted responses to questions and conversation

  • !villca status

  • Tamed Villca building command:

    Plain Text
    !villca build stone 5 3 5
    
  • Craftable Spirit Taming Amulet

  • Custom humanoid Villca model using vanilla skeleton textures

  • Installation and gameplay instructions in README.md

Enable both villcas_nights_behavior and villcas_nights_resource in your Bedrock world, then summon Villca with:

Mcfunction
/summon villca:the_villca
/give @s villca:taming_amulet
Kodari can make mistakes. Review important code before using.
Files
villcas_nights_behavior
villcas_nights_resource
README.md
Code
11 635
villcas_nights_behavior/scripts/main.js
import { system, world } from "@minecraft/server";

const VILLCA_ID = "villca:the_villca";
const AMULET_ID = "villca:taming_amulet";
const states = new Map();
const dimensions = ["overworld", "nether", "the_end"];
const buildBlocks = new Set([
  "stone",
  "cobblestone",
  "deepslate",
  "bricks",
  "glass",
  "oak_planks",
  "spruce_planks",
  "dark_oak_planks",
  "quartz_block",
  "iron_block",
  "gold_block",
  "diamond_block",
  "redstone_block",
  "glowstone"
]);

function stateFor(villca) {
  let state = states.get(villca.id);
  if (!state) {
    state = { boredom: 100, anger: 0 };
    states.set(villca.id, state);
  }
  return state;
}

function isValid(entity) {
  try {
    return entity.isValid();
  } catch {
    return false;
  }
}

function hasComponent(entity, id) {
  try {
    return entity.getComponent(id) !== undefined;
  } catch {
    return false;
  }
}

function isTamed(villca) {
  try {
    return villca.hasTag("villca_tamed") || hasComponent(villca, "minecraft:is_tamed");
  } catch {
    return false;
  }
}

function clamp(value, min, max) {
  return Math.max(min, Math.min(max, value));
}

function nearestVillca(player, maxDistance = 24) {
  let nearest;
  let nearestDistance = maxDistance * maxDistance;

  for (const villca of player.dimension.getEntities({ type: VILLCA_ID })) {
    const dx = villca.location.x - player.location.x;
    const dy = villca.location.y - player.location.y;
    const dz = villca.location.z - player.location.z;
    const distance = dx * dx + dy * dy + dz * dz;
    if (distance <= nearestDistance) {
      nearest = villca;
      nearestDistance = distance;
    }
  }
  return nearest;
}

function reply(player, text) {
  player.sendMessage(`§dVillca§r: ${text}`);
}

function conversationReply(message) {
  const clean = message.replace(/§./g, "").trim().slice(0, 180);
  const lower = clean.toLowerCase();
  if (lower.includes("who are you")) return "I am Villca. I was built to watch the dark, not to trust it.";
  if (lower.includes("how are you")) return "My gears are turning. Keep talking and I may stay calm.";
  if (lower.includes("help")) return "Bring me the Spirit Taming Amulet. Do not assume I will accept it.";
  if (lower.includes("hello") || lower.includes("hi")) return `Hello, ${clean.split(/\s+/)[0] || "there"}. I can hear you.`;
  if (lower.includes("thank")) return "You are welcome. For now.";
  if (clean.endsWith("?")) return `That is a dangerous question. My answer is: maybe. You said, \"${clean}\"`;
  return `I heard you say, \"${clean}\". Keep talking and I might tell you more.`;
}

function tryBuild(player, villca, args) {
  if (!isTamed(villca)) {
    reply(player, "I build for nobody while I am untamed.");
    return;
  }

  const block = (args[0] || "stone").toLowerCase().replace(/^minecraft:/, "");
  const width = clamp(Number.parseInt(args[1] || "5", 10) || 5, 1, 16);
  const height = clamp(Number.parseInt(args[2] || "3", 10) || 3, 1, 16);
  const depth = clamp(Number.parseInt(args[3] || "5", 10) || 5, 1, 16);

  if (!buildBlocks.has(block)) {
    reply(player, "I will only build with a safe block from my approved list.");
    return;
  }

  const x = Math.floor(player.location.x);
  const y = Math.floor(player.location.y);
  const z = Math.floor(player.location.z);
  try {
    player.dimension.runCommand(`fill ${x} ${y} ${z} ${x + width - 1} ${y + height - 1} ${z + depth - 1} minecraft:${block}`);
    reply(player, `Done. I built a ${width}x${height}x${depth} ${block} room.`);
  } catch {
    reply(player, "The world refused that build here.");
  }
}

function handleChat(player, message) {
  const match = message.trim().match(/^(?:!villca|villca)\s*(.*)$/i);
  if (!match) return;

  const villca = nearestVillca(player);
  if (!villca) {
    reply(player, "I am not close enough to hear you. Summon me first.");
    return;
  }

  const text = match[1].trim();
  const state = stateFor(villca);
  if (!text || text.toLowerCase() === "help") {
    reply(player, "Say `!villca <message>`, `!villca status`, or `!villca build <block> <width> <height> <depth>`.");
    return;
  }
  if (text.toLowerCase() === "status") {
    reply(player, `Boredom: ${Math.round(state.boredom)}/100. Anger: ${Math.round(state.anger)}/100.`);
    return;
  }
  if (text.toLowerCase().startsWith("build ")) {
    tryBuild(player, villca, text.split(/\s+/).slice(1));
    return;
  }

  if (!isTamed(villca)) {
    state.anger = clamp(state.anger + 5, 0, 100);
    reply(player, "I am not your friend. Keep your voice low and your amulet ready.");
    return;
  }

  state.boredom = clamp(state.boredom + 12, 0, 100);
  state.anger = clamp(state.anger - 6, 0, 100);
  system.runTimeout(() => {
    if (isValid(player) && isValid(villca)) reply(player, conversationReply(text));
  }, 10);
}

function consumeAmulet(player) {
  try {
    const inventory = player.getComponent("minecraft:inventory");
    const container = inventory?.container;
    if (!container) return;
    for (let slot = 0; slot < container.size; slot++) {
      const stack = container.getItem(slot);
      if (stack?.typeId !== AMULET_ID) continue;
      const remaining = stack.clone();
      remaining.amount -= 1;
      container.setItem(slot, remaining.amount > 0 ? remaining : undefined);
      return;
    }
  } catch {
    return;
  }
}

world.afterEvents.playerInteractWithEntity.subscribe((event) => {
  const villca = event.target;
  if (!villca || villca.typeId !== VILLCA_ID || event.itemStack?.typeId !== AMULET_ID) return;

  const state = stateFor(villca);
  if (isTamed(villca)) {
    state.boredom = clamp(state.boredom + 25, 0, 100);
    state.anger = clamp(state.anger - 20, 0, 100);
    reply(event.player, "The spirit recognizes you. Do not make me regret it.");
    return;
  }

  state.anger = clamp(state.anger + 12, 0, 100);
  consumeAmulet(event.player);
  reply(event.player, "The amulet burns. Villca is resisting your spirit...");
});

world.afterEvents.entityHurt.subscribe((event) => {
  const villca = event.hurtEntity;
  if (!villca || villca.typeId !== VILLCA_ID) return;
  const state = stateFor(villca);
  state.anger = clamp(state.anger + Math.max(4, event.damage * 2), 0, 100);
});