import { world, system, BlockPermutation, Dimension, GameMode } from "@minecraft/server";

world.beforeEvents.worldInitialize.subscribe(initEvent => {
  const mbCustomSlab = [
    "nicothekid:corrupted_slab",
    "nicothekid:corrupted_stone_bricks_slab",
    "nicothekid:corrupted_stone_slab",
    "nicothekid:mossy_slab",
    "nicothekid:overgrown_jungle_slab",
    "nicothekid:polished_corrupted_stone_slab"
  ]
  initEvent.blockTypeRegistry.registerCustomComponent("nicothekid:mb_double_slab", {
    onPlayerInteract: eventData => {
      const player = eventData.player;
      const block = eventData.block;
      const blockFacing = eventData.face;
      const blockLocation = block.location;
      const playerEquippable = player.getComponent("equippable");
      const itemUsed = playerEquippable.getEquipment("Mainhand");
      function decreaseItem () {
        system.run(() => {
          if (!player.matches({ gameMode: GameMode.creative })) {
            const decrementItem = itemUsed.amount == 1 ? undefined : (itemUsed.amount--, itemUsed);
            playerEquippable.setEquipment("Mainhand", decrementItem)
          }
        });
      }
      if (itemUsed === undefined || blockFacing === "South" || blockFacing === "East" || blockFacing === "North" || blockFacing === "West") return;
      if (mbCustomSlab.includes(itemUsed.typeId) && mbCustomSlab.includes(block.typeId)) {
        if (itemUsed.typeId === "nicothekid:corrupted_slab") {
          if (block.permutation.matches("nicothekid:corrupted_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:corrupted_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.wood", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:corrupted_stone_bricks_slab") {
          if (block.permutation.matches("nicothekid:corrupted_stone_bricks_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:corrupted_stone_bricks_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.basalt", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_stone_bricks_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:corrupted_stone_slab") {
          if (block.permutation.matches("nicothekid:corrupted_stone_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:corrupted_stone_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.basalt", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_stone_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:mossy_slab") {
          if (block.permutation.matches("nicothekid:mossy_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:mossy_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.wood", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:mossy_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:overgrown_jungle_slab") {
          if (block.permutation.matches("nicothekid:overgrown_jungle_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:overgrown_jungle_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.wood", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:overgrown_jungle_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:polished_corrupted_stone_slab") {
          if (block.permutation.matches("nicothekid:polished_corrupted_stone_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:polished_corrupted_stone_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.basalt", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:polished_corrupted_stone_double_slab"));
            return;
          }
        }
      }
      else return;
    }
  });
  
  const nbeCustomSlab = [
    "nicothekid:andesite_bricks_slab",
    "nicothekid:diorite_bricks_slab",
    "nicothekid:granite_bricks_slab",
    "nicothekid:polished_calcite_slab",
    "nicothekid:polished_dripstone_slab",
    "nicothekid:polished_stone_slab"
  ]
  initEvent.blockTypeRegistry.registerCustomComponent("nicothekid:nbe_double_slab", {
    onPlayerInteract: eventData => {
      const player = eventData.player;
      const block = eventData.block;
      const blockFacing = eventData.face;
      const blockLocation = block.location;
      const playerEquippable = player.getComponent("equippable");
      const itemUsed = playerEquippable.getEquipment("Mainhand");
      function decreaseItem () {
        system.run(() => {
          if (!player.matches({ gameMode: GameMode.creative })) {
            const decrementItem = itemUsed.amount == 1 ? undefined : (itemUsed.amount--, itemUsed);
            playerEquippable.setEquipment("Mainhand", decrementItem)
          }
        });
      }
      if (itemUsed === undefined || blockFacing === "South" || blockFacing === "East" || blockFacing === "North" || blockFacing === "West") return;
      if (nbeCustomSlab.includes(itemUsed.typeId) && nbeCustomSlab.includes(block.typeId)) {
        if (itemUsed.typeId === "nicothekid:andesite_bricks_slab") {
          if (block.permutation.matches("nicothekid:andesite_bricks_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:andesite_bricks_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.stone", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:andesite_bricks_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:diorite_bricks_slab") {
          if (block.permutation.matches("nicothekid:diorite_bricks_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:diorite_bricks_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.stone", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:diorite_bricks_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:granite_bricks_slab") {
          if (block.permutation.matches("nicothekid:granite_bricks_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:granite_bricks_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.stone", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:granite_bricks_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:polished_calcite_slab") {
          if (block.permutation.matches("nicothekid:polished_calcite_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:polished_calcite_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("place.calcite", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:polished_calcite_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:polished_dripstone_slab") {
          if (block.permutation.matches("nicothekid:polished_dripstone_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:polished_dripstone_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("place.dripstone_block", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:polished_dripstone_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:polished_stone_slab") {
          if (block.permutation.matches("nicothekid:polished_stone_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:polished_stone_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.stone", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:polished_stone_double_slab"));
            return;
          }
        }
      }
      else return;
    }
  });
  
  const nceCustomSlab = [
    "nicothekid:limestone_bricks_slab",
    "nicothekid:limestone_slab",
    "nicothekid:marble_bricks_slab",
    "nicothekid:marble_slab",
    "nicothekid:mosshroom_slab",
    "nicothekid:polished_limestone_slab",
    "nicothekid:polished_marble_slab",
    "nicothekid:polished_soul_stone_slab",
    "nicothekid:rose_quartz_slab",
    "nicothekid:smooth_rose_quartz_slab",
    "nicothekid:soul_stone_bricks_slab",
    "nicothekid:soul_stone_slab"
  ]
  initEvent.blockTypeRegistry.registerCustomComponent("nicothekid:nce_double_slab", {
    onPlayerInteract: eventData => {
      const player = eventData.player;
      const block = eventData.block;
      const blockFacing = eventData.face;
      const blockLocation = block.location;
      const playerEquippable = player.getComponent("equippable");
      const itemUsed = playerEquippable.getEquipment("Mainhand");
      function decreaseItem () {
        system.run(() => {
          if (!player.matches({ gameMode: GameMode.creative })) {
            const decrementItem = itemUsed.amount == 1 ? undefined : (itemUsed.amount--, itemUsed);
            playerEquippable.setEquipment("Mainhand", decrementItem)
          }
        });
      }
      if (itemUsed === undefined || blockFacing === "South" || blockFacing === "East" || blockFacing === "North" || blockFacing === "West") return;
      if (nceCustomSlab.includes(itemUsed.typeId) && nceCustomSlab.includes(block.typeId)) {
        if (itemUsed.typeId === "nicothekid:limestone_bricks_slab") {
          if (block.permutation.matches("nicothekid:limestone_bricks_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:limestone_bricks_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.stone", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:limestone_bricks_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:limestone_slab") {
          if (block.permutation.matches("nicothekid:limestone_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:limestone_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.stone", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:limestone_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:marble_bricks_slab") {
          if (block.permutation.matches("nicothekid:marble_bricks_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:marble_bricks_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("place.calcite", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:marble_bricks_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:marble_slab") {
          if (block.permutation.matches("nicothekid:marble_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:marble_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("place.calcite", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:marble_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:mosshroom_slab") {
          if (block.permutation.matches("nicothekid:mosshroom_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:mosshroom_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("step.nether_wood", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:mosshroom_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:polished_limestone_slab") {
          if (block.permutation.matches("nicothekid:polished_limestone_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:polished_limestone_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.stone", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:polished_limestone_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:polished_marble_slab") {
          if (block.permutation.matches("nicothekid:polished_marble_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:polished_marble_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.calcite", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:polished_marble_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:polished_soul_stone_slab") {
          if (block.permutation.matches("nicothekid:polished_soul_stone_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:polished_soul_stone_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.stone", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:polished_soul_stone_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:rose_quartz_slab") {
          if (block.permutation.matches("nicothekid:rose_quartz_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:rose_quartz_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.stone", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:rose_quartz_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:smooth_rose_quartz_slab") {
          if (block.permutation.matches("nicothekid:smooth_rose_quartz_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:smooth_rose_quartz_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.stone", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:smooth_rose_quartz_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:soul_stone_bricks_slab") {
          if (block.permutation.matches("nicothekid:soul_stone_bricks_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:soul_stone_bricks_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.stone", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:soul_stone_bricks_double_slab"));
            return;
          }
        }
        if (itemUsed.typeId === "nicothekid:soul_stone_slab") {
          if (block.permutation.matches("nicothekid:soul_stone_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:soul_stone_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.stone", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:soul_stone_double_slab"));
            return;
          }
        }
      }
      else return;
    }
  });
  
  const nmCustomSlab = [
    "nicothekid:mud_soil_bricks_slab"
  ]
  initEvent.blockTypeRegistry.registerCustomComponent("nicothekid:nm_double_slab", {
    onPlayerInteract: eventData => {
      const player = eventData.player;
      const block = eventData.block;
      const blockFacing = eventData.face;
      const blockLocation = block.location;
      const playerEquippable = player.getComponent("equippable");
      const itemUsed = playerEquippable.getEquipment("Mainhand");
      function decreaseItem () {
        system.run(() => {
          if (!player.matches({ gameMode: GameMode.creative })) {
            const decrementItem = itemUsed.amount == 1 ? undefined : (itemUsed.amount--, itemUsed);
            playerEquippable.setEquipment("Mainhand", decrementItem)
          }
        });
      }
      if (itemUsed === undefined || blockFacing === "South" || blockFacing === "East" || blockFacing === "North" || blockFacing === "West") return;
      if (nmCustomSlab.includes(itemUsed.typeId) && nmCustomSlab.includes(block.typeId)) {
        if (itemUsed.typeId === "nicothekid:mud_soil_bricks_slab") {
          if (block.permutation.matches("nicothekid:mud_soil_bricks_slab", {"minecraft:vertical_half": "bottom"}) && blockFacing === "Up" || block.permutation.matches("nicothekid:mud_soil_bricks_slab", {"minecraft:vertical_half": "top"}) && blockFacing === "Down") {
            decreaseItem ();
            block.dimension.playSound("use.stone", blockLocation, { pitch: 0.8, volume: 1.0 });
            block.setPermutation(BlockPermutation.resolve("nicothekid:mud_soil_bricks_double_slab"));
            return;
          }
        }
      }
      else return;
    }
  });
});

world.beforeEvents.itemUseOn.subscribe(eventData => {
  const player = eventData.source;
  const itemUsed = eventData.itemStack;
  const block = eventData.block;
  const blockFacing = eventData.blockFace;
  const blockLocation = block.location;
  const playerEquippable = player.getComponent("equippable");
  const customSlab = [
    "nicothekid:andesite_bricks_slab",
    "nicothekid:corrupted_slab",
    "nicothekid:corrupted_stone_bricks_slab",
    "nicothekid:corrupted_stone_slab",
    "nicothekid:diorite_bricks_slab",
    "nicothekid:granite_bricks_slab",
    "nicothekid:limestone_bricks_slab",
    "nicothekid:limestone_slab",
    "nicothekid:marble_bricks_slab",
    "nicothekid:marble_slab",
    "nicothekid:mosshroom_slab",
    "nicothekid:mossy_slab",
    "nicothekid:mud_soil_bricks_slab",
    "nicothekid:overgrown_jungle_slab",
    "nicothekid:polished_calcite_slab",
    "nicothekid:polished_corrupted_stone_slab",
    "nicothekid:polished_dripstone_slab",
    "nicothekid:polished_limestone_slab",
    "nicothekid:polished_marble_slab",
    "nicothekid:polished_soul_stone_slab",
    "nicothekid:polished_stone_slab",
    "nicothekid:rose_quartz_slab",
    "nicothekid:smooth_rose_quartz_slab",
    "nicothekid:soul_stone_bricks_slab",
    "nicothekid:soul_stone_slab"
  ]
  const interactableBlocks = [
    "minecraft:acacia_button",
    "minecraft:acacia_door",
    "minecraft:acacia_fence_gate",
    "minecraft:acacia_hanging_sign",
    "minecraft:acacia_standing_sign",
    "minecraft:acacia_trapdoor",
    "minecraft:acacia_wall_sign",
    "minecraft:anvil",
    "minecraft:armor_stand",
    "minecraft:bamboo_button",
    "minecraft:bamboo_door",
    "minecraft:bamboo_fence_gate",
    "minecraft:bamboo_hanging_sign",
    "minecraft:bamboo_standing_sign",
    "minecraft:bamboo_trapdoor",
    "minecraft:bamboo_wall_sign",
    "minecraft:barrel",
    "minecraft:beacon",
    "minecraft:bed",
    "minecraft:bell",
    "minecraft:birch_button",
    "minecraft:birch_door",
    "minecraft:birch_fence_gate",
    "minecraft:birch_hanging_sign",
    "minecraft:birch_standing_sign",
    "minecraft:birch_trapdoor",
    "minecraft:birch_wall_sign",
    "minecraft:black_candle_cake",
    "minecraft:black_shulker_box",
    "minecraft:blast_furnace",
    "minecraft:blue_candle_cake",
    "minecraft:blue_shulker_box",
    "minecraft:brewing_stand",
    "minecraft:brown_candle_cake",
    "minecraft:brown_shulker_box",
    "minecraft:cake",
    "minecraft:candle_cake",
    "minecraft:cartography_table",
    "minecraft:cherry_button",
    "minecraft:cherry_door",
    "minecraft:cherry_fence_gate",
    "minecraft:cherry_hanging_sign",
    "minecraft:cherry_standing_sign",
    "minecraft:cherry_trapdoor",
    "minecraft:cherry_wall_sign",
    "minecraft:chest",
    "minecraft:chiseled_bookshelf",
    "minecraft:copper_door",
    "minecraft:copper_trapdoor",
    "minecraft:crafting_table",
    "minecraft:crimson_button",
    "minecraft:crimson_door",
    "minecraft:crimson_fence_gate",
    "minecraft:crimson_hanging_sign",
    "minecraft:crimson_standing_sign",
    "minecraft:crimson_trapdoor",
    "minecraft:crimson_wall_sign",
    "minecraft:cyan_candle_cake",
    "minecraft:cyan_shulker_box",
    "minecraft:dark_oak_button",
    "minecraft:dark_oak_door",
    "minecraft:dark_oak_fence_gate",
    "minecraft:dark_oak_hanging_sign",
    "minecraft:dark_oak_trapdoor",
    "minecraft:darkoak_standing_sign",
    "minecraft:darkoak_wall_sign",
    "minecraft:decorated_pot",
    "minecraft:dispenser",
    "minecraft:dropper",
    "minecraft:enchanting_table",
    "minecraft:ender_chest",
    "minecraft:exposed_copper_door",
    "minecraft:exposed_copper_trapdoor",
    "minecraft:fence_gate",
    "minecraft:furnace",
    "minecraft:glow_frame",
    "minecraft:gray_candle_cake",
    "minecraft:gray_shulker_box",
    "minecraft:green_candle_cake",
    "minecraft:green_shulker_box",
    "minecraft:grindstone",
    "minecraft:hopper",
    "minecraft:iron_door",
    "minecraft:iron_trapdoor",
    "minecraft:item_frame",
    "minecraft:jungle_button",
    "minecraft:jungle_door",
    "minecraft:jungle_fence_gate",
    "minecraft:jungle_hanging_sign",
    "minecraft:jungle_standing_sign",
    "minecraft:jungle_trapdoor",
    "minecraft:jungle_wall_sign",
    "minecraft:lever",
    "minecraft:light_blue_candle_cake",
    "minecraft:light_blue_shulker_box",
    "minecraft:light_gray_candle_cake",
    "minecraft:light_gray_shulker_box",
    "minecraft:lime_candle_cake",
    "minecraft:lime_shulker_box",
    "minecraft:lit_blast_furnace",
    "minecraft:lit_furnace",
    "minecraft:lit_smoker",
    "minecraft:loom",
    "minecraft:magenta_candle_cake",
    "minecraft:magenta_shulker_box",
    "minecraft:mangrove_button",
    "minecraft:mangrove_door",
    "minecraft:mangrove_fence_gate",
    "minecraft:mangrove_hanging_sign",
    "minecraft:mangrove_standing_sign",
    "minecraft:mangrove_trapdoor",
    "minecraft:mangrove_wall_sign",
    "minecraft:oak_hanging_sign",
    "minecraft:orange_candle_cake",
    "minecraft:orange_shulker_box",
    "minecraft:oxidized_copper_door",
    "minecraft:oxidized_copper_trapdoor",
    "minecraft:pink_candle_cake",
    "minecraft:pink_shulker_box",
    "minecraft:polished_blackstone_button",
    "minecraft:purple_candle_cake",
    "minecraft:purple_shulker_box",
    "minecraft:red_candle_cake",
    "minecraft:red_shulker_box",
    "minecraft:repeater",
    "minecraft:smithing_table",
    "minecraft:smoker",
    "minecraft:spruce_button",
    "minecraft:spruce_door",
    "minecraft:spruce_fence_gate",
    "minecraft:spruce_hanging_sign",
    "minecraft:spruce_standing_sign",
    "minecraft:spruce_trapdoor",
    "minecraft:spruce_wall_sign",
    "minecraft:standing_sign",
    "minecraft:stone_button",
    "minecraft:stonecutter_block",
    "minecraft:trapdoor",
    "minecraft:trapped_chest",
    "minecraft:undyed_shulker_box",
    "minecraft:wall_sign",
    "minecraft:warped_button",
    "minecraft:warped_door",
    "minecraft:warped_fence_gate",
    "minecraft:warped_hanging_sign",
    "minecraft:warped_standing_sign",
    "minecraft:warped_trapdoor",
    "minecraft:warped_wall_sign",
    "minecraft:waxed_copper_door",
    "minecraft:waxed_copper_trapdoor",
    "minecraft:waxed_exposed_copper_door",
    "minecraft:waxed_exposed_copper_trapdoor",
    "minecraft:waxed_oxidized_copper_door",
    "minecraft:waxed_oxidized_copper_trapdoor",
    "minecraft:waxed_weathered_copper_door",
    "minecraft:waxed_weathered_copper_trapdoor",
    "minecraft:weathered_copper_door",
    "minecraft:weathered_copper_trapdoor",
    "minecraft:white_candle_cake",
    "minecraft:white_shulker_box",
    "minecraft:wooden_button",
    "minecraft:wooden_door",
    "minecraft:yellow_candle_cake",
    "minecraft:yellow_shulker_box"
  ]
  function decreaseItem () {
    if (!player.matches({ gameMode: GameMode.creative })) {
      const decrementItem = itemUsed.amount == 1 ? undefined : (itemUsed.amount--, itemUsed);
      playerEquippable.setEquipment("Mainhand", decrementItem)
    }
  }
  if (itemUsed === undefined || !playerEquippable) return;
  if (interactableBlocks.includes(block.typeId) && !player.isSneaking || block.hasTag("interactable_block") && !player.isSneaking) return;
  if (customSlab.includes(itemUsed.typeId)) {
    const blockAbove = block.above(1);
    const blockBelow = block.below(1);
    const blockSouth = block.south(1);
    const blockEast = block.east(1);
    const blockNorth = block.north(1);
    const blockWest = block.west(1);
    if (blockFacing === "Up" && customSlab.includes(blockAbove.typeId)) {
      if (blockAbove.typeId === "nicothekid:andesite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:andesite_bricks_slab") {
          if (block.typeId === "nicothekid:andesite_bricks_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:andesite_bricks_double_slab"));
            blockAbove.dimension.playSound("use.stone", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:corrupted_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_slab") {
          if (block.typeId === "nicothekid:corrupted_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_double_slab"));
            blockAbove.dimension.playSound("use.wood", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:corrupted_stone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_stone_bricks_slab") {
          if (block.typeId === "nicothekid:corrupted_stone_bricks_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_stone_bricks_double_slab"));
            blockAbove.dimension.playSound("use.basalt", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:corrupted_stone_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_stone_slab") {
          if (block.typeId === "nicothekid:corrupted_stone_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_stone_double_slab"));
            blockAbove.dimension.playSound("use.basalt", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:diorite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:diorite_bricks_slab") {
          if (block.typeId === "nicothekid:diorite_bricks_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:diorite_bricks_double_slab"));
            blockAbove.dimension.playSound("use.stone", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:granite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:granite_bricks_slab") {
          if (block.typeId === "nicothekid:granite_bricks_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:granite_bricks_double_slab"));
            blockAbove.dimension.playSound("use.stone", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:limestone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:limestone_bricks_slab") {
          if (block.typeId === "nicothekid:limestone_bricks_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:limestone_bricks_double_slab"));
            blockAbove.dimension.playSound("use.stone", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:limestone_slab") {
        if (itemUsed.typeId === "nicothekid:limestone_slab") {
          if (block.typeId === "nicothekid:limestone_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:limestone_double_slab"));
            blockAbove.dimension.playSound("use.stone", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:marble_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:marble_bricks_slab") {
          if (block.typeId === "nicothekid:marble_bricks_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:marble_bricks_double_slab"));
            blockAbove.dimension.playSound("place.calcite", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:marble_slab") {
        if (itemUsed.typeId === "nicothekid:marble_slab") {
          if (block.typeId === "nicothekid:marble_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:marble_double_slab"));
            blockAbove.dimension.playSound("place.calcite", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:mosshroom_slab") {
        if (itemUsed.typeId === "nicothekid:mosshroom_slab") {
          if (block.typeId === "nicothekid:mosshroom_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:mosshroom_double_slab"));
            blockAbove.dimension.playSound("step.nether_wood", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:mossy_slab") {
        if (itemUsed.typeId === "nicothekid:mossy_slab") {
          if (block.typeId === "nicothekid:mossy_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:mossy_double_slab"));
            blockAbove.dimension.playSound("use.wood", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:mud_soil_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:mud_soil_bricks_slab") {
          if (block.typeId === "nicothekid:mud_soil_bricks_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:mud_soil_bricks_double_slab"));
            blockAbove.dimension.playSound("use.stone", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:overgrown_jungle_slab") {
        if (itemUsed.typeId === "nicothekid:overgrown_jungle_slab") {
          if (block.typeId === "nicothekid:overgrown_jungle_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:overgrown_jungle_double_slab"));
            blockAbove.dimension.playSound("use.wood", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:polished_calcite_slab") {
        if (itemUsed.typeId === "nicothekid:polished_calcite_slab") {
          if (block.typeId === "nicothekid:polished_calcite_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:polished_calcite_double_slab"));
            blockAbove.dimension.playSound("place.calcite", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:polished_corrupted_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_corrupted_stone_slab") {
          if (block.typeId === "nicothekid:polished_corrupted_stone_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:polished_corrupted_stone_double_slab"));
            blockAbove.dimension.playSound("use.basalt", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:polished_dripstone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_dripstone_slab") {
          if (block.typeId === "nicothekid:polished_dripstone_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:polished_dripstone_double_slab"));
            blockAbove.dimension.playSound("place.dripstone_block", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:polished_limestone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_limestone_slab") {
          if (block.typeId === "nicothekid:polished_limestone_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:polished_limestone_double_slab"));
            blockAbove.dimension.playSound("use.stone", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:polished_marble_slab") {
        if (itemUsed.typeId === "nicothekid:polished_marble_slab") {
          if (block.typeId === "nicothekid:polished_marble_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:polished_marble_double_slab"));
            blockAbove.dimension.playSound("place.calcite", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:polished_soul_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_soul_stone_slab") {
          if (block.typeId === "nicothekid:polished_soul_stone_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:polished_soul_stone_double_slab"));
            blockAbove.dimension.playSound("use.stone", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:polished_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_stone_slab") {
          if (block.typeId === "nicothekid:polished_stone_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:polished_stone_double_slab"));
            blockAbove.dimension.playSound("use.stone", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:rose_quartz_slab") {
        if (itemUsed.typeId === "nicothekid:rose_quartz_slab") {
          if (block.typeId === "nicothekid:rose_quartz_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:rose_quartz_double_slab"));
            blockAbove.dimension.playSound("use.stone", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:smooth_rose_quartz_slab") {
        if (itemUsed.typeId === "nicothekid:smooth_rose_quartz_slab") {
          if (block.typeId === "nicothekid:smooth_rose_quartz_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:smooth_rose_quartz_double_slab"));
            blockAbove.dimension.playSound("use.stone", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:soul_stone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:soul_stone_bricks_slab") {
          if (block.typeId === "nicothekid:soul_stone_bricks_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:soul_stone_bricks_double_slab"));
            blockAbove.dimension.playSound("use.stone", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockAbove.typeId === "nicothekid:soul_stone_slab") {
        if (itemUsed.typeId === "nicothekid:soul_stone_slab") {
          if (block.typeId === "nicothekid:soul_stone_slab") return;
          system.run(() => {
            blockAbove.setPermutation(BlockPermutation.resolve("nicothekid:soul_stone_double_slab"));
            blockAbove.dimension.playSound("use.stone", blockAbove.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
    }
    if (blockFacing === "Down" && customSlab.includes(blockBelow.typeId)) {
      if (blockBelow.typeId === "nicothekid:andesite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:andesite_bricks_slab") {
          if (block.typeId === "nicothekid:andesite_bricks_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:andesite_bricks_double_slab"));
            blockBelow.dimension.playSound("use.stone", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:corrupted_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_slab") {
          if (block.typeId === "nicothekid:corrupted_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_double_slab"));
            blockBelow.dimension.playSound("use.wood", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:corrupted_stone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_stone_bricks_slab") {
          if (block.typeId === "nicothekid:corrupted_stone_bricks_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_stone_bricks_double_slab"));
            blockBelow.dimension.playSound("use.basalt", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:corrupted_stone_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_stone_slab") {
          if (block.typeId === "nicothekid:corrupted_stone_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_stone_double_slab"));
            blockBelow.dimension.playSound("use.basalt", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:diorite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:diorite_bricks_slab") {
          if (block.typeId === "nicothekid:diorite_bricks_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:diorite_bricks_double_slab"));
            blockBelow.dimension.playSound("use.stone", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:granite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:granite_bricks_slab") {
          if (block.typeId === "nicothekid:granite_bricks_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:granite_bricks_double_slab"));
            blockBelow.dimension.playSound("use.stone", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:limestone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:limestone_bricks_slab") {
          if (block.typeId === "nicothekid:limestone_bricks_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:limestone_bricks_double_slab"));
            blockBelow.dimension.playSound("use.stone", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:limestone_slab") {
        if (itemUsed.typeId === "nicothekid:limestone_slab") {
          if (block.typeId === "nicothekid:limestone_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:limestone_double_slab"));
            blockBelow.dimension.playSound("use.stone", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:marble_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:marble_bricks_slab") {
          if (block.typeId === "nicothekid:marble_bricks_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:marble_bricks_double_slab"));
            blockBelow.dimension.playSound("place.calcite", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:marble_slab") {
        if (itemUsed.typeId === "nicothekid:marble_slab") {
          if (block.typeId === "nicothekid:marble_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:marble_double_slab"));
            blockBelow.dimension.playSound("place.calcite", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:mosshroom_slab") {
        if (itemUsed.typeId === "nicothekid:mosshroom_slab") {
          if (block.typeId === "nicothekid:mosshroom_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:mosshroom_double_slab"));
            blockBelow.dimension.playSound("step.nether_wood", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:mossy_slab") {
        if (itemUsed.typeId === "nicothekid:mossy_slab") {
          if (block.typeId === "nicothekid:mossy_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:mossy_double_slab"));
            blockBelow.dimension.playSound("use.wood", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:mud_soil_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:mud_soil_bricks_slab") {
          if (block.typeId === "nicothekid:mud_soil_bricks_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:mud_soil_bricks_double_slab"));
            blockBelow.dimension.playSound("use.stone", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:overgrown_jungle_slab") {
        if (itemUsed.typeId === "nicothekid:overgrown_jungle_slab") {
          if (block.typeId === "nicothekid:overgrown_jungle_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:overgrown_jungle_double_slab"));
            blockBelow.dimension.playSound("use.wood", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:polished_calcite_slab") {
        if (itemUsed.typeId === "nicothekid:polished_calcite_slab") {
          if (block.typeId === "nicothekid:polished_calcite_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:polished_calcite_double_slab"));
            blockBelow.dimension.playSound("place.calcite", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:polished_corrupted_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_corrupted_stone_slab") {
          if (block.typeId === "nicothekid:polished_corrupted_stone_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:polished_corrupted_stone_double_slab"));
            blockBelow.dimension.playSound("use.basalt", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:polished_dripstone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_dripstone_slab") {
          if (block.typeId === "nicothekid:polished_dripstone_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:polished_dripstone_double_slab"));
            blockBelow.dimension.playSound("place.dripstone_block", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:polished_limestone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_limestone_slab") {
          if (block.typeId === "nicothekid:polished_limestone_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:polished_limestone_double_slab"));
            blockBelow.dimension.playSound("use.stone", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:polished_marble_slab") {
        if (itemUsed.typeId === "nicothekid:polished_marble_slab") {
          if (block.typeId === "nicothekid:polished_marble_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:polished_marble_double_slab"));
            blockBelow.dimension.playSound("place.calcite", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:polished_soul_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_soul_stone_slab") {
          if (block.typeId === "nicothekid:polished_soul_stone_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:polished_soul_stone_double_slab"));
            blockBelow.dimension.playSound("use.stone", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:polished_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_stone_slab") {
          if (block.typeId === "nicothekid:polished_stone_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:polished_stone_double_slab"));
            blockBelow.dimension.playSound("use.stone", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:rose_quartz_slab") {
        if (itemUsed.typeId === "nicothekid:rose_quartz_slab") {
          if (block.typeId === "nicothekid:rose_quartz_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:rose_quartz_double_slab"));
            blockBelow.dimension.playSound("use.stone", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:smooth_rose_quartz_slab") {
        if (itemUsed.typeId === "nicothekid:smooth_rose_quartz_slab") {
          if (block.typeId === "nicothekid:smooth_rose_quartz_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:smooth_rose_quartz_double_slab"));
            blockBelow.dimension.playSound("use.stone", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:soul_stone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:soul_stone_bricks_slab") {
          if (block.typeId === "nicothekid:soul_stone_bricks_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:soul_stone_bricks_double_slab"));
            blockBelow.dimension.playSound("use.stone", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockBelow.typeId === "nicothekid:soul_stone_slab") {
        if (itemUsed.typeId === "nicothekid:soul_stone_slab") {
          if (block.typeId === "nicothekid:soul_stone_slab") return;
          system.run(() => {
            blockBelow.setPermutation(BlockPermutation.resolve("nicothekid:soul_stone_double_slab"));
            blockBelow.dimension.playSound("use.stone", blockBelow.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
    }
    if (blockFacing === "South" && customSlab.includes(blockSouth.typeId)) {
      if (blockSouth.typeId === "nicothekid:andesite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:andesite_bricks_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:andesite_bricks_double_slab"));
            blockSouth.dimension.playSound("use.stone", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:corrupted_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_double_slab"));
            blockSouth.dimension.playSound("use.wood", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:corrupted_stone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_stone_bricks_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_stone_bricks_double_slab"));
            blockSouth.dimension.playSound("use.basalt", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:corrupted_stone_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_stone_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_stone_double_slab"));
            blockSouth.dimension.playSound("use.basalt", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:diorite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:diorite_bricks_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:diorite_bricks_double_slab"));
            blockSouth.dimension.playSound("use.stone", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:granite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:granite_bricks_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:granite_bricks_double_slab"));
            blockSouth.dimension.playSound("use.stone", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:limestone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:limestone_bricks_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:limestone_bricks_double_slab"));
            blockSouth.dimension.playSound("use.stone", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:limestone_slab") {
        if (itemUsed.typeId === "nicothekid:limestone_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:limestone_double_slab"));
            blockSouth.dimension.playSound("use.stone", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:marble_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:marble_bricks_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:marble_bricks_double_slab"));
            blockSouth.dimension.playSound("place.calcite", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:marble_slab") {
        if (itemUsed.typeId === "nicothekid:marble_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:marble_double_slab"));
            blockSouth.dimension.playSound("place.calcite", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:mosshroom_slab") {
        if (itemUsed.typeId === "nicothekid:mosshroom_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:mosshroom_double_slab"));
            blockSouth.dimension.playSound("step.nether_wood", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:mossy_slab") {
        if (itemUsed.typeId === "nicothekid:mossy_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:mossy_double_slab"));
            blockSouth.dimension.playSound("use.wood", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:mud_soil_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:mud_soil_bricks_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:mud_soil_bricks_double_slab"));
            blockSouth.dimension.playSound("use.stone", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:overgrown_jungle_slab") {
        if (itemUsed.typeId === "nicothekid:overgrown_jungle_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:overgrown_jungle_double_slab"));
            blockSouth.dimension.playSound("use.wood", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:polished_calcite_slab") {
        if (itemUsed.typeId === "nicothekid:polished_calcite_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:polished_calcite_double_slab"));
            blockSouth.dimension.playSound("place.calcite", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:polished_corrupted_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_corrupted_stone_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:polished_corrupted_stone_double_slab"));
            blockSouth.dimension.playSound("use.basalt", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:polished_dripstone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_dripstone_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:polished_dripstone_double_slab"));
            blockSouth.dimension.playSound("place.dripstone_block", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:polished_limestone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_limestone_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:polished_limestone_double_slab"));
            blockSouth.dimension.playSound("use.stone", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:polished_marble_slab") {
        if (itemUsed.typeId === "nicothekid:polished_marble_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:polished_marble_double_slab"));
            blockSouth.dimension.playSound("place.calcite", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:polished_soul_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_soul_stone_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:polished_soul_stone_double_slab"));
            blockSouth.dimension.playSound("use.stone", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:polished_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_stone_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:polished_stone_double_slab"));
            blockSouth.dimension.playSound("use.stone", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:rose_quartz_slab") {
        if (itemUsed.typeId === "nicothekid:rose_quartz_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:rose_quartz_double_slab"));
            blockSouth.dimension.playSound("use.stone", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:smooth_rose_quartz_slab") {
        if (itemUsed.typeId === "nicothekid:smooth_rose_quartz_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:smooth_rose_quartz_double_slab"));
            blockSouth.dimension.playSound("use.stone", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:soul_stone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:soul_stone_bricks_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:soul_stone_bricks_double_slab"));
            blockSouth.dimension.playSound("use.stone", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockSouth.typeId === "nicothekid:soul_stone_slab") {
        if (itemUsed.typeId === "nicothekid:soul_stone_slab") {
          system.run(() => {
            blockSouth.setPermutation(BlockPermutation.resolve("nicothekid:soul_stone_double_slab"));
            blockSouth.dimension.playSound("use.stone", blockSouth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
    }
    if (blockFacing === "East" && customSlab.includes(blockEast.typeId)) {
      if (blockEast.typeId === "nicothekid:andesite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:andesite_bricks_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:andesite_bricks_double_slab"));
            blockEast.dimension.playSound("use.stone", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:corrupted_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_double_slab"));
            blockEast.dimension.playSound("use.wood", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:corrupted_stone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_stone_bricks_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_stone_bricks_double_slab"));
            blockEast.dimension.playSound("use.basalt", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:corrupted_stone_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_stone_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_stone_double_slab"));
            blockEast.dimension.playSound("use.basalt", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:diorite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:diorite_bricks_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:diorite_bricks_double_slab"));
            blockEast.dimension.playSound("use.stone", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:granite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:granite_bricks_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:granite_bricks_double_slab"));
            blockEast.dimension.playSound("use.stone", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:limestone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:limestone_bricks_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:limestone_bricks_double_slab"));
            blockEast.dimension.playSound("use.stone", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:limestone_slab") {
        if (itemUsed.typeId === "nicothekid:limestone_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:limestone_double_slab"));
            blockEast.dimension.playSound("use.stone", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:marble_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:marble_bricks_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:marble_bricks_double_slab"));
            blockEast.dimension.playSound("place.calcite", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:marble_slab") {
        if (itemUsed.typeId === "nicothekid:marble_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:marble_double_slab"));
            blockEast.dimension.playSound("place.calcite", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:mosshroom_slab") {
        if (itemUsed.typeId === "nicothekid:mosshroom_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:mosshroom_double_slab"));
            blockEast.dimension.playSound("step.nether_wood", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:mossy_slab") {
        if (itemUsed.typeId === "nicothekid:mossy_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:mossy_double_slab"));
            blockEast.dimension.playSound("use.wood", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:mud_soil_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:mud_soil_bricks_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:mud_soil_bricks_double_slab"));
            blockEast.dimension.playSound("use.stone", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:overgrown_jungle_slab") {
        if (itemUsed.typeId === "nicothekid:overgrown_jungle_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:overgrown_jungle_double_slab"));
            blockEast.dimension.playSound("use.wood", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:polished_calcite_slab") {
        if (itemUsed.typeId === "nicothekid:polished_calcite_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:polished_calcite_double_slab"));
            blockEast.dimension.playSound("place.calcite", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:polished_corrupted_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_corrupted_stone_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:polished_corrupted_stone_double_slab"));
            blockEast.dimension.playSound("use.basalt", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:polished_dripstone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_dripstone_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:polished_dripstone_double_slab"));
            blockEast.dimension.playSound("place.dripstone_block", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:polished_limestone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_limestone_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:polished_limestone_double_slab"));
            blockEast.dimension.playSound("use.stone", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:polished_marble_slab") {
        if (itemUsed.typeId === "nicothekid:polished_marble_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:polished_marble_double_slab"));
            blockEast.dimension.playSound("place.calcite", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:polished_soul_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_soul_stone_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:polished_soul_stone_double_slab"));
            blockEast.dimension.playSound("use.stone", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:polished_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_stone_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:polished_stone_double_slab"));
            blockEast.dimension.playSound("use.stone", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:rose_quartz_slab") {
        if (itemUsed.typeId === "nicothekid:rose_quartz_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:rose_quartz_double_slab"));
            blockEast.dimension.playSound("use.stone", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:smooth_rose_quartz_slab") {
        if (itemUsed.typeId === "nicothekid:smooth_rose_quartz_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:smooth_rose_quartz_double_slab"));
            blockEast.dimension.playSound("use.stone", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:soul_stone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:soul_stone_bricks_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:soul_stone_bricks_double_slab"));
            blockEast.dimension.playSound("use.stone", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockEast.typeId === "nicothekid:soul_stone_slab") {
        if (itemUsed.typeId === "nicothekid:soul_stone_slab") {
          system.run(() => {
            blockEast.setPermutation(BlockPermutation.resolve("nicothekid:soul_stone_double_slab"));
            blockEast.dimension.playSound("use.stone", blockEast.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
    }
    if (blockFacing === "North" && customSlab.includes(blockNorth.typeId)) {
      if (blockNorth.typeId === "nicothekid:andesite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:andesite_bricks_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:andesite_bricks_double_slab"));
            blockNorth.dimension.playSound("use.stone", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:corrupted_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_double_slab"));
            blockNorth.dimension.playSound("use.wood", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:corrupted_stone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_stone_bricks_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_stone_bricks_double_slab"));
            blockNorth.dimension.playSound("use.basalt", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:corrupted_stone_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_stone_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_stone_double_slab"));
            blockNorth.dimension.playSound("use.basalt", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:diorite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:diorite_bricks_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:diorite_bricks_double_slab"));
            blockNorth.dimension.playSound("use.stone", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:granite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:granite_bricks_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:granite_bricks_double_slab"));
            blockNorth.dimension.playSound("use.stone", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:limestone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:limestone_bricks_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:limestone_bricks_double_slab"));
            blockNorth.dimension.playSound("use.stone", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:limestone_slab") {
        if (itemUsed.typeId === "nicothekid:limestone_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:limestone_double_slab"));
            blockNorth.dimension.playSound("use.stone", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:marble_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:marble_bricks_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:marble_bricks_double_slab"));
            blockNorth.dimension.playSound("place.calcite", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:marble_slab") {
        if (itemUsed.typeId === "nicothekid:marble_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:marble_double_slab"));
            blockNorth.dimension.playSound("place.calcite", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:mosshroom_slab") {
        if (itemUsed.typeId === "nicothekid:mosshroom_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:mosshroom_double_slab"));
            blockNorth.dimension.playSound("step.nether_wood", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:mossy_slab") {
        if (itemUsed.typeId === "nicothekid:mossy_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:mossy_double_slab"));
            blockNorth.dimension.playSound("use.wood", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:mud_soil_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:mud_soil_bricks_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:mud_soil_bricks_double_slab"));
            blockNorth.dimension.playSound("use.stone", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:overgrown_jungle_slab") {
        if (itemUsed.typeId === "nicothekid:overgrown_jungle_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:overgrown_jungle_double_slab"));
            blockNorth.dimension.playSound("use.wood", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:polished_calcite_slab") {
        if (itemUsed.typeId === "nicothekid:polished_calcite_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:polished_calcite_double_slab"));
            blockNorth.dimension.playSound("place.calcite", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:polished_corrupted_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_corrupted_stone_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:polished_corrupted_stone_double_slab"));
            blockNorth.dimension.playSound("use.basalt", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:polished_dripstone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_dripstone_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:polished_dripstone_double_slab"));
            blockNorth.dimension.playSound("place.dripstone_block", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:polished_limestone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_limestone_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:polished_limestone_double_slab"));
            blockNorth.dimension.playSound("use.stone", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:polished_marble_slab") {
        if (itemUsed.typeId === "nicothekid:polished_marble_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:polished_marble_double_slab"));
            blockNorth.dimension.playSound("place.calcite", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:polished_soul_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_soul_stone_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:polished_soul_stone_double_slab"));
            blockNorth.dimension.playSound("use.stone", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:polished_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_stone_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:polished_stone_double_slab"));
            blockNorth.dimension.playSound("use.stone", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:rose_quartz_slab") {
        if (itemUsed.typeId === "nicothekid:rose_quartz_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:rose_quartz_double_slab"));
            blockNorth.dimension.playSound("use.stone", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:smooth_rose_quartz_slab") {
        if (itemUsed.typeId === "nicothekid:smooth_rose_quartz_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:smooth_rose_quartz_double_slab"));
            blockNorth.dimension.playSound("use.stone", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:soul_stone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:soul_stone_bricks_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:soul_stone_bricks_double_slab"));
            blockNorth.dimension.playSound("use.stone", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockNorth.typeId === "nicothekid:soul_stone_slab") {
        if (itemUsed.typeId === "nicothekid:soul_stone_slab") {
          system.run(() => {
            blockNorth.setPermutation(BlockPermutation.resolve("nicothekid:soul_stone_double_slab"));
            blockNorth.dimension.playSound("use.stone", blockNorth.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
    }
    if (blockFacing === "West" && customSlab.includes(blockWest.typeId)) {
      if (blockWest.typeId === "nicothekid:andesite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:andesite_bricks_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:andesite_bricks_double_slab"));
            blockWest.dimension.playSound("use.stone", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:corrupted_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_double_slab"));
            blockWest.dimension.playSound("use.wood", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:corrupted_stone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_stone_bricks_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_stone_bricks_double_slab"));
            blockWest.dimension.playSound("use.basalt", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:corrupted_stone_slab") {
        if (itemUsed.typeId === "nicothekid:corrupted_stone_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:corrupted_stone_double_slab"));
            blockWest.dimension.playSound("use.basalt", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:diorite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:diorite_bricks_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:diorite_bricks_double_slab"));
            blockWest.dimension.playSound("use.stone", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:granite_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:granite_bricks_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:granite_bricks_double_slab"));
            blockWest.dimension.playSound("use.stone", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:limestone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:limestone_bricks_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:limestone_bricks_double_slab"));
            blockWest.dimension.playSound("use.stone", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:limestone_slab") {
        if (itemUsed.typeId === "nicothekid:limestone_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:limestone_double_slab"));
            blockWest.dimension.playSound("use.stone", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:marble_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:marble_bricks_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:marble_bricks_double_slab"));
            blockWest.dimension.playSound("place.calcite", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:marble_slab") {
        if (itemUsed.typeId === "nicothekid:marble_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:marble_double_slab"));
            blockWest.dimension.playSound("place.calcite", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:mosshroom_slab") {
        if (itemUsed.typeId === "nicothekid:mosshroom_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:mosshroom_double_slab"));
            blockWest.dimension.playSound("step.nether_wood", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:mossy_slab") {
        if (itemUsed.typeId === "nicothekid:mossy_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:mossy_double_slab"));
            blockWest.dimension.playSound("use.wood", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:mud_soil_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:mud_soil_bricks_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:mud_soil_bricks_double_slab"));
            blockWest.dimension.playSound("use.stone", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:overgrown_jungle_slab") {
        if (itemUsed.typeId === "nicothekid:overgrown_jungle_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:overgrown_jungle_double_slab"));
            blockWest.dimension.playSound("use.wood", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:polished_calcite_slab") {
        if (itemUsed.typeId === "nicothekid:polished_calcite_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:polished_calcite_double_slab"));
            blockWest.dimension.playSound("place.calcite", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:polished_corrupted_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_corrupted_stone_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:polished_corrupted_stone_double_slab"));
            blockWest.dimension.playSound("use.basalt", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:polished_dripstone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_dripstone_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:polished_dripstone_double_slab"));
            blockWest.dimension.playSound("place.dripstone_block", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:polished_limestone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_limestone_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:polished_limestone_double_slab"));
            blockWest.dimension.playSound("use.stone", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:polished_marble_slab") {
        if (itemUsed.typeId === "nicothekid:polished_marble_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:polished_marble_double_slab"));
            blockWest.dimension.playSound("place.calcite", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:polished_soul_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_soul_stone_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:polished_soul_stone_double_slab"));
            blockWest.dimension.playSound("use.stone", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:polished_stone_slab") {
        if (itemUsed.typeId === "nicothekid:polished_stone_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:polished_stone_double_slab"));
            blockWest.dimension.playSound("use.stone", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:rose_quartz_slab") {
        if (itemUsed.typeId === "nicothekid:rose_quartz_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:rose_quartz_double_slab"));
            blockWest.dimension.playSound("use.stone", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:smooth_rose_quartz_slab") {
        if (itemUsed.typeId === "nicothekid:smooth_rose_quartz_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:smooth_rose_quartz_double_slab"));
            blockWest.dimension.playSound("use.stone", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:soul_stone_bricks_slab") {
        if (itemUsed.typeId === "nicothekid:soul_stone_bricks_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:soul_stone_bricks_double_slab"));
            blockWest.dimension.playSound("use.stone", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
      if (blockWest.typeId === "nicothekid:soul_stone_slab") {
        if (itemUsed.typeId === "nicothekid:soul_stone_slab") {
          system.run(() => {
            blockWest.setPermutation(BlockPermutation.resolve("nicothekid:soul_stone_double_slab"));
            blockWest.dimension.playSound("use.stone", blockWest.location, { pitch: 0.8, volume: 1.0 });
            decreaseItem ();
            return;
          });
        }
        else return;
      }
    }
  }
  else return;
});