/*
----------------------------------
Creator: Mafly
Discord:
https://discord.gg/BUFxackwWb
Youtube: MaFly
https://www.youtube.com/c/MaFly16

Website:
https://mcblibrary.com/user/mafly
----------------------------------
*/

import { world } from "@minecraft/server";

function getScore(entity, objective) {
  try {
    return world.scoreboard.getObjective(objective).getScore(entity);
  } catch (error) {
    return 0;
  }
}

export { getScore };
