import * as ui from "@minecraft/server-ui";
import { ActionFormData,  MessageFormData,  ModalFormData} from "@minecraft/server-ui";
import { world, system, Player, MolangVariableMap } from "@minecraft/server";
const overworld = world.getDimension('minecraft:overworld');

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


//Impedir colocar Bloco de Bedrock e enviar mensagem no chat
//world.beforeEvents.itemUseOn.subscribe(event => {
//    if (event.itemStack.typeId === "minecraft:bedrock" && event.block.typeId != "minecraft:frame" && event.block.typeId != "minecraft:glow_frame") {
//        event.cancel = true;
//        system.run(() => {
//            const player = event.source
//            player.sendMessage(`You cannot place Bedrock`)
//        });
//    }
//});

//Testes de interação de bloco específico (Experimental)
//let lastExecutionTime = 0;
//const cooldownPeriod = 1000; //Add the cooldown 1000 = 1sec
//world.beforeEvents.playerInteractWithBlock.subscribe(data => {
//    const { block, player } = data;
//    const currentTime = Date.now();
//    if (currentTime - lastExecutionTime >= cooldownPeriod) {
//        lastExecutionTime = currentTime;
//      system.run(() => {
//	 {player.runCommandAsync("function pergaminho_missoes");}}
//	 );}
//});

//const whoJumped = {}; // Add this line to declare the 'whoJumped' object
//
//const strength = 0.3;
//const vertical = 0.3;
//
//system.runInterval(() => {
//    const players = world.getPlayers({ excludeGameModes: ["creative"] });
//    for (let i = 0; i < players.length; i++) {
//        const player = players[i];
//        if (player.isOnGround) {
//            player.hasJumped = false;
//            continue;
//        }
//        if (player.hasJumped) continue;
//        system.runTimeout(() => {
//            if (player.isJumping) {
//                player.hasJumped = true;
//                const di = player.getViewDirection();
//                player.applyKnockback(di.x, di.z, strength, di.y + vertical);
//				player.runCommandAsync(`playanimation @s animation.humanoid.esquiva.frente`)
//            }
//        }, 3);
//    }
//}, 3);

//world.afterEvents.playerJoin.subscribe((data) => {
//    whoJumped[data.playerName] = false;
//});
//
//world.afterEvents.playerLeave.subscribe((data) => {
//    delete whoJumped[data.playerName];
//});


//Item para abrir Interface UI ActionFormData por condições de Tags
world.beforeEvents.itemUse.subscribe((eventData) => {
    if (eventData.itemStack?.typeId === "well:teleporterapido") {
        let player = eventData.source;
        player.runCommandAsync("/function scripts_forms/pergaminho");

        const tagActions = {
            "novice": () => menulistwell(player),
            "novice1": () => menulistwell(player),
            "novice2": () => menulistwell(player),
            "novice3": () => menulistwell(player),
            "boss1": () => menulistwell(player),
			
            "adventure": () => menulistwell1(player),
            "adventure1": () => menulistwell1(player),
            "adventure2": () => menulistwell1(player),
            "adventure3": () => menulistwell1(player),
            "adventure4": () => menulistwell1(player),
            "boss2": () => menulistwell1(player),
			
			"master": () => menulistwell2(player),
            "master1": () => menulistwell2(player),
            "master2": () => menulistwell2(player),
            "boss3": () => menulistwell2(player),
			
            "hero": () => menulistwell3(player),
            "hero1": () => menulistwell3(player),
            "hero2": () => menulistwell3(player),
            "hero3": () => menulistwell3(player),
            "hero4": () => menulistwell3(player),
			
            "boss4": () => menulistwell4(player),
			
			"genero": () => genero(player),
        };

        // Check if player has any of the specified tags
        for (const tag in tagActions) {
            if (player.hasTag(tag)) {
                system.run(tagActions[tag]);
                break;
            }
        }
    }
});
//Bussola das Almas
world.afterEvents.itemUse.subscribe((eventData) => {
    if (eventData.itemStack.typeId === "well:bussola_alma") {
        let player = eventData.source;
        pet1(player);
    }
});

//Interagir com uma entidade e abrir uma UI
world.afterEvents.playerInteractWithEntity.subscribe(({player, target}) => {
    if (target.typeId === "well:bau_interface_allay") {
        {menu_allay_d2(player)}
    }
})
world.afterEvents.playerInteractWithEntity.subscribe(({player, target}) => {
    if (target.typeId === "well:bau_interface_lula") {
        {menu_lula_d2(player)}
    }
})
world.afterEvents.playerInteractWithEntity.subscribe(({player, target}) => {
    if (target.typeId === "well:bau_interface_zumbi") {
        {menu_zumbi_d2(player)}
    }
})
world.afterEvents.playerInteractWithEntity.subscribe(({player, target}) => {
    if (target.typeId === "well:entidade_de_teleporte") {
        {showTeleportForm(player)}
    }
})

//Comandos personalizados no chat
world.beforeEvents.chatSend.subscribe((eventData) => {
	const player = eventData.sender;
	switch (eventData.message) {
		case '!gmc':
			eventData.cancel = true;
			player.runCommandAsync('gamemode c');
			break;
		case '!gms':
			eventData.cancel = true;
			player.runCommandAsync('gamemode s');
			break;
		default: break;
	}
});
//Rankings em Tags abaixo da cabea dos players
system.runInterval(() => {
    for(let player of world.getPlayers()) {
        let rank = player.getTags().find(tag => tag.startsWith("rank-"))?.replace("rank-", "")
        player.nameTag = `${player.name}\n${rank}`
    }
})

//Itens na mão serão renomeados ao segurar
system.runInterval(() => {
  // Loop over all the players
  for (const player of world.getPlayers()) {
    // Get the player container
    const container = player.getComponent('inventory')?.container;
    // Get the item in the selected slot
    const item = container.getItem(player.selectedSlot);
    if (!item) continue;
    
    // Handle all the possible item identifiers
    switch (item.typeId) {
		case "well:mesa_transmutacao":
        item.setLore([  '',  'Wells RPG Adventure']);
        break;
		case "well:mesa_purificacao":
        item.setLore([  '',  'Wells RPG Adventure']);
        break;
		
      default:
        continue;
        break;
    }

    // Set the modified item back to the selected slot
    container.setItem(player.selectedSlot, item);
  }
});

//Danificar itens ao quebrar blocos
world.afterEvents.playerBreakBlock.subscribe((ev) => {
const {player} = ev
      let inv = player.getComponent('inventory').container;
      const item = inv.getItem(player.selectedSlot);
      const durability = item.getComponent('minecraft:durability');

      if (durability.maxDurability < durability.damage + 1) {
          durability.damage = 1;
      }
      else {
          durability.damage += 1;
      }
      inv.setItem(player.selectedSlot, item);
  });

//Obter Score para inserir em Body de ActionFormData
function getScore(player, objective) {
    const { scoreboardIdentity } = player;
    if (!(player instanceof Player)) return 0;
    try {
        return world.scoreboard.getObjective(objective).getScore(scoreboardIdentity);
    } catch (e) {
        return 0;
    }
}

//Mostrar coordenadas de morte
world.afterEvents.entityDie.subscribe(data => {
  if (data.deadEntity.typeId == "minecraft:player") {
  const player = data.deadEntity
  const vida = Number(player.getComponent("minecraft:health").currentValue)
  let x = player.location["x"]
  let y = player.location["y"]
  let z = player.location["z"]
  let name = player.nameTag
  let xt  = Math.trunc(x)
  let yt = Math.trunc(y)
  let zt = Math.trunc(z)
  
player.runCommandAsync(`tellraw @s {"rawtext":[{"translate":"morreu.em.coordenadas"}, {"text":" §4X = ${xt}, §aY = ${yt}, §3Z = ${zt}"}]}`)
 }
})

//Adicionar comandos Scores ao quebrar blocos específicos
world.afterEvents.playerBreakBlock.subscribe(function (event) {
    switch (event.brokenBlockPermutation.type.id) {
		
		//Pontos de Agricultura
		case "minecraft:wheat":
            switch (event.brokenBlockPermutation.getState("growth")) {
                case 7:
                    event.player.runCommand("function pontos_status/agricultura");
                    break;
            }
            break;
        case "minecraft:potatoes":
            switch (event.brokenBlockPermutation.getState("growth")) {
                case 7:
                    event.player.runCommand("function pontos_status/agricultura");
                    break;
            }
            break;
		case "minecraft:carrots":
            switch (event.brokenBlockPermutation.getState("growth")) {
                case 7:
                    event.player.runCommand("function pontos_status/agricultura");
                    break;
            }
            break;
        case "minecraft:cocoa":
            switch (event.brokenBlockPermutation.getState("growth")) {
                case 3:
                    event.player.runCommand("function pontos_status/agricultura");
                    break;
            }
            break;
		case "minecraft:nether_wart":
            switch (event.brokenBlockPermutation.getState("growth")) {
                case 3:
                    event.player.runCommand("function pontos_status/agricultura");
                    break;
            }
            break;	
        case "minecraft:beetroot":
            switch (event.brokenBlockPermutation.getState("growth")) {
                case 7:
                    event.player.runCommand("function pontos_status/agricultura");
                    break;
            }
            break;
        
		//Pontos de Lenhador
		case "minecraft:acacia_log":
            event.player.runCommand("function pontos_status/lenhador1");
            break;
		case "minecraft:jungle_log":
            event.player.runCommand("function pontos_status/lenhador2");
            break;	
        case "minecraft:birch_log":
            event.player.runCommand("function pontos_status/lenhador3");
            break;
        case "minecraft:cherry_log":
            event.player.runCommand("function pontos_status/lenhador4");
            break;
        case "minecraft:dark_oak_log":
            event.player.runCommand("function pontos_status/lenhador5");
            break;
        case "minecraft:mangrove_log":
            event.player.runCommand("function pontos_status/lenhador6");
            break;
        case "minecraft:oak_log":
            event.player.runCommand("function pontos_status/lenhador7");
            break;
        case "minecraft:spruce_log":
            event.player.runCommand("function pontos_status/lenhador8");
            break;
		case "minecraft:crimson_stem":
            event.player.runCommand("function pontos_status/lenhador9");
            break;	
		case "minecraft:warped_stem":
            event.player.runCommand("function pontos_status/lenhador10");
            break;	
		
		//Pontos de Arqueologia
        case "minecraft:suspicius_gravel":
            event.player.runCommand("function pontos_status/arqueologia");
            break;
        case "minecraft:suspicius_sand":
            event.player.runCommand("function pontos_status/arqueologia");
            break;
		
		//Pontos de Mineirador
        case "minecraft:copper_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
        case "minecraft:coal_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
		case "minecraft:diamond_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
        case "minecraft:emerald_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
        case "minecraft:gold_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
        case "minecraft:iron_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
		case "minecraft:lapis_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
        case "minecraft:nether_gold_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
        case "minecraft:quartz_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
        case "minecraft:redstone_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
		case "minecraft:deepslate_coal_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
        case "minecraft:deepslate_copper_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
        case "minecraft:deepslate_diamond_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
        case "minecraft:deepslate_emerald_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
		case "minecraft:deepslate_gold_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
        case "minecraft:deepslate_iron_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
        case "minecraft:deepslate_lapis_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
        case "minecraft:deepslate_redstone_ore":
            event.player.runCommand("function pontos_status/mineirador");
            break;
			case "minecraft:ancient_debris":
            event.player.runCommand("function pontos_status/mineirador");
            break;
		case "well:ore_ruby":
            event.player.runCommand("function pontos_status/mineirador");
            break;
        case "minecraft:amethyst_cluster":
            event.player.runCommand("function pontos_status/mineirador");
            break;
		
    }
});
 
//Menu de Teleporte
async function showTeleportForm(player) {
    const form = new ui.ModalFormData()
      .title({"rawtext": [{ "translate": "teleporte.pedra" }]})
      .textField( {"rawtext": [{ "translate": "coordenada.x" }]}, { "rawtext": [{ "translate": "admin.textField2" }]})
      .textField( {"rawtext": [{ "translate": "coordenada.y" }]}, { "rawtext": [{ "translate": "admin.textField2" }]})
      .textField( {"rawtext": [{ "translate": "coordenada.z" }]}, { "rawtext": [{ "translate": "admin.textField2" }]});
    const result = await form.show(player);
    if (result.canceled) return;
    if (result.formValues === undefined) return;
    player.teleport({
        x: parseInt(result.formValues[0]),
        y: parseInt(result.formValues[1]),
        z: parseInt(result.formValues[2])
    });
}

function admin_menu(player) {

    	var playerObjects = []
        var listaJogadores = []

        var players = world.getPlayers()
        
        for (let jogadores of players) {
            listaJogadores.push(jogadores.name)
            playerObjects.push(jogadores)
        }
  const modal = new ModalFormData()
    .title({ "rawtext": [{ "translate": "admin.titulo" }]})
    .dropdown({ "rawtext": [{ "translate": "admin.dropdown" }]},listaJogadores, 0) //0
    .slider({ "rawtext": [{ "translate": "admin.slider1" }]}, 0, 21, 1) //1
    .slider({ "rawtext": [{ "translate": "admin.slider2" }]}, 0, 30, 1) //2
    .toggle({ "rawtext": [{ "translate": "admin.toggle1" }]}) //3
	.toggle({ "rawtext": [{ "translate": "admin.toggle2" }]}) //4
	.toggle({ "rawtext": [{ "translate": "admin.toggle3" }]}) //5
	.textField({ "rawtext": [{ "translate": "admin.textField1" }]}, { "rawtext": [{ "translate": "admin.textField2" }]}); //6
	
	
        modal.show(player).then(reponse => {
        	var tags = listaJogadores[reponse.formValues[0]]
            var quest = reponse.formValues[1]
            var subquest = reponse.formValues[2]
			var texto = reponse.formValues[6]
			
			
            if (reponse.formValues[3] == true) {
				player.runCommandAsync(`tag ${tags} add punido`)
            	player.runCommandAsync(`effect ${tags} clear`)
				player.runCommandAsync(`effect ${tags} mining_fatigue 99999999 50 true`)
                player.runCommandAsync(`effect ${tags} weakness 99999999 50 true`)
                player.runCommandAsync(`inputpermission set ${tags} movement disabled`)
				player.runCommandAsync(`tellraw @a { "rawtext": [{ "text": "${tags}"}, { "text": " "}, { "text": "§e"}, { "translate": "admin.congelar.player"}, { "text": "${texto}"}]}`)
				
				
            }
            if (reponse.formValues[3] == false) {
				player.runCommandAsync(`tag ${tags} remove punido`)
				player.runCommandAsync(`effect ${tags} mining_fatigue 0 50 true`)
                player.runCommandAsync(`effect ${tags} weakness 0 100 true`)
                player.runCommandAsync(`inputpermission set ${tags} movement enabled`)
				player.runCommandAsync(`scoreboard players set ${tags} quest ${quest}`)
				player.runCommandAsync(`scoreboard players set ${tags} subquest ${subquest}`)
            }
			if (reponse.formValues[4] == true) {
            	player.runCommandAsync(`kick ${tags} ${texto}`)
				player.runCommandAsync(`tellraw @a { "rawtext": [{ "text": "${tags}"}, { "text": " "}, { "text": "§e"}, { "translate": "admin.banir.player"}, { "text": "${texto}"}]}`)
				
            }
			if (reponse.formValues[5] == true) {
            	player.runCommandAsync(`tp @s ${tags}`)
				player.runCommandAsync(`tellraw @a { "rawtext": [{ "text": "${tags}"}, { "text": " "}, { "text": "§e"}, { "text": "${texto}"}]}`)
				
            }
			
			
			
			
			
			})} 



////////////////////////////////////////////////////////////////////////////////////////////////////////////////
export function pet1(player) {
    let form = new ui.ActionFormData();
	form.title("pet1");
    form.body("");
	form.button({ rawtext: [{ translate: "<<" }] });
    form.button({ rawtext: [{ translate: "select_class.ok" }] });
	form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
			pet11(player)
        }
        if (result.selection == 1) {
            player.runCommandAsync("/event entity @s well:allay_domado");
			player.runCommandAsync("/clear @s well:bussola_alma 0 1");
			player.runCommandAsync(`/tag @e[type=well:allay_domado, r=5] add ${petOwners[target.petId].ownerName}`);
        }
		if (result.selection == 2) {
			pet2(player)
        }
    });
}
export function pet2(player) {
    let form = new ui.ActionFormData();
	form.title("pet2");
    form.body("");
	form.button({ rawtext: [{ translate: "<<" }] });
    form.button({ rawtext: [{ translate: "select_class.ok" }] });
	form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
			pet1(player)
        }
        if (result.selection == 1) {
            player.runCommandAsync("/event entity @s well:bat_domado");
			player.runCommandAsync("/clear @s well:bussola_alma 0 1");
			player.runCommandAsync(`/tag @e[type=well:bat_domado, r=5] add ${player.getName()}`);
        }
		if (result.selection == 2) {
			pet3(player)
        }
    });
}
export function pet3(player) {
    let form = new ui.ActionFormData();
	form.title("pet3");
    form.body("");
	form.button({ rawtext: [{ translate: "<<" }] });
    form.button({ rawtext: [{ translate: "select_class.ok" }] });
	form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
			pet2(player)
        }
        if (result.selection == 1) {
            player.runCommandAsync("/event entity @s well:galinha_domada");
			player.runCommandAsync("/clear @s well:bussola_alma 0 1");
			player.runCommandAsync(`/tag @e[type=well:galinha_domada, r=5] add ${player.getName()}`);
        }
		if (result.selection == 2) {
			pet4(player)
        }
    });
}
export function pet4(player) {
    let form = new ui.ActionFormData();
	form.title("pet4");
    form.body("");
	form.button({ rawtext: [{ translate: "<<" }] });
    form.button({ rawtext: [{ translate: "select_class.ok" }] });
	form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
			pet3(player)
        }
        if (result.selection == 1) {
            player.runCommandAsync("/event entity @s well:fada_domada");
			player.runCommandAsync("/clear @s well:bussola_alma 0 1");
			player.runCommandAsync(`/tag @e[type=well:fada_domada, r=5] add ${player.getName()}`);
        }
		if (result.selection == 2) {
			pet5(player)
        }
    });
}
export function pet5(player) {
    let form = new ui.ActionFormData();
	form.title("pet5");
    form.body("");
	form.button({ rawtext: [{ translate: "<<" }] });
    form.button({ rawtext: [{ translate: "select_class.ok" }] });
	form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
			pet4(player)
        }
        if (result.selection == 1) {
            player.runCommandAsync("/event entity @s well:raposa_domada");
			player.runCommandAsync("/clear @s well:bussola_alma 0 1");
			player.runCommandAsync(`/tag @e[type=well:raposa_domada, r=5] add ${player.getName()}`);
        }
		if (result.selection == 2) {
			pet6(player)
        }
    });
}
export function pet6(player) {
    let form = new ui.ActionFormData();
	form.title("pet6");
    form.body("");
	form.button({ rawtext: [{ translate: "<<" }] });
    form.button({ rawtext: [{ translate: "select_class.ok" }] });
	form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
			pet5(player)
        }
        if (result.selection == 1) {
            player.runCommandAsync("/event entity @s well:sapo_domado");
			player.runCommandAsync("/clear @s well:bussola_alma 0 1");
			player.runCommandAsync(`/tag @e[type=well:sapo_domado, r=5] add ${player.getName()}`);
        }
		if (result.selection == 2) {
			pet7(player)
        }
    });
}
export function pet7(player) {
    let form = new ui.ActionFormData();
	form.title("pet7");
    form.body("");
	form.button({ rawtext: [{ translate: "<<" }] });
    form.button({ rawtext: [{ translate: "select_class.ok" }] });
	form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
			pet6(player)
        }
        if (result.selection == 1) {
            player.runCommandAsync("/event entity @s well:ocelot_domado");
			player.runCommandAsync("/clear @s well:bussola_alma 0 1");
			player.runCommandAsync(`/tag @e[type=well:ocelot_domado, r=5] add ${player.getName()}`);
        }
		if (result.selection == 2) {
			pet8(player)
        }
    });
}
export function pet8(player) {
    let form = new ui.ActionFormData();
	form.title("pet8");
    form.body("");
	form.button({ rawtext: [{ translate: "<<" }] });
    form.button({ rawtext: [{ translate: "select_class.ok" }] });
	form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
			pet7(player)
        }
        if (result.selection == 1) {
            player.runCommandAsync("/event entity @s well:coelho_domado");
			player.runCommandAsync("/clear @s well:bussola_alma 0 1");
			player.runCommandAsync(`/tag @e[type=well:coelho_domado, r=5] add ${player.getName()}`);
        }
		if (result.selection == 2) {
			pet9(player)
        }
    });
}
export function pet9(player) {
    let form = new ui.ActionFormData();
	form.title("pet9");
    form.body("");
	form.button({ rawtext: [{ translate: "<<" }] });
    form.button({ rawtext: [{ translate: "select_class.ok" }] });
	form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
			pet8(player)
        }
        if (result.selection == 1) {
            player.runCommandAsync("/event entity @s well:porco_domado");
			player.runCommandAsync("/clear @s well:bussola_alma 0 1");
			player.runCommandAsync(`/tag @e[type=well:porco_domado, r=5] add ${player.getName()}`);
        }
		if (result.selection == 2) {
			pet10(player)
        }
    });
}
export function pet10(player) {
    let form = new ui.ActionFormData();
	form.title("pet10");
    form.body("");
	form.button({ rawtext: [{ translate: "<<" }] });
    form.button({ rawtext: [{ translate: "select_class.ok" }] });
	form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
			pet9(player)
        }
        if (result.selection == 1) {
            player.runCommandAsync("/event entity @s well:cavalo_domado");
			player.runCommandAsync("/clear @s well:bussola_alma 0 1");
			player.runCommandAsync(`/tag @e[type=well:cavalo_domado, r=5] add ${player.getName()}`);
        }
		if (result.selection == 2) {
			pet11(player)
        }
    });
}
export function pet11(player) {
    let form = new ui.ActionFormData();
	form.title("pet11");
    form.body("");
	form.button({ rawtext: [{ translate: "<<" }] });
    form.button({ rawtext: [{ translate: "select_class.ok" }] });
	form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
			pet10(player)
        }
        if (result.selection == 1) {
            player.runCommandAsync("/event entity @s well:tatu_domado");
			player.runCommandAsync("/clear @s well:bussola_alma 0 1");
			player.runCommandAsync(`/tag @e[type=well:tatu_domado, r=5] add ${player.getName()}`);
        }
		if (result.selection == 2) {
			pet1(player)
        }
    });
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////

let petOwners = {};

function setOwner(player, petId) {
    petOwners[petId] = { ownerName: player.name };
}

function isPetOwner(player, petId) {
    return petOwners[petId] && petOwners[petId].ownerName === player.name;
}

function updatePetNameTag(target) {
    if (petOwners[target.petId]) {
        target.nameTag = `${target.nameTag}\n§´§eDono: ${petOwners[target.petId].ownerName}`;
    }
}

function petrename(player, target) {
    if (!isPetOwner(player, target.petId)) {
        player.sendMessage("Você não é o dono deste pet!");
        return;
    }

    const form = new ui.ModalFormData();
    form.textField("name", "Renomear o pet");
    form.show(player).then((result) => {
        if (!result.canceled) {
            target.nameTag = result.formValues[0];
            player.sendMessage(`§ePet renomeado para: ${result.formValues[0]}`);
            updatePetNameTag(target);
        }
    });
}

function petmenugeral(player, petId, target) {
    if (!isPetOwner(player, petId)) {
        player.sendMessage("Você não é o dono deste pet!");
        return;
    }

    let form = new ui.ActionFormData();
    form.title("petmenugeral");
    form.body("");
    form.button({ rawtext: [{ translate: "menu.pet.renomear" }] }, "textures/items/bone.png");
    form.button({ rawtext: [{ translate: "menu.pet.sentar" }] }, "textures/items/apple.png");
	form.button({ rawtext: [{ translate: "menu.pet.levantar" }] }, "textures/items/apple.png");
    //form.button({ rawtext: [{ translate: "menu.pet.upar" }] }, "textures/items/apple.png");
    //form.button({ rawtext: [{ translate: "menu.pet.guardar" }] }, "textures/items/apple.png");
    form.button({ rawtext: [{ translate: "menu.pet.skin" }] }, "textures/items/apple.png");
    //form.button({ rawtext: [{ translate: "menu.pet.modos" }] }, "textures/items/apple.png");

    form.show(player).then((result) => {
        switch (result.selection) {
            case 0:
                petrename(player, target);
                break;
            case 1:
                
                player.runCommandAsync("/function pet_menus/sentar");
                break;
				
			case 2:
			   
                player.runCommandAsync("/function pet_menus/levantar");
                break;	
            //case 2:
            //    up_pet(player, target);
            //    break;
            //case 3:
            //    player.runCommandAsync("function scripts_forms/dicas_missoes");
            //    break;
            case 3:
                // Chama a função de skin correspondente ao tipo de pet
                switch (target.typeId) {
                    case "well:allay":
                        skin_pet_allay(player);
                        break;
                    case "well:bat":
                        skin_pet_bat(player);
                        break;
					case "well:chicken":
                        skin_pet_chicken(player);
                        break;
					case "well:navi":
                        skin_pet_fada(player);
                        break;
						
						case "well:navi_amarela":
                        skin_pet_fada(player);
                        break;
						
						case "well:navi_dark":
                        skin_pet_fada(player);
                        break;
						
						case "well:navi_vermelha":
                        skin_pet_fada(player);
                        break;
						
						case "well:navi_verde":
                        skin_pet_fada(player);
                        break;
						
						case "well:navi_rosa":
                        skin_pet_fada(player);
                        break;
						
					case "well:fox":
                        skin_pet_fox(player);
                        break;
					case "well:frog":
                        skin_pet_frog(player);
                        break;
					case "well:horse":
                        skin_pet_horse(player);
                        break;
					case "well:ocelot":
                        skin_pet_ocelote(player);
                        break;
					case "well:pig":
                        skin_pet_pig(player);
                        break;
					case "well:rabbit":
                        skin_pet_rabbit(player);
                        break;
					case "well:tatu":
                        skin_pet_tatu(player);
                        break;

                    // Adicione os casos para outros tipos de pet conforme necessário
                    default:
                        // Mensagem de erro para tipos de pet não tratados
                        player.sendMessage("Skin não disponível para este tipo de pet.");
                        break;
                }
                break;
            //case 5:
            //    player.runCommandAsync("function scripts_forms/dicas_missoes");
            //    break;
        }
    }).catch((error) => {
        console.error("Erro na exibição do formulário:", error);
    });
}

world.afterEvents.playerInteractWithEntity.subscribe(({ player, target }) => {
    const validTypeIds = [
        "well:chicken",
        "well:allay",
        "well:bat",
        "well:fox",
		"well:tatu",
        "well:frog",
        "well:horse",
        "well:ocelot",
        "well:pig",
        "well:rabbit",
        "well:navi", "well:navi_amarela", "well:navi_dark", "well:navi_vermelha", "well:navi_verde", "well:navi_rosa"
    ];

    if (validTypeIds.includes(target.typeId)) {
        const petId = getPetId(target.typeId, player.name);

        if (!petOwners[petId]) {
            // Define o dono do pet apenas se não tiver um dono
            setOwner(player, petId);
        }

        if (isPetOwner(player, petId)) {
            target.petId = petId;
            petmenugeral(player, petId, target);
        } else {
            player.sendMessage("Você não é o dono deste pet!");
        }
    }
});

function getPetId(typeId, playerName) {
    return `${typeId}-${playerName}`;
}

export function skin_pet_allay(player) {
    let form = new ui.ActionFormData();
	form.title("pet_skins");
    form.body("");
    form.button({ rawtext: [{ translate: "§´Mascarado  15" }] }, "textures/ui/Pets_skins/allay/botoes/1.png" );
	form.button({ rawtext: [{ translate: "§´Ghost  5" }] }, "textures/ui/Pets_skins/allay/botoes/2.png" );
	form.button({ rawtext: [{ translate: "§´Ilusionista  10" }] }, "textures/ui/Pets_skins/allay/botoes/3.png" );
	form.button({ rawtext: [{ translate: "§´Ceifador  25" }] }, "textures/ui/Pets_skins/allay/botoes/4.png" );
	form.button({ rawtext: [{ translate: "§´Scorpion  30" }] }, "textures/ui/Pets_skins/allay/botoes/5.png" );
	form.button({ rawtext: [{ translate: "§´Happy  5" }] }, "textures/ui/Pets_skins/allay/botoes/6.png" );
    
    form.show(player).then((result) => {
        if (result.selection == 0) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=15..}] run event entity @e [type=well:allay, r=10, c=1] skin1")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=15..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=15..}] well:ruby 0 15")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..15}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..14}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 1) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=5..}] run event entity @e [type=well:allay, r=10, c=1] skin2")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=5..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=5..}] well:ruby 0 5")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..5}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..4}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 2) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run event entity @e [type=well:allay, r=10, c=1] skin3")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=10..}] well:ruby 0 10")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..10}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..9}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 3) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=25..}] run event entity @e [type=well:allay, r=10, c=1] skin4")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=25..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=25..}] well:ruby 0 25")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..25}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..24}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 4) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=30..}] run event entity @e [type=well:allay, r=10, c=1] skin5")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=30..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=30..}] well:ruby 0 30")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..30}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..29}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 5) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=5..}] run event entity @e [type=well:allay, r=10, c=1] skin6")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=5..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=5..}] well:ruby 0 5")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..5}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..4}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		
    });
}
export function skin_pet_bat(player) {
    let form = new ui.ActionFormData();
	form.title("pet_skins");
    form.body("");
    form.button({ rawtext: [{ translate: "§´ Enderbat  5" }] }, "textures/ui/Pets_skins/bat/botoes/1.png" );
	form.button({ rawtext: [{ translate: "§´ Observador  10" }] }, "textures/ui/Pets_skins/bat/botoes/2.png" );
	form.button({ rawtext: [{ translate: "§´ Gligar  15" }] }, "textures/ui/Pets_skins/bat/botoes/3.png" );
	form.button({ rawtext: [{ translate: "§´ Zubat  30" }] }, "textures/ui/Pets_skins/bat/botoes/4.png" );
	form.button({ rawtext: [{ translate: "§´ Owl  10" }] }, "textures/ui/Pets_skins/bat/botoes/5.png" );
	form.button({ rawtext: [{ translate: "§´ Twitter  20" }] }, "textures/ui/Pets_skins/bat/botoes/6.png" );
    
    form.show(player).then((result) => {
        if (result.selection == 0) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=5..}] run event entity @e [type=well:bat, r=10, c=1] skin1")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=5..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=5..}] well:ruby 0 5")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..5}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..4}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 1) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run event entity @e [type=well:bat, r=10, c=1] skin2")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=10..}] well:ruby 0 10")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..10}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..9}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 2) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=15..}] run event entity @e [type=well:bat, r=10, c=1] skin3")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=15..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=15..}] well:ruby 0 15")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..15}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..14}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 3) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=30..}] run event entity @e [type=well:bat, r=10, c=1] skin4")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=30..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=30..}] well:ruby 0 30")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..30}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..29}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 4) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run event entity @e [type=well:bat, r=10, c=1] skin5")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=10..}] well:ruby 0 10")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..10}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..9}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 5) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run event entity @e [type=well:bat, r=10, c=1] skin6")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=20..}] well:ruby 0 20")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..20}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..19}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		 
    });
}
export function skin_pet_chicken(player) {
    let form = new ui.ActionFormData();
	form.title("pet_skins");
    form.body("");
    form.button({ rawtext: [{ translate: "§´Red  45" }] }, "textures/ui/Pets_skins/chicken/botoes/1.png" );
	form.button({ rawtext: [{ translate: "§´Pesadelo  64" }] }, "textures/ui/Pets_skins/chicken/botoes/2.png" );
	form.button({ rawtext: [{ translate: "§´Goomba  30" }] }, "textures/ui/Pets_skins/chicken/botoes/3.png" );
	form.button({ rawtext: [{ translate: "§´FBI  20" }] }, "textures/ui/Pets_skins/chicken/botoes/4.png" );
	form.button({ rawtext: [{ translate: "§´Deadpool  10" }] }, "textures/ui/Pets_skins/chicken/botoes/5.png" );
	form.button({ rawtext: [{ translate: "§´Duck  15" }] }, "textures/ui/Pets_skins/chicken/botoes/6.png" );
    
    form.show(player).then((result) => {
        if (result.selection == 0) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=45..}] run event entity @e [type=well:chicken, r=10, c=1] skin1")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=45..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=45..}] well:ruby 0 45")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..45}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..44}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 1) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=64..}] run event entity @e [type=well:chicken, r=10, c=1] skin2")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=64..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=64..}] well:ruby 0 64")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..64}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..63}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 2) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=30..}] run event entity @e [type=well:chicken, r=10, c=1] skin3")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=30..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=30..}] well:ruby 0 30")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..30}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..29}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 3) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run event entity @e [type=well:chicken, r=10, c=1] skin4")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=20..}] well:ruby 0 20")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..20}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..19}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 4) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run event entity @e [type=well:chicken, r=10, c=1] skin5")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=10..}] well:ruby 0 10")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..10}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..9}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 5) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=15..}] run event entity @e [type=well:chicken, r=10, c=1] skin6")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=15..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=15..}] well:ruby 0 15")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..15}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..14}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		
    });
}
export function skin_pet_fada(player) {
    let form = new ui.ActionFormData();
	form.title("pet_skins");
    form.body("");
    form.button({ rawtext: [{ translate: "§´2D  10" }] }, "textures/items/navi_icon.png" );
	form.button({ rawtext: [{ translate: "§´Rose  10" }] }, "textures/ui/Pets_skins/fada/botoes/2.png" );
	form.button({ rawtext: [{ translate: "§´Green  10" }] }, "textures/ui/Pets_skins/fada/botoes/3.png" );
	form.button({ rawtext: [{ translate: "§´Red  10" }] }, "textures/ui/Pets_skins/fada/botoes/4.png" );
	form.button({ rawtext: [{ translate: "§´Black  10" }] }, "textures/ui/Pets_skins/fada/botoes/5.png" );
	form.button({ rawtext: [{ translate: "§´Yellow  10" }] }, "textures/ui/Pets_skins/fada/botoes/6.png" );
    
    form.show(player).then((result) => {
        if (result.selection == 0) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run event entity @e [family=fadapet, r=10, c=1] skin1")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=10..}] well:ruby 0 10")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..10}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..9}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 1) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run event entity @e [family=fadapet, r=10, c=1] skin2")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=10..}] well:ruby 0 10")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..10}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..9}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 2) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run event entity @e [family=fadapet, r=10, c=1] skin3")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=10..}] well:ruby 0 10")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..10}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..9}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 3) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run event entity @e [family=fadapet, r=10, c=1] skin4")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=10..}] well:ruby 0 10")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..10}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..9}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 4) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run event entity @e [family=fadapet, r=10, c=1] skin5")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=10..}] well:ruby 0 10")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..10}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..9}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 5) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run event entity @e [family=fadapet, r=10, c=1] skin6")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=10..}] well:ruby 0 10")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..10}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..9}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		
    });
}
export function skin_pet_fox(player) {
    let form = new ui.ActionFormData();
	form.title("pet_skins");
    form.body("");
    form.button({ rawtext: [{ translate: "§´§1Ártico  10" }] }, "textures/ui/Pets_skins/fox/botoes/1.png" );
	form.button({ rawtext: [{ translate: "§´§1Perry  15" }] }, "textures/ui/Pets_skins/fox/botoes/2.png" );
	form.button({ rawtext: [{ translate: "§´§1Style  45" }] }, "textures/ui/Pets_skins/fox/botoes/3.png" );
	form.button({ rawtext: [{ translate: "§´§1Guaxinim  20" }] }, "textures/ui/Pets_skins/fox/botoes/4.png" );
	form.button({ rawtext: [{ translate: "§´§1Zumbi  35" }] }, "textures/ui/Pets_skins/fox/botoes/5.png" );
	
	form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/raposa" );
    
    form.show(player).then((result) => {
        if (result.selection == 0) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=45..}] run event entity @e [type=well:fox, r=10, c=1] skin1")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=45..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=45..}] well:ruby 0 45")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..45}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..44}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 1) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=64..}] run event entity @e [type=well:fox, r=10, c=1] skin2")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=64..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=64..}] well:ruby 0 64")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..64}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..63}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 2) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=30..}] run event entity @e [type=well:fox, r=10, c=1] skin3")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=30..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=30..}] well:ruby 0 30")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..30}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..29}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 3) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run event entity @e [type=well:fox, r=10, c=1] skin4")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=20..}] well:ruby 0 20")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..20}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..19}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 4) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run event entity @e [type=well:fox, r=10, c=1] skin5")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=10..}] well:ruby 0 10")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..10}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..9}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		
		if (result.selection == 5) {
		player.runCommandAsync("execute as @p [r=5] run tellraw @p [r=5] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.update\" }]}")}
		
    });
}
export function skin_pet_frog(player) {
    let form = new ui.ActionFormData();
	form.title("pet_skins");
    form.body("");
    form.button({ rawtext: [{ translate: "§´§1Croagunk  20" }] }, "textures/ui/Pets_skins/frog/botoes/1.png" );
	form.button({ rawtext: [{ translate: "§´§1EnderFrog  10" }] }, "textures/ui/Pets_skins/frog/botoes/2.png" );
	form.button({ rawtext: [{ translate: "§´§1Suit  15" }] }, "textures/ui/Pets_skins/frog/botoes/3.png" );
	form.button({ rawtext: [{ translate: "§´§1Psicodélico  10" }] }, "textures/ui/Pets_skins/frog/botoes/4.png" );
	form.button({ rawtext: [{ translate: "§´§1Monstro  20" }] }, "textures/ui/Pets_skins/frog/botoes/5.png" );
	form.button({ rawtext: [{ translate: "§´§1  15" }] }, "textures/ui/Pets_skins/frog/botoes/6.png" );
    
    form.show(player).then((result) => {
        if (result.selection == 0) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run event entity @e [type=well:frog, r=10, c=1] skin1")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=20..}] well:ruby 0 20")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..20}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..19}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 1) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run event entity @e [type=well:frog, r=10, c=1] skin2")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=10..}] well:ruby 0 10")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..10}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..9}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 2) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=15..}] run event entity @e [type=well:frog, r=10, c=1] skin3")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=15..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=15..}] well:ruby 0 15")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..15}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..14}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 3) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run event entity @e [type=well:frog, r=10, c=1] skin4")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=10..}] well:ruby 0 10")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..10}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..9}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 4) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run event entity @e [type=well:frog, r=10, c=1] skin5")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=20..}] well:ruby 0 20")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..20}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..19}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 5) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=15..}] run event entity @e [type=well:frog, r=10, c=1] skin6")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=15..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=15..}] well:ruby 0 15")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..15}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..14}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		
    });
}
export function skin_pet_horse(player) {
    let form = new ui.ActionFormData();
	form.title("pet_skins");
    form.body("");
    form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/equinos" );
	form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/equinos" );
	form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/equinos" );
	form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/equinos" );
	form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/equinos" );
	form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/equinos" );
    
    form.show(player).then((result) => {
        if (result.selection == 0) {
        player.runCommandAsync("execute as @p [r=5] run tellraw @p [r=5] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.update\" }]}")}
		if (result.selection == 1) {
        player.runCommandAsync("execute as @p [r=5] run tellraw @p [r=5] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.update\" }]}")}
		if (result.selection == 2) {
        player.runCommandAsync("execute as @p [r=5] run tellraw @p [r=5] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.update\" }]}")}
		if (result.selection == 3) {
        player.runCommandAsync("execute as @p [r=5] run tellraw @p [r=5] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.update\" }]}")}
		if (result.selection == 4) {
        player.runCommandAsync("execute as @p [r=5] run tellraw @p [r=5] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.update\" }]}")}
		if (result.selection == 5) {
        player.runCommandAsync("execute as @p [r=5] run tellraw @p [r=5] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.update\" }]}")}
    });
}
export function skin_pet_ocelote(player) {
    let form = new ui.ActionFormData();
	form.title("pet_skins");
    form.body("");
    form.button({ rawtext: [{ translate: "" }] }, "textures/ui/Pets_skins/ocelote/botoes/1.png" );
	form.button({ rawtext: [{ translate: "" }] }, "textures/ui/Pets_skins/ocelote/botoes/2.png" );
	form.button({ rawtext: [{ translate: "" }] }, "textures/ui/Pets_skins/ocelote/botoes/3.png" );
	form.button({ rawtext: [{ translate: "" }] }, "textures/ui/Pets_skins/ocelote/botoes/4.png" );
	form.button({ rawtext: [{ translate: "" }] }, "textures/ui/Pets_skins/ocelote/botoes/5.png" );
	form.button({ rawtext: [{ translate: "" }] }, "textures/ui/Pets_skins/ocelote/botoes/6.png" );
    
    form.show(player).then((result) => {
        if (result.selection == 0) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=45..}] run event entity @e [type=well:ocelot, r=10, c=1] skin1")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=45..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=45..}] well:ruby 0 45")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..45}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..44}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 1) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=64..}] run event entity @e [type=well:ocelot, r=10, c=1] skin2")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=64..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=64..}] well:ruby 0 64")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..64}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..63}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 2) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=30..}] run event entity @e [type=well:ocelot, r=10, c=1] skin3")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=30..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=30..}] well:ruby 0 30")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..30}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..29}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 3) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run event entity @e [type=well:ocelot, r=10, c=1] skin4")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=20..}] well:ruby 0 20")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..20}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..19}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 4) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run event entity @e [type=well:ocelot, r=10, c=1] skin5")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=10..}] well:ruby 0 10")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..10}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..9}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 5) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=15..}] run event entity @e [type=well:ocelot, r=10, c=1] skin6")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=15..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=15..}] well:ruby 0 15")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..15}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..14}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		 
    });
}
export function skin_pet_pig(player) {
    let form = new ui.ActionFormData();
	form.title("pet_skins");
    form.body("");
    form.button({ rawtext: [{ translate: "§´§4Bulbasaur  45" }] }, "textures/ui/Pets_skins/pig/botoes/1.png" );
	form.button({ rawtext: [{ translate: "§´§4FBI  64" }] }, "textures/ui/Pets_skins/pig/botoes/2.png" );
	form.button({ rawtext: [{ translate: "§´§4Natal  30" }] }, "textures/ui/Pets_skins/pig/botoes/3.png" );
	form.button({ rawtext: [{ translate: "§´§4EnderPig  20" }] }, "textures/ui/Pets_skins/pig/botoes/4.png" );
	form.button({ rawtext: [{ translate: "§´§4Javali  10" }] }, "textures/ui/Pets_skins/pig/botoes/5.png" );
	form.button({ rawtext: [{ translate: "§´§4Jake  15" }] }, "textures/ui/Pets_skins/pig/botoes/6.png" );
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=45..}] run event entity @e [type=well:pig, r=10, c=1] skin1")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=45..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=45..}] well:ruby 0 45")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..45}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..44}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 1) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=64..}] run event entity @e [type=well:pig, r=10, c=1] skin2")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=64..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=64..}] well:ruby 0 64")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..64}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..63}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 2) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=30..}] run event entity @e [type=well:pig, r=10, c=1] skin3")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=30..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=30..}] well:ruby 0 30")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..30}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..29}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 3) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run event entity @e [type=well:pig, r=10, c=1] skin4")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=20..}] well:ruby 0 20")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..20}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..19}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 4) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run event entity @e [type=well:pig, r=10, c=1] skin5")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=10..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=10..}] well:ruby 0 10")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..10}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..9}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 5) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=15..}] run event entity @e [type=well:pig, r=10, c=1] skin6")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=15..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=15..}] well:ruby 0 15")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..15}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..14}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		
    });
}
export function skin_pet_rabbit(player) {
    let form = new ui.ActionFormData();
	form.title("pet_skins");
    form.body("");
    form.button({ rawtext: [{ translate: "" }] }, "textures/ui/Pets_skins/rabbit/botoes/1.png" );
	form.button({ rawtext: [{ translate: "" }] }, "textures/ui/Pets_skins/rabbit/botoes/2.png" );
	form.button({ rawtext: [{ translate: "" }] }, "textures/ui/Pets_skins/rabbit/botoes/3.png" );
	
	form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/coelho" );
	form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/coelho" );
	form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/coelho" );
    
    form.show(player).then((result) => {
        if (result.selection == 0) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=45..}] run event entity @e [type=well:rabbit, r=10, c=1] skin1")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=45..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=45..}] well:ruby 0 45")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..45}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..44}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 1) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=64..}] run event entity @e [type=well:rabbit, r=10, c=1] skin2")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=64..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=64..}] well:ruby 0 64")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..64}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..63}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 2) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=30..}] run event entity @e [type=well:rabbit, r=10, c=1] skin3")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=30..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=30..}] well:ruby 0 30")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..30}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..29}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		if (result.selection == 3) {
        player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run event entity @e [type=well:rabbit, r=10, c=1] skin4")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=20..}] run clear @p [r=5, hasitem={item=well:ruby, quantity=20..}] well:ruby 0 20")
		player.runCommandAsync("execute as @p [r=5, hasitem={item=well:ruby, quantity=..20}] run tellraw @p [r=5, hasitem={item=well:ruby, quantity=..19}] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.skin.ruby\" }]}")}
		
		if (result.selection == 4) {
		player.runCommandAsync("execute as @p [r=5] run tellraw @p [r=5] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.update\" }]}")}
		if (result.selection == 5) {
        player.runCommandAsync("execute as @p [r=5] run tellraw @p [r=5] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.update\" }]}")}
		
    });
}
export function skin_pet_tatu(player) {
    let form = new ui.ActionFormData();
	form.title("pet_skins");
    form.body("");
    form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/tatu" );
	form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/tatu" );
	form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/tatu" );
	form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/tatu" );
	form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/tatu" );
	form.button({ rawtext: [{ translate: "§´§1???" }] }, "textures/ui/bestiario/Bloqueado/tatu" );
    
    form.show(player).then((result) => {
        if (result.selection == 0) {
        player.runCommandAsync("execute as @p [r=5] run tellraw @p [r=5] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.update\" }]}")}
		if (result.selection == 1) {
        player.runCommandAsync("execute as @p [r=5] run tellraw @p [r=5] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.update\" }]}")}
		if (result.selection == 2) {
        player.runCommandAsync("execute as @p [r=5] run tellraw @p [r=5] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.update\" }]}")}
		if (result.selection == 3) {
        player.runCommandAsync("execute as @p [r=5] run tellraw @p [r=5] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.update\" }]}")}
		if (result.selection == 4) {
        player.runCommandAsync("execute as @p [r=5] run tellraw @p [r=5] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.update\" }]}")}
		if (result.selection == 5) {
        player.runCommandAsync("execute as @p [r=5] run tellraw @p [r=5] {\"rawtext\":[{ \"translate\":\"nao.pode.comprar.update\" }]}")}
    });
}


/////////////////////////////////////////////////////////////////////////////////////


export function menulistwell(player) {
    let form = new ui.ActionFormData();
	form.title("pergaminho_menu");
    form.body({ rawtext: [ { translate: "coleta_madeira.status" }, { text: `${getScore(player, "coleta_madeira")}` }, { text: "\n"}, { translate: "mineiracao.status" }, { text: `${getScore(player, "mineiracao")}` }, { text: "\n"}, { translate: "arqueologia.status" }, { text: `${getScore(player, "arqueologia")}` }, { text: "\n"}, { translate: "agricultura.status" }, { text: `${getScore(player, "agricultura")}` }  ]});
    form.button({ rawtext: [ { translate: "missoes.menu" }]}, "textures/items/teleporterapido.png");
	form.button({ rawtext: [ { translate: "bestiario.menu" }]}, "textures/items/bestiario.png");
	form.button({ rawtext: [ { translate: "status.menu" }]}, "textures/ui/FriendsDiversity.png");
	form.button({ rawtext: [ { translate: "teleporte.menu" }]}, "textures/items/ender_pearl.png");
	form.button({ rawtext: [ { translate: "opcoes.menu" }]}, "textures/ui/settings_glyph_color_2x.png");
	
	form.button({ rawtext: [ { translate: "criadores.text" }]}, "textures/ui/Espadas.png");
    
    form.show(player).then((result) => {
        if (result.selection == 0) {
            player.runCommandAsync("tag @p add contagem_remove_npc"); {menu_missao(player)}
        }
        if (result.selection == 1) {
            player.runCommandAsync("function scripts_forms/bestiario_menu");
        }
		if (result.selection == 2) {
            
			if (player.hasTag("novice")) {
                statusplayer(player);
            }
			if (player.hasTag("novice1")) {
                statusplayer(player);
            }
			if (player.hasTag("novice2")) {
                statusplayer(player);
            }
			if (player.hasTag("novice3")) {
                statusplayer(player);
            }
			if (player.hasTag("boss1")) {
                statusplayer(player);
            }
			
        }
		
		
		
		
		if (result.selection == 3) {
            teleporte(player);
        }
		if (result.selection == 4) {
            opcoes_menu(player);
        }
		if (result.selection == 5) {
            creditos(player);
        }
    });
}
export function menulistwell1(player) {
    let form = new ui.ActionFormData();
	form.title("pergaminho_menu2");
    form.body({ rawtext: [ { translate: "coleta_madeira.status" }, { text: `${getScore(player, "coleta_madeira")}` }, { text: "\n"}, { translate: "mineiracao.status" }, { text: `${getScore(player, "mineiracao")}` }, { text: "\n"}, { translate: "arqueologia.status" }, { text: `${getScore(player, "arqueologia")}` }, { text: "\n"}, { translate: "agricultura.status" }, { text: `${getScore(player, "agricultura")}` }  ]});
    form.button({ rawtext: [ { translate: "missoes.menu" }]}, "textures/items/teleporterapido.png");
	form.button({ rawtext: [ { translate: "bestiario.menu" }]}, "textures/items/bestiario.png");
	form.button({ rawtext: [ { translate: "status.menu" }]}, "textures/ui/FriendsDiversity.png");
	form.button({ rawtext: [ { translate: "teleporte.menu" }]}, "textures/items/ender_pearl.png");
	form.button({ rawtext: [ { translate: "opcoes.menu" }]}, "textures/ui/settings_glyph_color_2x.png");
	
	form.button({ rawtext: [ { translate: "criadores.text" }]}, "textures/ui/Espadas.png");
    
    form.show(player).then((result) => {
        if (result.selection == 0) {
            player.runCommandAsync("tag @p add contagem_remove_npc"); {menu_missao(player)}
        }
        if (result.selection == 1) {
            player.runCommandAsync("/function scripts_forms/bestiario_menu");
        }
		if (result.selection == 2) {
            
			
			if (player.hasTag("adventure")) {
                statusplayer1(player);
            }
			if (player.hasTag("adventure1")) {
                statusplayer1(player);
            }
			if (player.hasTag("adventure2")) {
                statusplayer1(player);
            }
			if (player.hasTag("adventure3")) {
                statusplayer1(player);
            }
			if (player.hasTag("adventure4")) {
                statusplayer1(player);
            }
			if (player.hasTag("boss2")) {
                statusplayer1(player);
            }
			
			
        }
		if (result.selection == 3) {
            teleporte(player);
        }
		if (result.selection == 4) {
            opcoes_menu(player);
        }
		if (result.selection == 5) {
            creditos(player);
        }
    });
}
export function menulistwell2(player) {
    let form = new ui.ActionFormData();
	form.title("pergaminho_menu3");
    form.body({ rawtext: [ { translate: "coleta_madeira.status" }, { text: `${getScore(player, "coleta_madeira")}` }, { text: "\n"}, { translate: "mineiracao.status" }, { text: `${getScore(player, "mineiracao")}` }, { text: "\n"}, { translate: "arqueologia.status" }, { text: `${getScore(player, "arqueologia")}` }, { text: "\n"}, { translate: "agricultura.status" }, { text: `${getScore(player, "agricultura")}` }  ]});
    form.button({ rawtext: [ { translate: "missoes.menu" }]}, "textures/items/teleporterapido.png");
	form.button({ rawtext: [ { translate: "bestiario.menu" }]}, "textures/items/bestiario.png");
	form.button({ rawtext: [ { translate: "status.menu" }]}, "textures/ui/FriendsDiversity.png");
	form.button({ rawtext: [ { translate: "teleporte.menu" }]}, "textures/items/ender_pearl.png");
	form.button({ rawtext: [ { translate: "opcoes.menu" }]}, "textures/ui/settings_glyph_color_2x.png");
	
	form.button({ rawtext: [ { translate: "criadores.text" }]}, "textures/ui/Espadas.png");
    
    form.show(player).then((result) => {
        if (result.selection == 0) {
            player.runCommandAsync("tag @p add contagem_remove_npc"); {menu_missao(player)}
        }
        if (result.selection == 1) {
            player.runCommandAsync("/function scripts_forms/bestiario_menu");
        }
		if (result.selection == 2) {
            
			if (player.hasTag("master")) {
                statusplayer2(player);
            }
			if (player.hasTag("master1")) {
                statusplayer2(player);
            }
			if (player.hasTag("master2")) {
                statusplayer2(player);
            }
			if (player.hasTag("boss3")) {
                statusplayer2(player);
            }
			
			
        }
		if (result.selection == 3) {
            teleporte(player);
        }
		if (result.selection == 4) {
            opcoes_menu(player);
        }
		if (result.selection == 5) {
            creditos(player);
        }
    });
}
export function menulistwell3(player) {
    let form = new ui.ActionFormData();
	form.title("pergaminho_menu4");
    form.body({ rawtext: [ { translate: "coleta_madeira.status" }, { text: `${getScore(player, "coleta_madeira")}` }, { text: "\n"}, { translate: "mineiracao.status" }, { text: `${getScore(player, "mineiracao")}` }, { text: "\n"}, { translate: "arqueologia.status" }, { text: `${getScore(player, "arqueologia")}` }, { text: "\n"}, { translate: "agricultura.status" }, { text: `${getScore(player, "agricultura")}` }  ]});
    form.button({ rawtext: [ { translate: "missoes.menu" }]}, "textures/items/teleporterapido.png");
	form.button({ rawtext: [ { translate: "bestiario.menu" }]}, "textures/items/bestiario.png");
	form.button({ rawtext: [ { translate: "status.menu" }]}, "textures/ui/FriendsDiversity.png");
	form.button({ rawtext: [ { translate: "teleporte.menu" }]}, "textures/items/ender_pearl.png");
	form.button({ rawtext: [ { translate: "opcoes.menu" }]}, "textures/ui/settings_glyph_color_2x.png");
	
	form.button({ rawtext: [ { translate: "criadores.text" }]}, "textures/ui/Espadas.png");
    
    form.show(player).then((result) => {
        if (result.selection == 0) {
            player.runCommandAsync("tag @p add contagem_remove_npc"); {menu_missao(player)}
        }
        if (result.selection == 1) {
            player.runCommandAsync("/function scripts_forms/bestiario_menu");
        }
		if (result.selection == 2) {
            
			if (player.hasTag("hero")) {
                statusplayer3(player);
            }
			if (player.hasTag("hero1")) {
                statusplayer3(player);
            }
			if (player.hasTag("hero2")) {
                statusplayer3(player);
            }
			if (player.hasTag("hero3")) {
                statusplayer3(player);
            }
			
        }
		if (result.selection == 3) {
            teleporte(player);
        }
		if (result.selection == 4) {
            opcoes_menu(player);
        }
		if (result.selection == 5) {
            creditos(player);
        }
    });
}
export function menulistwell4(player) {
    let form = new ui.ActionFormData();
	form.title("pergaminho_menu5");
    form.body({ rawtext: [ { translate: "coleta_madeira.status" }, { text: `${getScore(player, "coleta_madeira")}` }, { text: "\n"}, { translate: "mineiracao.status" }, { text: `${getScore(player, "mineiracao")}` }, { text: "\n"}, { translate: "arqueologia.status" }, { text: `${getScore(player, "arqueologia")}` }, { text: "\n"}, { translate: "agricultura.status" }, { text: `${getScore(player, "agricultura")}` }  ]});
    form.button({ rawtext: [ { translate: "missoes.menu" }]}, "textures/items/teleporterapido.png");
	form.button({ rawtext: [ { translate: "bestiario.menu" }]}, "textures/items/bestiario.png");
	form.button({ rawtext: [ { translate: "status.menu" }]}, "textures/ui/FriendsDiversity.png");
	form.button({ rawtext: [ { translate: "teleporte.menu" }]}, "textures/items/ender_pearl.png");
	form.button({ rawtext: [ { translate: "opcoes.menu" }]}, "textures/ui/settings_glyph_color_2x.png");
	
	form.button({ rawtext: [ { translate: "criadores.text" }]}, "textures/ui/Espadas.png");
    
    form.show(player).then((result) => {
        if (result.selection == 0) {
            player.runCommandAsync("tag @p add contagem_remove_npc"); {menu_missao(player)}
        }
        if (result.selection == 1) {
            player.runCommandAsync("/function scripts_forms/bestiario_menu");
        }
		if (result.selection == 2) {
            
			if (player.hasTag("boss4")) {
                statusplayer4(player);
            }
			
        }
		if (result.selection == 3) {
            teleporte(player);
        }
		if (result.selection == 4) {
            opcoes_menu(player);
        }
		if (result.selection == 5) {
            creditos(player);
        }
    });
}

// UI ActionFormData Status Player
export function statusplayer(player) {
    let form = new ui.ActionFormData();
    form.title("novice_status");
    form.body({
        rawtext: [
            { translate: "well:menunovoplayer.name" },
            { text: `${player.name}` },
            { text: "\n" },
            { translate: "coleta_madeira.status" },
            { text: `${getScore(player, "coleta_madeira")}` },
            { text: "\n" },
            { translate: "mineiracao.status" },
            { text: `${getScore(player, "mineiracao")}` },
            { text: "\n" },
            { translate: "arqueologia.status" },
            { text: `${getScore(player, "arqueologia")}` },
            { text: "\n" },
            { translate: "agricultura.status" },
            { text: `${getScore(player, "agricultura")}` }
        ]
    });
    form.button({ rawtext: [{ translate: "menu.voltar" }] }, "textures/ui/undoArrow.png");
    form.button({ rawtext: [{ translate: "up.armaduras" }] }, "textures/items/well_armadura_divina.png");
    form.button({ rawtext: [{ translate: "up.ferramentas" }] }, "textures/items/pamobile/well_espada_ruby.png");
	form.button({ rawtext: [{ translate: "up.classes.armas" }] }, "textures/ui/icon_best3.png");

    form.show(player).then((result) => {
        if (result.selection == 0) {
            if (player.hasTag("novice")) {
                menulistwell(player);
            }
			if (player.hasTag("novice1")) {
                menulistwell(player);
            }
			if (player.hasTag("novice2")) {
                menulistwell(player);
            }
			if (player.hasTag("novice3")) {
                menulistwell(player);
            }
			if (player.hasTag("boss1")) {
                menulistwell(player);
            }
			
        }
        if (result.selection == 1) {
            status_armadura(player)
        }
        if (result.selection == 2) {
            status_ferramentas(player)
        }
		
		if (result.selection == 3) {
            {status_classe(player)}
			
        }
    });
}
// UI ActionFormData Status Player
export function statusplayer1(player) {
    let form = new ui.ActionFormData();
    form.title("adventure_status");
    form.body({
        rawtext: [
            { translate: "well:menunovoplayer.name" },
            { text: `${player.name}` },
            { text: "\n" },
            { translate: "coleta_madeira.status" },
            { text: `${getScore(player, "coleta_madeira")}` },
            { text: "\n" },
            { translate: "mineiracao.status" },
            { text: `${getScore(player, "mineiracao")}` },
            { text: "\n" },
            { translate: "arqueologia.status" },
            { text: `${getScore(player, "arqueologia")}` },
            { text: "\n" },
            { translate: "agricultura.status" },
            { text: `${getScore(player, "agricultura")}` }
        ]
    });
    form.button({ rawtext: [{ translate: "menu.voltar" }] }, "textures/ui/undoArrow.png");
    form.button({ rawtext: [{ translate: "up.armaduras" }] }, "textures/items/well_armadura_divina.png");
    form.button({ rawtext: [{ translate: "up.ferramentas" }] }, "textures/items/pamobile/well_espada_ruby.png");
	form.button({ rawtext: [{ translate: "up.classes.armas" }] }, "textures/ui/icon_best3.png");

    form.show(player).then((result) => {
        if (result.selection == 0) {
            
			if (player.hasTag("adventure")) {
                menulistwell1(player);
            }
			if (player.hasTag("adventure1")) {
                menulistwell1(player);
            }
			if (player.hasTag("adventure2")) {
                menulistwell1(player);
            }
			if (player.hasTag("adventure3")) {
                menulistwell1(player);
            }
			if (player.hasTag("adventure4")) {
                menulistwell1(player);
            }
			if (player.hasTag("boss2")) {
                menulistwell1(player);
            }
			
        }
        if (result.selection == 1) {
            status_armadura(player)
        }
        if (result.selection == 2) {
            status_ferramentas(player)
        }
		if (result.selection == 3) {
            {status_classe(player)}
			
        }
    });
}
// UI ActionFormData Status Player
export function statusplayer2(player) {
    let form = new ui.ActionFormData();
    form.title("master_status");
    form.body({
        rawtext: [
            { translate: "well:menunovoplayer.name" },
            { text: `${player.name}` },
            { text: "\n" },
            { translate: "coleta_madeira.status" },
            { text: `${getScore(player, "coleta_madeira")}` },
            { text: "\n" },
            { translate: "mineiracao.status" },
            { text: `${getScore(player, "mineiracao")}` },
            { text: "\n" },
            { translate: "arqueologia.status" },
            { text: `${getScore(player, "arqueologia")}` },
            { text: "\n" },
            { translate: "agricultura.status" },
            { text: `${getScore(player, "agricultura")}` }
        ]
    });
    form.button({ rawtext: [{ translate: "menu.voltar" }] }, "textures/ui/undoArrow.png");
    form.button({ rawtext: [{ translate: "up.armaduras" }] }, "textures/items/well_armadura_divina.png");
    form.button({ rawtext: [{ translate: "up.ferramentas" }] }, "textures/items/pamobile/well_espada_ruby.png");
	form.button({ rawtext: [{ translate: "up.classes.armas" }] }, "textures/ui/icon_best3.png");

    form.show(player).then((result) => {
        if (result.selection == 0) {
            
			if (player.hasTag("master")) {
                menulistwell2(player);
            }
			if (player.hasTag("master1")) {
                menulistwell2(player);
            }
			if (player.hasTag("master2")) {
                menulistwell2(player);
            }
			if (player.hasTag("boss3")) {
                menulistwell2(player);
            }
			
        }
        if (result.selection == 1) {
            status_armadura(player)
        }
        if (result.selection == 2) {
            status_ferramentas(player)
        }
		if (result.selection == 3) {
            {status_classe(player)}
			
        }
    });
}
// UI ActionFormData Status Player
export function statusplayer3(player) {
    let form = new ui.ActionFormData();
    form.title("hero_status");
    form.body({
        rawtext: [
            { translate: "well:menunovoplayer.name" },
            { text: `${player.name}` },
            { text: "\n" },
            { translate: "coleta_madeira.status" },
            { text: `${getScore(player, "coleta_madeira")}` },
            { text: "\n" },
            { translate: "mineiracao.status" },
            { text: `${getScore(player, "mineiracao")}` },
            { text: "\n" },
            { translate: "arqueologia.status" },
            { text: `${getScore(player, "arqueologia")}` },
            { text: "\n" },
            { translate: "agricultura.status" },
            { text: `${getScore(player, "agricultura")}` }
        ]
    });
    form.button({ rawtext: [{ translate: "menu.voltar" }] }, "textures/ui/undoArrow.png");
    form.button({ rawtext: [{ translate: "up.armaduras" }] }, "textures/items/well_armadura_divina.png");
    form.button({ rawtext: [{ translate: "up.ferramentas" }] }, "textures/items/pamobile/well_espada_ruby.png");
	form.button({ rawtext: [{ translate: "up.classes.armas" }] }, "textures/ui/icon_best3.png");

    form.show(player).then((result) => {
        if (result.selection == 0) {
            
			if (player.hasTag("hero")) {
                menulistwell3(player);
            }
			if (player.hasTag("hero1")) {
                menulistwell3(player);
            }
			if (player.hasTag("hero2")) {
                menulistwell3(player);
            }
			if (player.hasTag("hero3")) {
                menulistwell3(player);
            }
        }
        if (result.selection == 1) {
            status_armadura(player)
        }
        if (result.selection == 2) {
            status_ferramentas(player)
        }
		if (result.selection == 3) {
            {status_classe(player)}
			
        }
    });
}
// UI ActionFormData Status Player
export function statusplayer4(player) {
    let form = new ui.ActionFormData();
    form.title("final_status");
    form.body({
        rawtext: [
            { translate: "well:menunovoplayer.name" },
            { text: `${player.name}` },
            { text: "\n" },
            { translate: "coleta_madeira.status" },
            { text: `${getScore(player, "coleta_madeira")}` },
            { text: "\n" },
            { translate: "mineiracao.status" },
            { text: `${getScore(player, "mineiracao")}` },
            { text: "\n" },
            { translate: "arqueologia.status" },
            { text: `${getScore(player, "arqueologia")}` },
            { text: "\n" },
            { translate: "agricultura.status" },
            { text: `${getScore(player, "agricultura")}` }
        ]
    });
    form.button({ rawtext: [{ translate: "menu.voltar" }] }, "textures/ui/undoArrow.png");
    form.button({ rawtext: [{ translate: "up.armaduras" }] }, "textures/items/well_armadura_divina.png");
    form.button({ rawtext: [{ translate: "up.ferramentas" }] }, "textures/items/pamobile/well_espada_ruby.png");
	form.button({ rawtext: [{ translate: "up.classes.armas" }] }, "textures/ui/icon_best3.png");

    form.show(player).then((result) => {
        if (result.selection == 0) {
            
			if (player.hasTag("boss4")) {
                menulistwell4(player);
            }
        }
        if (result.selection == 1) {
            status_armadura(player)
        }
        if (result.selection == 2) {
            status_ferramentas(player)
        }
		if (result.selection == 3) {
           {status_classe(player)}
			
        }
    });
}

////////////////////////////////////////////////////////////////////////////////////

export function menu_lula_d2(player) {
    let form = new ui.ActionFormData();
	form.title("bau_interface_lula_d2");
    form.body("");
    form.button({ rawtext: [{ translate: "ok" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        }
    });
}
export function menu_zumbi_d2(player) {
    let form = new ui.ActionFormData();
	form.title("bau_interface_zumbi_d2");
    form.body("");
    form.button({ rawtext: [{ translate: "ok" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        }
    });
}
export function menu_allay_d2(player) {
    let form = new ui.ActionFormData();
	form.title("bau_interface_allay_d2");
    form.body("");
    form.button({ rawtext: [{ translate: "ok" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        }
    });
}







//UI ActionFormData
export function changelog(player) {
    let form = new ui.ActionFormData();
	form.title("changelog");
    form.body("");
    form.button({ rawtext: [{ translate: "menu.voltar" }] }, "textures/ui/undoArrow.png");
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        }
    });
}

//UI ActionFormData
export function creditos(player) {
    let form = new ui.ActionFormData();
	form.title("menu_creditos");
    form.body("");
    form.button({ rawtext: [{ translate: "menu.voltar" }] }, "textures/ui/undoArrow.png");
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        }
    });
}

//MISSÕES PRINCIPAIS
export function menu_missao(player) {
    let form = new ui.ActionFormData();
    form.title("menu_missao");
    form.body("");
    form.button({ rawtext: [{ translate: "menu.ver.principaismissoes" }] }, "textures/items/book_enchanted.png");
    form.button({ rawtext: [{ translate: "menu.ver.submissoes" }] }, "textures/items/book_writable.png");

    form.show(player).then((result) => {
        if (result.selection == 0) {
            if (player.hasTag("novice")) {
                missao1(player);
            }  
			if (player.hasTag("novice1")) {
                missao2(player);
            }  
			if (player.hasTag("novice2")) {
                missao3(player);
            }  
			if (player.hasTag("novice3")) {
                missao4(player);
            }  
			if (player.hasTag("boss1")) {
                missao_boss1(player);
            }  
			if (player.hasTag("adventure")) {
                missao5(player);
            }  
			if (player.hasTag("adventure1")) {
                missao6(player);
            }  
			if (player.hasTag("adventure2")) {
                missao7(player);
            }  
			if (player.hasTag("adventure3")) {
                missao8(player);
            }  
			if (player.hasTag("adventure4")) {
                missao9(player);
            }  
			if (player.hasTag("boss2")) {
                missao_boss2(player);
            }  
			if (player.hasTag("master")) {
                missao10(player);
            }  
			if (player.hasTag("master1")) {
                missao11(player);
            }  
			if (player.hasTag("master2")) {
                missao12(player);
            }  
			if (player.hasTag("boss3")) {
                missao_boss3(player);
            }  
			if (player.hasTag("hero")) {
                missao13(player);
            }  
			if (player.hasTag("hero1")) {
                missao14(player);
            }  
			if (player.hasTag("hero2")) {
                missao15(player);
            }  
			if (player.hasTag("hero3")) {
                missao16(player);
            }  
			if (player.hasTag("hero4")) {
                missao17(player);
            }  
			if (player.hasTag("boss4")) {
                missao_boss4(player);
            }
        }

        if (result.selection == 1) {
			if (player.hasTag("subquest0")) {
                submissao0(player);
            }
            if (player.hasTag("subquest1")) {
                submissao1(player);
            }  
			if (player.hasTag("subquest2")) {
                submissao2(player);
            }  
			if (player.hasTag("subquest3")) {
                submissao3(player);
            }  
			if (player.hasTag("subquest4")) {
                submissao4(player);
            }  
			if (player.hasTag("subquest5")) {
                submissao5(player);
            }  
			if (player.hasTag("subquest6")) {
                submissao6(player);
            }  
			if (player.hasTag("subquest7")) {
                submissao7(player);
            }  
			if (player.hasTag("subquest8")) {
                submissao8(player);
            }  
			if (player.hasTag("subquest9")) {
                submissao9(player);
            }  
			if (player.hasTag("subquest10")) {
                submissao10(player);
            }  
			if (player.hasTag("subquest11")) {
                submissao11(player);
            }  
			if (player.hasTag("subquest12")) {
                submissao12(player);
            }  
			if (player.hasTag("subquest13")) {
                submissao13(player);
            }  
			if (player.hasTag("subquest14")) {
                submissao14(player);
            }  
			if (player.hasTag("subquest15")) {
                submissao15(player);
            }  
			if (player.hasTag("subquest16")) {
                submissao16(player);
            }  
			if (player.hasTag("subquest17")) {
                submissao17(player);
            }  
			if (player.hasTag("subquest18")) {
                submissao18(player);
            }  
			if (player.hasTag("subquest19")) {
                submissao19(player);
            }  
			if (player.hasTag("subquest20")) {
                submissao20(player);
            }  
			if (player.hasTag("subquest21")) {
                submissao21(player);
            }
			if (player.hasTag("subquest22")) {
                submissao22(player);
            }
			if (player.hasTag("subquest23")) {
                submissao23(player);
            }
			if (player.hasTag("subquest24")) {
                submissao24(player);
            }
			if (player.hasTag("subquest25")) {
                submissao25(player);
            }
			if (player.hasTag("subquest26")) {
                submissao26(player);
            }
			if (player.hasTag("subquest27")) {
                submissao27(player);
            }
			if (player.hasTag("subquest28")) {
                submissao28(player);
            }
			if (player.hasTag("subquest29")) {
                submissao29(player);
            }
			if (player.hasTag("subquest30")) {
                submissao30(player);
            }
        }
    });
}

//CAMERAS
export function camera(player) {
    let form = new ui.ActionFormData();
	form.title("camera");
    form.body("");
	form.button({ rawtext: [{ translate: "camera.desativada" }] }, "textures/ui/realms_red_x.png");
    form.button({ rawtext: [{ translate: "camera.primeira" }] }, "textures/ui/sidebar_icons/dressing_room_animation.png");
	form.button({ rawtext: [{ translate: "camera.terceira" }] }, "textures/ui/sidebar_icons/dressing_room_capes.png");
	form.button({ rawtext: [{ translate: "camera.rpg" }] }, "textures/ui/icon_recipe_equipment.png");
	form.button({ rawtext: [{ translate: "camera.expansiva" }] }, "textures/ui/World.png");
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
            player.runCommandAsync("/camera @s clear");
			player.runCommandAsync("/scoreboard players set @s camera_rpg 0");
			player.runCommandAsync("/scoreboard players set @s camera_dragao 0");
        }
        if (result.selection == 1) {
            
			player.runCommandAsync("/camera @s set minecraft:first_person");
			player.runCommandAsync("/scoreboard players set @s camera_rpg 0");
			player.runCommandAsync("/scoreboard players set @s camera_dragao 0");
        }
		if (result.selection == 2) {
            player.runCommandAsync("/camera @s set minecraft:third_person");
			player.runCommandAsync("/scoreboard players set @s camera_rpg 0");
			player.runCommandAsync("/scoreboard players set @s camera_dragao 0");
        }
		if (result.selection == 3) {
            player.runCommandAsync("/scoreboard players set @s camera_rpg 1");
			player.runCommandAsync("/scoreboard players set @s camera_dragao 0");
        }
		if (result.selection == 4) {
            player.runCommandAsync("/scoreboard players set @s camera_rpg 2");
			player.runCommandAsync("/scoreboard players set @s camera_dragao 0");
        }
    });
}

//MENU DE OPÇÕES
export function opcoes_menu(player) {
    let form = new ui.ActionFormData();
	form.title("opcoes_menu");
    form.body("");
	form.button({ rawtext: [{ translate: "menu.voltar" }] }, "textures/ui/undoArrow.png");
    form.button({ rawtext: [{ translate: "menu.ui.changelog" }] }, "textures/ui/infobulb.png");
	form.button("§´Tutorial", "textures/items/banner_pattern.png");
	form.button("§´Camera", "textures/ui/dressing_room_capes.png");
	//form.button({ rawtext: [{ translate: "menu.admin" }] }, "textures/ui/creative_icon.png");
	form.button({ rawtext: [{ translate: "menu.cinematica" }] }, "textures/ui/creative_icon.png");
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
            
			if (player.hasTag("novice")) {
                menulistwell(player);
            }
			if (player.hasTag("novice1")) {
                menulistwell(player);
            }
			if (player.hasTag("novice2")) {
                menulistwell(player);
            }
			if (player.hasTag("novice3")) {
                menulistwell(player);
            }
			if (player.hasTag("boss1")) {
                menulistwell(player);
            }
			if (player.hasTag("adventure")) {
                menulistwell1(player);
            }
			if (player.hasTag("adventure1")) {
                menulistwell1(player);
            }
			if (player.hasTag("adventure2")) {
                menulistwell1(player);
            }
			if (player.hasTag("adventure3")) {
                menulistwell1(player);
            }
			if (player.hasTag("adventure4")) {
                menulistwell1(player);
            }
			if (player.hasTag("boss2")) {
                menulistwell1(player);
            }
			if (player.hasTag("master")) {
                menulistwell2(player);
            }
			if (player.hasTag("master1")) {
                menulistwell2(player);
            }
			if (player.hasTag("master2")) {
                menulistwell2(player);
            }
			if (player.hasTag("boss3")) {
                menulistwell2(player);
            }
			if (player.hasTag("hero")) {
                menulistwell3(player);
            }
			if (player.hasTag("hero1")) {
                menulistwell3(player);
            }
			if (player.hasTag("hero2")) {
                menulistwell3(player);
            }
			if (player.hasTag("hero3")) {
                smenulistwell3(player);
            }
			if (player.hasTag("boss4")) {
                menulistwell4(player);
            }
			
        }
        if (result.selection == 1) {
            {changelog(player)}
        }
 
        if (result.selection == 2) {
            player.runCommandAsync("/function scripts_forms/tutorial");
        }
		if (result.selection == 3) {
            camera(player);
        }
		//if (result.selection == 4) {
        //    admin_menu(player);
        //}
		
		if (result.selection == 4) {
            player.runCommandAsync("/function scripts_forms/cinematica_opcoes");
        }
		
    });
}

export function teleporte(player) {
    let form = new ui.ActionFormData();
	form.title("teleporte");
    form.body("");
    form.button({ rawtext: [{ translate: "title.farlands.msg" }]}, "textures/items/totem.png");
	form.button({ rawtext: [{ translate: "title.mosscity.msg" }]}, "textures/items/itens_misticos/erva_gato.png");
	form.button({ rawtext: [{ translate: "title.glowstonecity.msg" }]}, "textures/items/itens_misticos/frasco_mana.png");
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
		player.runCommandAsync("tickingarea add circle ~ ~ ~ 4 padrao")
		player.runCommandAsync("tag @s add contagem_remove_npc")
		
		player.runCommandAsync("stopsound @s")
		player.runCommandAsync("playsound FarLand @s")
		player.runCommandAsync("titleraw @s title {\"rawtext\":[{ \"translate\":\"title.farlands.msg\" }]}")
		player.runCommandAsync("titleraw @s subtitle {\"rawtext\":[{ \"translate\":\"title.welcome.msg\" }]}")
		
		
		
		player.runCommandAsync("tag @e [family=pet, r=10] add tp_pets_farlands")
		player.runCommandAsync("tp @p [r=5] 41 70 36")
		player.runCommandAsync("kill @e [type=item]")
		
		
		
		}
		
		if (result.selection == 1) {
		player.runCommandAsync("function teleporte/tp_Moss")
		
		}
		
		if (result.selection == 2) {
		player.runCommandAsync("function teleporte/tp_Glowstone")
		
		}
    });
}

////////////////////////////////////////////////////////////////////////////
export function cinematica1(player) {
    let form = new ui.ActionFormData();
	form.title("cinematica1");
    form.body("");
    form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        cinematica2(player) }
    });
}
export function cinematica2(player) {
    let form = new ui.ActionFormData();
	form.title("cinematica2");
    form.body("");
    form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        cinematica3(player) }
    });
}
export function cinematica3(player) {
    let form = new ui.ActionFormData();
	form.title("cinematica3");
    form.body("");
    form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        cinematica4(player) }
    });
}
export function cinematica4(player) {
    let form = new ui.ActionFormData();
	form.title("cinematica4");
    form.body("");
    form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        cinematica5(player) }
    });
}
export function cinematica5(player) {
    let form = new ui.ActionFormData();
	form.title("cinematica5");
    form.body("");
    form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        cinematica6(player) }
    });
}
export function cinematica6(player) {
    let form = new ui.ActionFormData();
	form.title("cinematica6");
    form.body("");
    form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        cinematica7(player) }
    });
}
export function cinematica7(player) {
    let form = new ui.ActionFormData();
	form.title("cinematica7");
    form.body("");
    form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        cinematica8(player) }
    });
}
export function cinematica8(player) {
    let form = new ui.ActionFormData();
	form.title("cinematica8");
    form.body("");
    form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        cinematica9(player) }
    });
}
export function cinematica9(player) {
    let form = new ui.ActionFormData();
	form.title("cinematica9");
    form.body("");
    form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        cinematica10(player) }
    });
}
export function cinematica10(player) {
    let form = new ui.ActionFormData();
	form.title("cinematica10");
    form.body("");
    form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        cinematica11(player) }
    });
}
export function cinematica11(player) {
    let form = new ui.ActionFormData();
	form.title("cinematica11");
    form.body("");
    form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        genero(player) }
    });
}
////////////////////////////////////////////////////////////////////////////
export function genero(player) {
    let form = new ui.ActionFormData();
	form.title("genero");
    form.body("");
    form.button({ rawtext: [{ translate: "opcoes.masculino" }]}, "textures/ui/icon_steve.png");
	form.button({ rawtext: [{ translate: "opcoes.feminino" }]}, "textures/ui/icon_alex.png");
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("/scoreboard players set @s genero 1"); raca_mago(player) }
		
		if (result.selection == 1) {
        player.runCommandAsync("/scoreboard players set @s genero 2"); raca_mago(player) }
    });
}
export function raca_humana(player) {
    let form = new ui.ActionFormData();
	form.title("raca_humana");
    form.body("");
    form.button({ rawtext: [{ translate: "<<" }] });
	form.button({ rawtext: [{ translate: "select_class.ok" }] });
	form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        raca_mago(player) }
		
		//if (result.selection == 1) {
        //player.runCommandAsync("/function classe/humano");}
		
		if (result.selection == 1) {
        raca_humana(player)}
		
		if (result.selection == 2) {
        raca_elfo(player) }
    });
}
export function raca_elfo(player) {
    let form = new ui.ActionFormData();
	form.title("raca_elfo");
    form.body("");
    form.button({ rawtext: [{ translate: "<<" }] });
	form.button({ rawtext: [{ translate: "select_class.ok" }] });
	form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        raca_humana(player) }
		
		//if (result.selection == 1) {
        //player.runCommandAsync("/function classe/elfo");}
		
		if (result.selection == 1) {
        raca_elfo(player)}
		
		if (result.selection == 2) {
        raca_mago(player) }
    });
}
export function raca_mago(player) {
    let form = new ui.ActionFormData();
	form.title("raca_mago");
    form.body("");
    form.button({ rawtext: [{ translate: "<<" }] });
	form.button({ rawtext: [{ translate: "select_class.ok" }] });
	form.button({ rawtext: [{ translate: ">>" }] });
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        raca_elfo(player) }
		
		if (result.selection == 1) {
        player.runCommandAsync("/function classe/mago");}
		
		if (result.selection == 2) {
        raca_humana(player) }
    });
}
//////////////////////////////////////////////////////////////////////

export function resetmissao(player) {
    let form = new MessageFormData();
    form.title({ rawtext: [{ translate: "reset.missao" }]});
    form.body({ rawtext: [{ translate: "dialogo.reset_missao" }]});
    form.button1({ rawtext: [{ translate: "dialogo.nao" }]});
    form.button2({ rawtext: [{ translate: "dialogo.sim" }]});

    form.show(player).then(result => {
        if (result.selection === 0) {
            
            return;
        } else if (result.selection === 1) {
            player.runCommand("function scripts_forms/reset_missoes");
        }
    }).catch(error => {
        console.error(error, error.stack);
    });
}
export function resetmissao_missao_boss1(player) {
    let form = new MessageFormData();
    form.title({ rawtext: [{ translate: "reset.missao" }]});
    form.body({ rawtext: [{ translate: "dialogo.reset_missao" }]});
    form.button1({ rawtext: [{ translate: "dialogo.nao" }]});
    form.button2({ rawtext: [{ translate: "dialogo.sim" }]});

    form.show(player).then(result => {
        if (result.selection === 0) {
            
            return;
        } else if (result.selection === 1) {
            player.runCommand("function scripts_forms/reset_missoes");
        }
    }).catch(error => {
        console.error(error, error.stack);
    });
}
export function resetmissao_missao_boss2(player) {
    let form = new MessageFormData();
    form.title({ rawtext: [{ translate: "reset.missao" }]});
    form.body({ rawtext: [{ translate: "dialogo.reset_missao" }]});
    form.button1({ rawtext: [{ translate: "dialogo.nao" }]});
    form.button2({ rawtext: [{ translate: "dialogo.sim" }]});

    form.show(player).then(result => {
        if (result.selection === 0) {
            
            return;
        } else if (result.selection === 1) {
            player.runCommand("function scripts_forms/reset_missoes");
        }
    }).catch(error => {
        console.error(error, error.stack);
    });
}
export function resetmissao_missao_boss3(player) {
    let form = new MessageFormData();
    form.title({ rawtext: [{ translate: "reset.missao" }]});
    form.body({ rawtext: [{ translate: "dialogo.reset_missao" }]});
    form.button1({ rawtext: [{ translate: "dialogo.nao" }]});
    form.button2({ rawtext: [{ translate: "dialogo.sim" }]});

    form.show(player).then(result => {
        if (result.selection === 0) {
            
            return;
        } else if (result.selection === 1) {
            player.runCommand("function scripts_forms/reset_missoes");
        }
    }).catch(error => {
        console.error(error, error.stack);
    });
}
export function resetmissao_missao_boss4(player) {
    let form = new MessageFormData();
    form.title({ rawtext: [{ translate: "reset.missao" }]});
    form.body({ rawtext: [{ translate: "dialogo.reset_missao" }]});
    form.button1({ rawtext: [{ translate: "dialogo.nao" }]});
    form.button2({ rawtext: [{ translate: "dialogo.sim" }]});

    form.show(player).then(result => {
        if (result.selection === 0) {
            
            return;
        } else if (result.selection === 1) {
            player.runCommand("function scripts_forms/reset_missoes");
        }
    }).catch(error => {
        console.error(error, error.stack);
    });
}

export function status_armadura(player) {
    let form = new ui.ActionFormData();
	form.title("status_armaduras");
    form.body({
        rawtext: [
		    { text: "\n" }, { text: "\n" }, { text: "\n" },
            { text: "\n" }, { text: "\n" }, { text: "\n" }, { text: "\n" }, { text: "§l§5" },
			
            { text: `${getScore(player, "aranha")}` },{ translate: "status.do.jogador.chainmail" },
            { text: "\n" }, { text: "\n" }, { text: "§l§5" },
			
            { text: `${getScore(player, "bruxa")}` },{ translate: "status.do.jogador.gold" },
            { text: "\n" }, { text: "\n" }, { text: "§l§5" },
			
           { text: `${getScore(player, "zumbi")}` }, { translate: "status.do.jogador.iron" },
            { text: "\n" }, { text: "\n" }, { text: "§l§5" },
			
            { text: `${getScore(player, "esqueleto")}` },{ translate: "status.do.jogador.diamond" },
			{ text: "\n" }, { text: "\n" }, { text: "§l§5" },
			
           { text: `${getScore(player, "enderman")}` }, { translate: "status.do.jogador.netherite" },
			{ text: "\n" }, { text: "\n" }, { text: "§l§5" },
			
            { text: `${getScore(player, "esqueleto")}` }, { translate: "status.do.jogador.divino.armadura" }
			
        ]
    });
    form.button({ rawtext: [{ translate: "menu.voltar" }] }, "textures/ui/undoArrow.png");
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("")}
		
    });
}

export function status_ferramentas(player) {
    let form = new ui.ActionFormData();
	form.title("status_ferramentas");
    form.body({
        rawtext: [
            { text: "\n" }, { text: "\n" },
            { translate: "menu.acao.jogador.painel.itens" },
            { text: "\n" }, { text: "\n" },
			{ translate: " " },
            { translate: "status.do.jogador.2" },
            { text: "\n" }, { text: "\n" },
			{ translate: " " },
            { translate: "status.do.jogador.3" },
            { text: "\n" }, { text: "\n" },
			{ translate: " " },
            { translate: "status.do.jogador.4" },
            { text: "\n" }, { text: "\n" },
			{ translate: " " },
            { translate: "status.do.jogador.5" },
			{ text: "\n" }, { text: "\n" },
			{ translate: " " },
            { translate: "status.do.jogador.6" },
			{ text: "\n" }, { text: "\n" },
			{ translate: " " },
            { translate: "status.do.jogador.espada_divina" }
			
        ]
    });
    form.button({ rawtext: [{ translate: "menu.voltar" }] }, "textures/ui/undoArrow.png");
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("")}
		
    });
}

export function status_classe(player) {
    let form = new ui.ActionFormData();
	form.title("status_mago_lv1");
    form.body({
        rawtext: [
		    { text: "§4" },
            { text: `${player.name}` }, { text: "§0" },
            { text: "\n" },
            { translate: "levels.orb.proximo.level.lv2" }, 
            { text: `${getScore(player, "skill_mago_orbe")}` },
			{ translate: "levels.orb.5" }, { text: " " }, { text: "" }
			
        ]
    });
    form.button({ rawtext: [{ translate: ">> " }] }, "textures/ui/pergaminhos/classes/mago/1");
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        status_classe2(player)}
		
    });
}

export function status_classe2(player) {
    let form = new ui.ActionFormData();
	form.title("status_mago_lv2");
    form.body({
        rawtext: [
		    { text: "§4" },
            { text: `${player.name}` }, { text: "§0" },
            { text: "\n" },
            { translate: "levels.orb.proximo.level.lv3" }, 
            { text: `${getScore(player, "skill_mago_orbe")}` },
			{ translate: "levels.orb.10" }, { text: " " }, { text: "" }
			
        ]
    });
    form.button({ rawtext: [{ translate: ">> " }] }, "textures/ui/pergaminhos/classes/mago/2");
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        status_classe3(player)}
		
    });
}

export function status_classe3(player) {
    let form = new ui.ActionFormData();
	form.title("status_mago_lv3");
    form.body({
        rawtext: [
		    { text: "§4" },
            { text: `${player.name}` }, { text: "§0" },
            { text: "\n" },
            { translate: "levels.orb.proximo.level.lv4" }, 
            { text: `${getScore(player, "skill_mago_orbe")}` },
			{ translate: "levels.orb.20" }, { text: " " }, { text: "" }
			
        ]
    });
    form.button({ rawtext: [{ translate: ">> " }] }, "textures/ui/pergaminhos/classes/mago/3");
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        status_classe4(player)}
		
    });
}

export function status_classe4(player) {
    let form = new ui.ActionFormData();
	form.title("status_mago_lv4");
    form.body({
        rawtext: [
		    { text: "§4" },
            { text: `${player.name}` }, { text: "§0" },
            { text: "\n" },
            { translate: "levels.orb.proximo.level.lv5" }, 
            { text: `${getScore(player, "skill_mago_orbe")}` },
			{ translate: "levels.orb.30" }, { text: " " }, { text: "" }
			
        ]
    });
    form.button({ rawtext: [{ translate: ">> " }] }, "textures/ui/pergaminhos/classes/mago/4");
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        status_classe5(player)}
		
    });
}

export function status_classe5(player) {
    let form = new ui.ActionFormData();
	form.title("status_mago_lv5");
    form.body({
        rawtext: [
		    { text: "§4" },
            { text: `${player.name}` }, { text: "§0" },
            { text: "\n" },
            { translate: "levels.orb.proximo.level.padrao" }, 
            { text: `${getScore(player, "skill_mago_orbe")}` },
			{ translate: "levels.orb.30" }, { text: " " }, { text: "" }
			
        ]
    });
    form.button({ rawtext: [{ translate: ">> " }] }, "textures/ui/pergaminhos/classes/mago/5");
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        status_classe(player)}
		
    });
}

export function missao1(player) {
    let form = new ui.ActionFormData();
	form.title("missao1");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao2(player) {
    let form = new ui.ActionFormData();
	form.title("missao2");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao3(player) {
    let form = new ui.ActionFormData();
	form.title("missao3");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao4(player) {
    let form = new ui.ActionFormData();
	form.title("missao4");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao5(player) {
    let form = new ui.ActionFormData();
	form.title("missao5");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao6(player) {
    let form = new ui.ActionFormData();
	form.title("missao6");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao7(player) {
    let form = new ui.ActionFormData();
	form.title("missao7");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao8(player) {
    let form = new ui.ActionFormData();
	form.title("missao8");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao9(player) {
    let form = new ui.ActionFormData();
	form.title("missao9");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao10(player) {
    let form = new ui.ActionFormData();
	form.title("missao10");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao11(player) {
    let form = new ui.ActionFormData();
	form.title("missao11");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao12(player) {
    let form = new ui.ActionFormData();
	form.title("missao12");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao13(player) {
    let form = new ui.ActionFormData();
	form.title("missao13");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao14(player) {
    let form = new ui.ActionFormData();
	form.title("missao14");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao15(player) {
    let form = new ui.ActionFormData();
	form.title("missao15");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao16(player) {
    let form = new ui.ActionFormData();
	form.title("missao16");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}
export function missao17(player) {
    let form = new ui.ActionFormData();
	form.title("missao17");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao(player) }
    });
}


export function missao_boss1(player) {
    let form = new ui.ActionFormData();
	form.title("missao_boss1");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "dungeon.reset" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao_missao_boss1(player) }
    });
}
export function missao_boss2(player) {
    let form = new ui.ActionFormData();
	form.title("missao_boss2");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "dungeon.reset" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao_missao_boss2(player) }
    });
}
export function missao_boss3(player) {
    let form = new ui.ActionFormData();
	form.title("missao_boss3");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "dungeon.reset" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao_missao_boss3(player) }
    });
}
export function missao_boss4(player) {
    let form = new ui.ActionFormData();
	form.title("missao_boss4");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "dungeon.reset" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_missoes")}
		
		if (result.selection == 1) {
        resetmissao_missao_boss4(player) }
    });
}

export function submissao0(player) {
    let form = new ui.ActionFormData();
	form.title("submissao0");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao1(player) {
    let form = new ui.ActionFormData();
	form.title("submissao1");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao2(player) {
    let form = new ui.ActionFormData();
	form.title("submissao2");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao3(player) {
    let form = new ui.ActionFormData();
	form.title("submissao3");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao4(player) {
    let form = new ui.ActionFormData();
	form.title("submissao4");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao5(player) {
    let form = new ui.ActionFormData();
	form.title("submissao5");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao6(player) {
    let form = new ui.ActionFormData();
	form.title("submissao6");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao7(player) {
    let form = new ui.ActionFormData();
	form.title("submissao7");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao8(player) {
    let form = new ui.ActionFormData();
	form.title("submissao8");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao9(player) {
    let form = new ui.ActionFormData();
	form.title("submissao9");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao10(player) {
    let form = new ui.ActionFormData();
	form.title("submissao10");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao11(player) {
    let form = new ui.ActionFormData();
	form.title("submissao11");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao12(player) {
    let form = new ui.ActionFormData();
	form.title("submissao12");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao13(player) {
    let form = new ui.ActionFormData();
	form.title("submissao13");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao14(player) {
    let form = new ui.ActionFormData();
	form.title("submissao14");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao15(player) {
    let form = new ui.ActionFormData();
	form.title("submissao15");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao16(player) {
    let form = new ui.ActionFormData();
	form.title("submissao16");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao17(player) {
    let form = new ui.ActionFormData();
	form.title("submissao17");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao18(player) {
    let form = new ui.ActionFormData();
	form.title("submissao18");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao19(player) {
    let form = new ui.ActionFormData();
	form.title("submissao19");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao20(player) {
    let form = new ui.ActionFormData();
	form.title("submissao20");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao21(player) {
    let form = new ui.ActionFormData();
	form.title("submissao21");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao22(player) {
    let form = new ui.ActionFormData();
	form.title("submissao22");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao23(player) {
    let form = new ui.ActionFormData();
	form.title("submissao23");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao24(player) {
    let form = new ui.ActionFormData();
	form.title("submissao24");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao25(player) {
    let form = new ui.ActionFormData();
	form.title("submissao25");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao26(player) {
    let form = new ui.ActionFormData();
	form.title("submissao26");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao27(player) {
    let form = new ui.ActionFormData();
	form.title("submissao27");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao28(player) {
    let form = new ui.ActionFormData();
	form.title("submissao28");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao29(player) {
    let form = new ui.ActionFormData();
	form.title("submissao29");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
export function submissao30(player) {
    let form = new ui.ActionFormData();
	form.title("submissao30");
    form.body("");
    form.button({ rawtext: [{ translate: "dicas.menu" }]});
	form.button({ rawtext: [{ translate: "reset.missao" }]});
    
    form.show(player).then((result) => {
        
		if (result.selection == 0) {
        player.runCommandAsync("function scripts_forms/dicas_submissoes")}
		
		if (result.selection == 1) {
        resetsubmissao(player) }
    });
}
