Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let luckypos: Position = null
- let mathact = 0
- let num1 = 0
- let num2 = 0
- let num3: string = ""
- let die1 = 0
- let die2 = 0
- let die3 = 0
- let tp = 0
- let items = [
- "honeycomb_block",
- "honey_block",
- "beehive",
- "bee_nest",
- "stickypistonarmcollision",
- "wither_rose",
- "light_block",
- "lit_blast_furnace",
- "composter",
- "wood",
- "jigsaw",
- "lava_cauldron",
- "item.campfire",
- "lantern",
- "sweet_berry_bush",
- "bell",
- "loom",
- "barrel",
- "smithing_table",
- "fletching_table",
- "cartography_table",
- "lit_smoker",
- "smoker",
- "stonecutter_block",
- "blast_furnace",
- "grindstone",
- "lectern",
- "darkoak_wall_sign",
- "darkoak_standing_sign",
- "acacia_wall_sign",
- "acacia_standing_sign",
- "jungle_wall_sign",
- "jungle_standing_sign",
- "birch_wall_sign",
- "birch_standing_sign",
- "smooth_quartz_stairs",
- "red_nether_brick_stairs",
- "smooth_stone",
- "spruce_wall_sign",
- "spruce_standing_sign",
- "normal_stone_stairs",
- "mossy_cobblestone_stairs",
- "end_brick_stairs",
- "smooth_sandstone_stairs",
- "smooth_red_sandstone_stairs",
- "mossy_stone_brick_stairs",
- "polished_andesite_stairs",
- "polished_diorite_stairs",
- "polished_granite_stairs",
- "andesite_stairs",
- "diorite_stairs",
- "granite_stairs",
- "real_double_stone_slab4",
- "real_double_stone_slab3",
- "double_stone_slab4",
- "scaffolding",
- "bamboo_sapling",
- "bamboo",
- "double_stone_slab3",
- "barrier",
- "bubble_column",
- "turtle_egg",
- "conduit",
- "sea_pickle",
- "carved_pumpkin",
- "spruce_pressure_plate",
- "jungle_pressure_plate",
- "dark_oak_pressure_plate",
- "birch_pressure_plate",
- "acacia_pressure_plate",
- "spruce_trapdoor",
- "jungle_trapdoor",
- "dark_oak_trapdoor",
- "birch_trapdoor",
- "acacia_trapdoor",
- "spruce_button",
- "jungle_button",
- "dark_oak_button",
- "birch_button",
- "acacia_button",
- "dried_kelp_block",
- "item.kelp",
- "coral_fan_hang3",
- "coral_fan_hang2",
- "coral_fan_hang",
- "coral_fan_dead",
- "coral_fan",
- "coral_block",
- "coral",
- "seagrass",
- "blue_ice",
- "stripped_oak_log",
- "stripped_dark_oak_log",
- "stripped_acacia_log",
- "stripped_jungle_log",
- "stripped_birch_log",
- "stripped_spruce_log",
- "prismarine_bricks_stairs",
- "dark_prismarine_stairs",
- "prismarine_stairs",
- "stone",
- "grass",
- "dirt",
- "cobblestone",
- "planks",
- "sapling",
- "bedrock",
- "sand",
- "gravel",
- "gold_ore",
- "iron_ore",
- "coal_ore",
- "log",
- "leaves",
- "sponge",
- "glass",
- "lapis_ore",
- "lapis_block",
- "dispenser",
- "sandstone",
- "noteblock",
- "item.bed",
- "golden_rail",
- "detector_rail",
- "sticky_piston",
- "web",
- "tallgrass",
- "deadbush",
- "piston",
- "pistonarmcollision",
- "wool",
- "element_0",
- "yellow_flower",
- "red_flower",
- "brown_mushroom",
- "red_mushroom",
- "gold_block",
- "iron_block",
- "real_double_stone_slab",
- "double_stone_slab",
- "brick_block",
- "tnt",
- "bookshelf",
- "mossy_cobblestone",
- "obsidian",
- "torch",
- "fire",
- "mob_spawner",
- "oak_stairs",
- "chest",
- "redstone_wire",
- "diamond_ore",
- "diamond_block",
- "crafting_table",
- "item.wheat",
- "farmland",
- "furnace",
- "lit_furnace",
- "standing_sign",
- "item.wooden_door",
- "ladder",
- "rail",
- "stone_stairs",
- "wall_sign",
- "lever",
- "stone_pressure_plate",
- "item.iron_door",
- "wooden_pressure_plate",
- "redstone_ore",
- "lit_redstone_ore",
- "unlit_redstone_torch",
- "redstone_torch",
- "stone_button",
- "snow_layer",
- "ice",
- "snow",
- "cactus",
- "clay",
- "item.reeds",
- "jukebox",
- "fence",
- "pumpkin",
- "netherrack",
- "soul_sand",
- "glowstone",
- "lit_pumpkin",
- "item.cake",
- "unpowered_repeater",
- "powered_repeater",
- "invisiblebedrock",
- "trapdoor",
- "monster_egg",
- "stonebrick",
- "brown_mushroom_block",
- "red_mushroom_block",
- "iron_bars",
- "glass_pane",
- "melon_block",
- "pumpkin_stem",
- "melon_stem",
- "vine",
- "fence_gate",
- "brick_stairs",
- "stone_brick_stairs",
- "mycelium",
- "waterlily",
- "nether_brick",
- "nether_brick_fence",
- "nether_brick_stairs",
- "item.nether_wart",
- "enchanting_table",
- "brewingstandblock",
- "item.cauldron",
- "end_portal",
- "end_portal_frame",
- "end_stone",
- "dragon_egg",
- "redstone_lamp",
- "lit_redstone_lamp",
- "dropper",
- "activator_rail",
- "cocoa",
- "sandstone_stairs",
- "emerald_ore",
- "ender_chest",
- "tripwire_hook",
- "tripwire",
- "emerald_block",
- "spruce_stairs",
- "birch_stairs",
- "jungle_stairs",
- "command_block",
- "beacon",
- "cobblestone_wall",
- "item.flower_pot",
- "carrots",
- "potatoes",
- "wooden_button",
- "item.skull",
- "anvil",
- "trapped_chest",
- "light_weighted_pressure_plate",
- "heavy_weighted_pressure_plate",
- "unpowered_comparator",
- "powered_comparator",
- "daylight_detector",
- "redstone_block",
- "quartz_ore",
- "item.hopper",
- "quartz_block",
- "quartz_stairs",
- "double_wooden_slab",
- "wooden_slab",
- "stained_hardened_clay",
- "stained_glass_pane",
- "leaves2",
- "log2",
- "acacia_stairs",
- "dark_oak_stairs",
- "slime",
- "glow_stick",
- "iron_trapdoor",
- "prismarine",
- "sealantern",
- "hay_block",
- "carpet",
- "hardened_clay",
- "coal_block",
- "packed_ice",
- "double_plant",
- "standing_banner",
- "wall_banner",
- "daylight_detector_inverted",
- "red_sandstone",
- "red_sandstone_stairs",
- "real_double_stone_slab2",
- "double_stone_slab2",
- "spruce_fence_gate",
- "birch_fence_gate",
- "jungle_fence_gate",
- "dark_oak_fence_gate",
- "acacia_fence_gate",
- "repeating_command_block",
- "chain_command_block",
- "hard_glass_pane",
- "hard_stained_glass_pane",
- "chemical_heat",
- "item.spruce_door",
- "item.birch_door",
- "item.jungle_door",
- "item.acacia_door",
- "item.dark_oak_door",
- "grass_path",
- "item.frame",
- "chorus_flower",
- "purpur_block",
- "colored_torch_rg",
- "purpur_stairs",
- "colored_torch_bp",
- "undyed_shulker_box",
- "end_bricks",
- "frosted_ice",
- "end_rod",
- "end_gateway",
- "magma",
- "nether_wart_block",
- "red_nether_brick",
- "bone_block",
- "structure_void",
- "shulker_box",
- "purple_glazed_terracotta",
- "white_glazed_terracotta",
- "orange_glazed_terracotta",
- "magenta_glazed_terracotta",
- "light_blue_glazed_terracotta",
- "yellow_glazed_terracotta",
- "lime_glazed_terracotta",
- "pink_glazed_terracotta",
- "gray_glazed_terracotta",
- "silver_glazed_terracotta",
- "cyan_glazed_terracotta",
- "blue_glazed_terracotta",
- "brown_glazed_terracotta",
- "green_glazed_terracotta",
- "red_glazed_terracotta",
- "black_glazed_terracotta",
- "concrete",
- "concrete_powder",
- "chemistry_table",
- "underwater_torch",
- "chorus_plant",
- "stained_glass",
- "podzol",
- "beetroot",
- "stonecutter",
- "observer",
- "structure_block",
- "hard_glass",
- "hard_stained_glass",
- "iron_shovel",
- "iron_pickaxe",
- "iron_axe",
- "flint_and_steel",
- "apple",
- "bow",
- "arrow",
- "coal",
- "diamond",
- "iron_ingot",
- "gold_ingot",
- "iron_sword",
- "wooden_sword",
- "wooden_shovel",
- "wooden_pickaxe",
- "wooden_axe",
- "stone_sword",
- "stone_shovel",
- "stone_pickaxe",
- "stone_axe",
- "diamond_sword",
- "diamond_shovel",
- "diamond_pickaxe",
- "diamond_axe",
- "stick",
- "bowl",
- "mushroom_stew",
- "golden_sword",
- "golden_shovel",
- "golden_pickaxe",
- "golden_axe",
- "string",
- "feather",
- "gunpowder",
- "wooden_hoe",
- "stone_hoe",
- "iron_hoe",
- "diamond_hoe",
- "golden_hoe",
- "wheat_seeds",
- "wheat",
- "bread",
- "leather_helmet",
- "leather_chestplate",
- "leather_leggings",
- "leather_boots",
- "chainmail_helmet",
- "chainmail_chestplate",
- "chainmail_leggings",
- "chainmail_boots",
- "iron_helmet",
- "iron_chestplate",
- "iron_leggings",
- "iron_boots",
- "diamond_helmet",
- "diamond_chestplate",
- "diamond_leggings",
- "diamond_boots",
- "golden_helmet",
- "golden_chestplate",
- "golden_leggings",
- "golden_boots",
- "flint",
- "porkchop",
- "cooked_porkchop",
- "painting",
- "golden_apple",
- "sign",
- "wooden_door",
- "bucket",
- "minecart",
- "saddle",
- "iron_door",
- "redstone",
- "snowball",
- "boat",
- "leather",
- "kelp",
- "brick",
- "clay_ball",
- "paper",
- "book",
- "slime_ball",
- "chest_minecart",
- "egg",
- "compass",
- "fishing_rod",
- "clock",
- "glowstone_dust",
- "fish",
- "cooked_fish",
- "dye",
- "bone",
- "sugar",
- "cake",
- "bed",
- "repeater",
- "cookie",
- "map",
- "shears",
- "melon",
- "pumpkin_seeds",
- "melon_seeds",
- "beef",
- "cooked_beef",
- "chicken",
- "cooked_chicken",
- "rotten_flesh",
- "ender_pearl",
- "blaze_rod",
- "ghast_tear",
- "gold_nugget",
- "nether_wart",
- "potion",
- "glass_bottle",
- "spider_eye",
- "fermented_spider_eye",
- "blaze_powder",
- "magma_cream",
- "brewing_stand",
- "cauldron",
- "ender_eye",
- "spawn_egg",
- "experience_bottle",
- "fireball",
- "writable_book",
- "written_book",
- "emerald",
- "frame",
- "flower_pot",
- "carrot",
- "potato",
- "baked_potato",
- "poisonous_potato",
- "emptymap",
- "golden_carrot",
- "skull",
- "carrotonastick",
- "netherstar",
- "pumpkin_pie",
- "fireworks",
- "fireworkscharge",
- "enchanted_book",
- "comparator",
- "netherbrick",
- "quartz",
- "tnt_minecart",
- "hopper_minecart",
- "prismarine_shard",
- "hopper",
- "rabbit",
- "cooked_rabbit",
- "rabbit_stew",
- "rabbit_foot",
- "rabbit_hide",
- "horsearmorleather",
- "horsearmoriron",
- "horsearmorgold",
- "horsearmordiamond",
- "lead",
- "name_tag",
- "prismarine_crystals",
- "muttonraw",
- "muttoncooked",
- "armor_stand",
- "end_crystal",
- "spruce_door",
- "birch_door",
- "jungle_door",
- "acacia_door",
- "dark_oak_door",
- "chorus_fruit",
- "chorus_fruit_popped",
- "banner_pattern",
- "dragon_breath",
- "splash_potion",
- "lingering_potion",
- "command_block_minecart",
- "elytra",
- "shulker_shell",
- "banner",
- "totem",
- "iron_nugget",
- "trident",
- "beetroot",
- "beetroot_seeds",
- "beetroot_soup",
- "salmon",
- "clownfish",
- "pufferfish",
- "cooked_salmon",
- "dried_kelp",
- "nautilus_shell",
- "appleenchanted",
- "heart_of_the_sea",
- "turtle_shell_piece",
- "turtle_helmet",
- "phantom_membrane",
- "crossbow",
- "spruce_sign",
- "birch_sign",
- "jungle_sign",
- "acacia_sign",
- "darkoak_sign",
- "sweet_berries",
- "compound",
- "record_13",
- "record_cat",
- "record_blocks",
- "record_chirp",
- "record_far",
- "record_mall",
- "record_mellohi",
- "record_stal",
- "record_strad",
- "record_ward",
- "record_11",
- "record_wait",
- "shield",
- "campfire",
- "suspicious_stew",
- "honeycomb",
- "honey_bottle",
- ]
- let potions = [
- "absorption",
- "bad_omen",
- "blindness",
- "conduit_power",
- "fatal_poison",
- "fire_resistance",
- "haste",
- "health_boost",
- "hunger",
- "instant_damage",
- "instant_health",
- "invisibility",
- "jump_boost",
- "levitation",
- "mining_fatigue",
- "nausea",
- "night_vision",
- "poison",
- "regeneration",
- "resistance",
- "saturation",
- "slow_falling",
- "slowness",
- "speed",
- "strength",
- "village_hero",
- "water_breathing",
- "weakness",
- "wither"
- ]
- function chat(str:string) {
- player.execute('tellraw @a {"rawtext":[{"text":"'+str+'"}]}')
- }
- player.onDied(function () {
- if (die1 == 1) {
- die2 = 1
- chat("§4§llmao rip")
- }
- if (die3 == 1) {
- die3 = 2
- }
- })
- function quickmath() {
- num1 = Math.randomRange(0, 19)
- num2 = Math.randomRange(0, 9)
- num3 = (num1 + num2).toString()
- let num4 = 0
- chat("§3§lWhat is " + num1 + " + " + num2 + "?")
- mathact = 1
- player.onChat(num3, function () {
- if (mathact == 1) {
- num4 = 1
- }
- })
- loops.pause(4000)
- mathact = 0
- num1 = 0
- num2 = 0
- num3 = ""
- if (num4 != 1) {
- return false
- } else {
- return true
- }
- }
- function Bob() {
- let kek = 0
- mobs.onMobKilled(ZOMBIE, function () {
- if (kek == 0) {
- kek = 1
- chat("§2§lGood child.")
- let boof = Math.randomRange(0,3)
- if (boof == 0) {
- player.execute("give @s diamond_helmet")
- } else if (boof == 1) {
- player.execute("give @s diamond_chestplate")
- } else if (boof == 2) {
- player.execute("give @s diamond_leggings")
- } else if (boof == 3) {
- player.execute("give @s diamond_boots")
- }
- }
- })
- loops.pause(5000)
- if (kek != 1) {
- kek = 1
- chat("§4§l>:(")
- player.execute("kill @e[name=Bob]")
- for(let i = 0; i < 35; i++) {
- player.execute("summon arrow ~ ~1 ~")
- }
- }
- }
- function buildHouse(poss:Position) {
- function fill(block:Block,pos1:Position,pos2:Position) {
- blocks.fill(block, poss.add(pos1), poss.add(pos2))
- }
- fill(LOG_OAK, pos(0,0,0), pos(0,2,0))
- fill(OAK_WOOD_SLAB, pos(0,3,0), pos(0,3,0))
- fill(LOG_OAK, pos(7,0,0), pos(7,2,0))
- fill(OAK_WOOD_SLAB, pos(7,3,0), pos(7,3,0))
- fill(LOG_OAK, pos(0,0,-8), pos(0,2,-8))
- fill(OAK_WOOD_SLAB, pos(0,3,-8), pos(0,3,-8))
- fill(LOG_OAK, pos(7,0,-8), pos(7,2,-8))
- fill(OAK_WOOD_SLAB, pos(7,3,-8), pos(7,3,-8))
- fill(PLANKS_OAK, pos(1,0,-1), pos(6,3,-7))
- fill(AIR, pos(2,0,-2), pos(5,2,-6))
- fill(GLASS_PANE, pos(1,1,-1), pos(2,1,-1))
- fill(GLASS_PANE, pos(1,1,-1), pos(1,1,-3))
- fill(GLASS_PANE, pos(1,1,-5), pos(1,1,-6))
- fill(GLASS_PANE, pos(5,1,-1), pos(6,1,-1))
- fill(GLASS_PANE, pos(6,1,-1), pos(6,1,-3))
- fill(GLASS_PANE, pos(6,1,-5), pos(6,1,-6))
- fill(GLASS_PANE, pos(3,1,-7), pos(4,1,-7))
- fill(OAK_WOOD_SLAB, pos(0,3,0), pos(7,3,-8))
- fill(PLANKS_OAK, pos(1,3,-1), pos(6,3,-7))
- fill(OAK_WOOD_SLAB, pos(2,4,-2), pos(5,4,-6))
- fill(PLANKS_OAK, pos(1,-1,-1), pos(6,-1,-7))
- player.execute("fill "+poss.add(pos(3,0,-1))+" "+poss.add(pos(3,0,-1))+" wooden_door 3")
- player.execute("fill "+poss.add(pos(4,0,-1))+" "+poss.add(pos(4,0,-1))+" wooden_door 3")
- }
- function numberchose() {
- let numm = Math.randomRange(1, 3)
- let numm2 = numm.toString()
- let kek = 0
- player.onChat(numm2, function () {
- kek = 1
- })
- player.onChat("*", function () {
- })
- loops.pause(4000)
- if (kek == 1) {
- chat("§2§lCorrect!")
- player.execute("give @s appleenchanted 3")
- player.execute("give @s golden_apple 15")
- player.execute("give @s cooked_beef 32")
- } else {
- chat("§4§lIncorrect!")
- let poss = player.position()
- blocks.fill(AIR, poss.add(pos(-1,-3,-1)), poss.add(pos(1,1,1)))
- player.execute("effect @s mining_fatigue 30 255 true")
- player.execute("effect @s slowness 30 255 true")
- blocks.fill(ANVIL, poss.add(pos(-1,40*4,-1)), poss.add(pos(1,40*4,1)))
- }
- return
- }
- function want_diamonds() {
- chat("§3§lWould you like some diamonds? Reply with §aYes§3 or §cNo§3.")
- let kek = 0
- let yes = 0
- player.onChat("yes", function () {
- if (kek == 0) {
- yes = 1
- kek = 1
- }
- })
- player.onChat("no", function () {
- if (kek == 0) {
- kek = 1
- }
- })
- loops.pause(6000)
- if (kek != 1) {
- chat("§4§lHOW DARE YOU IGNORE ME!")
- for(let i = 0; i < 8; i++) {
- mobs.spawn(LIGHTNING_BOLT, pos(0,0,0))
- }
- } else {
- let yess = Math.randomRange(0, 1)
- if (yess == 1) {
- if (yes == 0) {
- chat("§2§lI don't care, you will receive diamonds whether you like it or not!")
- player.execute("give @s diamond 2")
- return
- } else {
- chat("§2§lAlrighty, here's some diamonds for you!")
- player.execute("give @s diamond 6")
- return
- }
- } else {
- if (yes == 0) {
- chat("§4§lOk then, no diamonds for you.")
- return
- } else {
- chat("§4§lWell too bad! No diamonds for you!")
- return
- }
- }
- }
- return
- }
- //15) Player chooses a number between 1 and 200, computer chooses a number between 1 and 4
- // if the outcome is 1:
- // The player is teleported that many amount of blocks away
- // (computer selects a random number between 0-player selected amount,
- // subtract player selected amount by random number,
- // teleport the player those two numbers away, x and z axis.)
- // chat("§4§lOops!§r§c You've been teleported §l"+x+"§r§c blocks away.")
- // if the outcome is 2:
- // The player will be given a random potion effect for that many seconds
- // chat("§3§lYou've been given §f"+potion_effect+"§3 for §f"+x"§3 seconds")
- // if the outcome is 3:
- // The player will recieve that amount of a random item.
- // chat("§2§lYou recieved §f"+x+" §c"+selected_item+"s")
- // if the outcome is 4:
- // Be given or taken away that amount of xp.
- function choose_num() {
- chat("§d§lChoose a number between 1-200")
- chat("§d§lSay §f;choose §7(number of your choice) [host only]")
- let kek = 0
- player.onChat(";choose", function (num1:number) {
- if (kek == 0) {
- kek = 1
- if (num1 < 0) {
- num1 = 0
- } else if (num1 > 200) {
- num1 = 200
- }
- let ran = Math.randomRange(1, 4)
- if (ran == 1) {
- let ran2 = Math.randomRange(0, num1)
- let num2 = num1-ran2
- let ran3 = Math.randomRange(0,1)
- let ran4 = Math.randomRange(0,1)
- if (ran3 == 0) {
- ran2 = ran2 * -1
- }
- if (ran4 == 0) {
- num2 = num2 * -1
- }
- player.teleport(positions.groundPosition(pos(ran2,100,num2)))
- chat("§3§lYou've been teleported §f"+num1.toString()+"§3 blocks away.")
- } else if (ran == 2) {
- let ran2 = Math.randomRange(0, potions.length)
- player.execute("effect @s "+potions[ran2]+" "+num1.toString())
- chat("§3§lYou've been effected with §f"+potions[ran2]+"§3 for §f"+num1.toString()+"§3 seconds.")
- } else if (ran == 3) {
- let ran2 = Math.randomRange(0, items.length)
- player.execute("give @s "+items[ran2]+" "+num1.toString())
- chat("§2§lYou've been given §f"+num1.toString()+" §a"+items[ran2]+"(s)")
- } else if (ran == 4) {
- let ran2 = Math.randomRange(0, 1)
- if (ran2 == 0) {
- player.execute("xp "+num1.toString()+" @s")
- chat("§2§lYou've recieved §a"+num1.toString()+"§2 experience!")
- } else {
- player.execute("xp -"+num1.toString()+" @s")
- chat("§4§lYou've lost §c"+num1.toString()+"§4 experience!")
- }
- }
- }
- })
- return
- }
- function luckyblock(x: Position) {
- luckypos = null
- let num = Math.randomRange(0, 40);
- if (num == 0) {
- chat("§4§lAw man.")
- mobs.spawn(CREEPER, x)
- mobs.spawn(LIGHTNING_BOLT, x)
- } else if (num == 1) {
- chat("§2§lYour Iron is now legal.")
- for (let i = 0; i < 2; i++) {
- let num2 = Math.randomRange(-5, 5)
- let num3 = Math.randomRange(-5, 5)
- let poss = positions.groundPosition(x.add(pos(num2, 90, num3)))
- mobs.spawn(LIGHTNING_BOLT, poss)
- blocks.place(IRON_BLOCK, poss)
- }
- } else if (num == 2) {
- chat("§3§lYou get NOTHING.")
- } else if (num == 3) {
- let val = quickmath()
- if (val == true) {
- chat("§2§lYou are correct!")
- player.execute("give @s diamond 2")
- } else {
- chat("§4§lYou are incorrect!")
- mobs.spawn(LIGHTNING_BOLT, player.position())
- }
- } else if (num == 4) {
- chat("§3§lClear an empty space in your hotbar.")
- loops.pause(6000);
- player.execute("give @s bucket 1 2")
- player.execute("teleport @s ~ ~100 ~")
- chat("§3§lLAND IT!")
- die1 = 1
- loops.pause(4000);
- if (die2 == 0) {
- chat("§2§lNice!")
- player.execute("give @s Gold_Block 3")
- }
- die2 = 0
- die1 = 0
- } else if (num == 5) {
- chat("§3§lBoing boing time!")
- loops.pause(1000)
- chat("§d§lYeet!")
- blocks.place(SLIME_BLOCK, player.position().add(pos(0,-1,0)))
- player.execute("effect @s levitation 1 255")
- } else if (num == 6) {
- chat("§4§lNightmare.")
- player.execute("effect @s blindness 25 255 true")
- player.execute("playsound ambient.weather.lightning.impact @s ~ ~ ~ 5 0.4")
- player.execute("/playsound block.bell.hit @s ~ ~ ~ 5 0.2")
- for(let i = 0; i < 13; i++) {
- let num1 = Math.randomRange(-6, 6)
- let num2 = Math.randomRange(-6, 6)
- player.execute("summon silverfish ~"+num1+" ~ ~"+num2+" minecraft:entity_spawned Smol_Boi")
- player.execute("effect @e[name=Smol_Boi] speed 9999 5 true")
- }
- } else if (num == 7) {
- player.execute("/summon zombie ~2 ~ ~ minecraft:as_adult Bob")
- player.execute("effect @e[name=Bob] slowness 9000 255 true")
- player.execute("effect @e[name=Bob] fire_resistance 9000 255 true")
- player.execute("effect @e[name=Bob] weakness 9000 255 true")
- chat("§3§lKill Bob.")
- Bob();
- } else if (num == 8) {
- chat("§4§lOHNO")
- for(let i = 0; i < 6; i++) {
- player.execute("/summon zombie ~ ~3 ~ minecraft:as_baby BabyZombie")
- player.execute("effect @e[name=BabyZombie] speed 9999 3 true")
- player.execute("effect @e[name=BabyZombie] fire_resistance 9999 1 true")
- }
- } else if (num == 9) {
- chat("§2§lOWO")
- mobs.spawn(LIGHTNING_BOLT, x)
- blocks.place(DIAMOND_BLOCK, x)
- } else if (num == 10) {
- for(let i = 0; i < 3; i++) {
- let kek = Math.randomRange(0,1)
- let x = Math.randomRange(-250, 250)
- let z = Math.randomRange(-250, 250)
- let poss = positions.groundPosition(pos(x,130,z).toWorld())
- if (kek == 0) {
- blocks.place(DIAMOND_BLOCK, poss)
- mobs.spawn(LIGHTNING_BOLT, poss)
- chat("§11 §9§lDIAMOND BLOCK§r§1 placed at: §9§l("+poss+")")
- } else {
- blocks.place(GOLD_BLOCK, poss)
- mobs.spawn(LIGHTNING_BOLT, poss)
- chat("§e1 §6§lGOLD BLOCK§r§e placed at: §6§l("+poss+")")
- }
- }
- } else if (num == 11) {
- chat("§3§lTime travels by faster..")
- loops.runInBackground(function () {
- for(let i = 0; i < 300; i++) {
- loops.pause(100)
- player.execute("time add 20")
- }
- })
- } else if (num == 12) {
- chat("§2§lTame it.")
- mobs.spawn(WOLF, x)
- player.execute("give @s bone 10")
- } else if (num == 13) {
- chat("§8§lCoal!")
- for(let xx = 0; xx < 3; xx++) {
- for(let zz = 0; zz < 3; zz++) {
- let xx1 = xx - 1
- let zz1 = zz - 1
- let poss = positions.groundPosition(x.add(pos(xx1,90,zz1)))
- mobs.spawn(SPLASH_POTION, poss)
- blocks.place(COAL_BLOCK, poss.add(pos(0,-1,0)))
- }
- }
- } else if (num == 14) {
- chat("§3§lPut items in the chest. You have §f5§3 seconds.")
- blocks.place(CHEST, x)
- loops.pause(5000)
- let random = Math.randomRange(0,2)
- if (random == 0) {
- let xx = Math.randomRange(-250, 250)
- let zz = Math.randomRange(-250, 250)
- let poss = positions.groundPosition(pos(xx,130,zz))
- mobs.spawn(LIGHTNING_BOLT, poss)
- blocks.clone(x, x, poss, CloneMask.Replace, CloneMode.Normal)
- blocks.place(AIR,x)
- chat("§4§lUnlucky!§r§c Your chest was transported to §l("+poss+").")
- } else {
- let poss = positions.groundPosition(x.add(pos(2,130,0)))
- blocks.clone(x, x, poss, CloneMask.Replace, CloneMode.Normal)
- chat("§2§lLucky!§r§a Your items have been duplicated!")
- }
- } else if (num == 15) {
- chat("§4§lLol")
- let xx = Math.randomRange(-3000, 3000)
- let zz = Math.randomRange(-3000, 3000)
- let poss = pos(xx,0,zz)
- player.execute("execute @s "+x.toString()+" execute @p ~ ~ ~ effect @s slow_falling 5 1")
- player.execute("execute @s "+x.toString()+" execute @p ~ ~ ~ tp @s "+poss)
- let newposs = player.position()
- loops.pause(1500)
- newposs = positions.groundPosition(newposs.add(pos(0,90,0)))
- player.execute("execute @s "+x.toString()+" execute @p ~ ~ ~ tp @s "+newposs)
- } else if (num == 16) {
- chat("§2§lA house?")
- buildHouse(x)
- } else if (num == 17) {
- chat("§3§lChoose a number between 1 and 3.")
- numberchose();
- } else if (num == 18) {
- player.execute("enchant @s silk_touch")
- chat("§2§lSmooth..")
- } else if (num == 19) {
- chat("§4§lWARNING: YOUR INVENTORY WILL BE CLEARED IN 6 SECONDS!")
- loops.pause(6000)
- let num = Math.randomRange(0, 3)
- if (num == 0) {
- player.execute("clear @s")
- chat("§4§lYour items have been removed")
- } else {
- chat("§3§lLmao just kidding, pick your stuff back up you dumb.")
- }
- } else if (num == 20) {
- chat("§c§lE§6X§eP§aE§bR§9I§dE§6N§eC§aE")
- for(let xx = 0; xx < 5; xx++) {
- for(let zz = 0; zz < 5; zz++) {
- let xx1 = xx - 2
- let zz1 = zz - 2
- let poss = x.add(pos(xx1,6,zz1))
- mobs.spawn(XP_BOTTLE, poss)
- }
- }
- } else if (num == 21) {
- let pos1 = x.add(pos(0,4,0))
- //player.execute("fill "+pos1+" "+pos1+" lava 0")
- blocks.place(LOG_OAK, x.add(pos(0,38,0)))
- blocks.place(FIRE, x.add(pos(0,39,0)))
- chat("§6§lIT'S RABBIT SEASON")
- player.execute("summon rabbit "+x.add(pos(0,40,0))+" minecraft:entity_spawned robbot")
- player.execute("effect @e[name=robbot] slowness 9999 255 true")
- for(let i = 0; i < 5; i++) {
- player.execute("execute @e[name=robbot] ~ ~ ~ summon rabbit "+x.add(pos(0,40,0))+" minecraft:entity_spawned robbot")
- player.execute("effect @e[name=robbot] slowness 9999 255 true")
- }
- blocks.place(AIR, x.add(pos(0,38,0)))
- } else if (num == 22) {
- player.execute("enchant @s efficiency 2")
- chat("§2§lSpeed!")
- } else if (num == 23) {
- player.execute("enchant @s mending")
- chat("§2§lMending!")
- } else if (num == 24) {
- chat("§6§lL O N G§2 sugar.")
- let poss = positions.groundPosition(x).add(pos(0,-1,0))
- blocks.place(WATER,poss)
- let poss2 = positions.groundPosition(x.add(pos(1,200,0)))
- for(let i = 0; i < 64; i++) {
- poss2 = positions.groundPosition(x.add(pos(1,200,0))).add(pos(0,i,0))
- blocks.place(SUGAR_CANE,poss2)
- }
- } else if (num == 25) {
- chat("§2§lMAGIC FLOATING BOOK!")
- blocks.place(ENCHANTMENT_TABLE,x)
- blocks.fill(BOOKSHELF, x.add(pos(-2,0,0)), x.add(pos(-2,1,0)))
- blocks.fill(BOOKSHELF, x.add(pos(-2,0,-2)), x.add(pos(-2,1,-2)))
- blocks.fill(BOOKSHELF, x.add(pos(-2,0,2)), x.add(pos(-2,1,2)))
- blocks.fill(BOOKSHELF, x.add(pos(0,0,-2)), x.add(pos(0,1,-2)))
- blocks.fill(BOOKSHELF, x.add(pos(0,0,2)), x.add(pos(0,1,2)))
- blocks.fill(BOOKSHELF, x.add(pos(2,0,-2)), x.add(pos(2,1,-2)))
- blocks.fill(BOOKSHELF, x.add(pos(2,0,0)), x.add(pos(2,1,0)))
- blocks.fill(BOOKSHELF, x.add(pos(-2,0,0)), x.add(pos(-2,1,0)))
- blocks.fill(BOOKSHELF, x.add(pos(2,0,2)), x.add(pos(2,1,2)))
- } else if (num == 26) {
- player.execute("enchant @s unbreaking 2")
- chat("§2§lYour pickaxe got hard..")
- } else if (num == 27) {
- chat("§c§lLUCKY!")
- die3 = 1
- for(let i = 0; i < 30; i++) {
- if (die3 != 2) {
- let ranpos = positions.groundPosition(randpos(pos(-5,90,-5), pos(5,90,5)))
- let mathh = Math.randomRange(1, 100)
- if (mathh >= 1 && mathh <= 50) {
- mobs.spawn(LIGHTNING_BOLT, ranpos)
- blocks.place(COAL_BLOCK, ranpos)
- } else if (mathh > 50 && mathh <= 75) {
- mobs.spawn(LIGHTNING_BOLT, ranpos)
- blocks.place(IRON_BLOCK, ranpos)
- } else if (mathh > 75 && mathh <= 90) {
- mobs.spawn(LIGHTNING_BOLT, ranpos)
- blocks.place(GOLD_BLOCK, ranpos)
- } else if (mathh > 90 && mathh <= 97) {
- mobs.spawn(LIGHTNING_BOLT, ranpos)
- blocks.place(EMERALD_BLOCK, ranpos)
- } else if (mathh > 97 && mathh <= 100) {
- mobs.spawn(LIGHTNING_BOLT, ranpos)
- blocks.place(DIAMOND_BLOCK, ranpos)
- }
- } else {
- die3 = 0
- break
- }
- }
- } else if (num == 28) {
- chat("§2You are §l§cS P E E D.")
- player.execute("give @s horsearmordiamond")
- player.execute("give @s saddle")
- player.execute('summon horse '+x+' minecraft:on_tame "Lucky Horse"')
- player.execute('effect @e[name="Lucky Horse"] speed 999999 4 true')
- player.execute('effect @e[name="Lucky Horse"] jump_boost 999999 3 true')
- } else if (num == 29) {
- blocks.place(SAND,x)
- blocks.place(DEAD_BUSH,x.add(pos(0,1,0)))
- chat("§3§lWhat a dry outcome.")
- } else if (num == 30) {
- player.execute("enchant @s fortune 3")
- chat("§2§lWhat a fortune!")
- } else if (num == 31) {
- let moth = Math.randomRange(1,100)
- if (moth > 0 && moth <= 80) {
- blocks.fill(GOLD_BLOCK, x.add(pos(-1,0,-1)), x.add(pos(1,0,1)))
- mobs.spawn(LIGHTNING_BOLT, x.add(pos(0,1,0)))
- blocks.place(BEACON,x.add(pos(0,1,0)))
- chat("§2§lowo")
- } else if (moth > 80 && moth < 95) {
- blocks.fill(GOLD_BLOCK, x.add(pos(-2,0,-2)), x.add(pos(2,0,2)))
- blocks.fill(GOLD_BLOCK, x.add(pos(-1,1,-1)), x.add(pos(1,1,1)))
- mobs.spawn(LIGHTNING_BOLT, x.add(pos(0,2,0)))
- blocks.place(BEACON,x.add(pos(0,2,0)))
- chat("§a§lOWO OWO OWO OWO OWO")
- } else if (moth >= 95 && moth <= 100) {
- blocks.fill(DIAMOND_BLOCK, x.add(pos(-1,0,-1)), x.add(pos(1,0,1)))
- mobs.spawn(LIGHTNING_BOLT, x.add(pos(0,1,0)))
- blocks.place(BEACON,x.add(pos(0,1,0)))
- chat("§9§lOWO")
- }
- } else if (num == 32) {
- loops.runInBackground(function () {
- chat("§4§lTorture chamber!")
- player.execute("effect @s slowness 3 255 true")
- let ps = player.position()
- blocks.fill(OBSIDIAN, ps.add(pos(-10,50,-10)), ps.add(pos(10,50,10)))
- blocks.fill(OBSIDIAN, ps.add(pos(2,0,1)), ps.add(pos(2,0,-1)))
- blocks.fill(OBSIDIAN, ps.add(pos(-2,0,1)), ps.add(pos(-2,0,-1)))
- blocks.fill(OBSIDIAN, ps.add(pos(1,0,2)), ps.add(pos(-1,0,2)))
- blocks.fill(OBSIDIAN, ps.add(pos(1,0,-2)), ps.add(pos(-1,0,-2)))
- blocks.fill(OBSIDIAN, ps.add(pos(-1,2,-1)), ps.add(pos(1,2,1)))
- blocks.fill(GLASS, ps.add(pos(2,1,1)), ps.add(pos(2,1,-1)))
- blocks.fill(GLASS, ps.add(pos(-2,1,1)), ps.add(pos(-2,1,-1)))
- blocks.fill(GLASS, ps.add(pos(1,1,2)), ps.add(pos(-1,1,2)))
- blocks.fill(GLASS, ps.add(pos(1,1,-2)), ps.add(pos(-1,1,-2)))
- for(let i = 0; i < 10; i++) {
- player.execute("summon cave_spider ~ ~ ~ minecraft:entity_spawned Cave")
- player.execute("effect @e[name=Cave] strength 9999 1 true")
- }
- loops.pause(10000)
- blocks.fill(AIR, ps.add(pos(-10,50,-10)), ps.add(pos(10,50,10)))
- blocks.fill(AIR, ps.add(pos(2,0,1)), ps.add(pos(2,0,-1)))
- blocks.fill(AIR, ps.add(pos(-2,0,1)), ps.add(pos(-2,0,-1)))
- blocks.fill(AIR, ps.add(pos(1,0,2)), ps.add(pos(-1,0,2)))
- blocks.fill(AIR, ps.add(pos(1,0,-2)), ps.add(pos(-1,0,-2)))
- blocks.fill(AIR, ps.add(pos(-1,2,-1)), ps.add(pos(1,2,1)))
- blocks.fill(AIR, ps.add(pos(2,1,1)), ps.add(pos(2,1,-1)))
- blocks.fill(AIR, ps.add(pos(-2,1,1)), ps.add(pos(-2,1,-1)))
- blocks.fill(AIR, ps.add(pos(1,1,2)), ps.add(pos(-1,1,2)))
- blocks.fill(AIR, ps.add(pos(1,1,-2)), ps.add(pos(-1,1,-2)))
- })
- } else if (num == 33) {
- loops.runInBackground(function () {
- want_diamonds()
- })
- } else if (num == 34) {
- chat("§4§lLet the world burn!")
- loops.runInBackground(function () {
- for(let i = 0; i < 80; i++) {
- let radposs = positions.groundPosition(randpos(x.add(pos(-250,90,-250)), x.add(pos(250,90,250))))
- blocks.place(NETHERRACK,radposs.add(pos(0,-1,0)))
- blocks.place(FIRE,radposs)
- }
- })
- } else if (num == 35) {
- player.execute("give @s dirt 2304")
- chat("§3§lEw.. you're all dirty")
- } else if (num == 36) {
- loops.runInBackground(function () {
- choose_num()
- })
- } else if (num == 37) {
- chat("§4§lHold your breath!")
- for(let i = 0; i < 20; i++) {
- blocks.fill(RED_SAND, pos(-1,5,-1), pos(1,5,1))
- }
- } else if (num == 38) {
- chat("§3§lSquidward!")
- for(let i = 0; i < 5; i++) {
- mobs.spawn(VILLAGER, x.add(pos(0,1,0)))
- }
- } else if (num == 39) {
- chat("§6§lDING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING DING")
- for(let xx = 0; xx < 5; xx++) {
- for(let zz = 0; zz < 5; zz++) {
- let xx1 = (xx - 2)*3
- let zz1 = (zz - 2)*3
- let poss = positions.groundPosition(x.add(pos(xx1,90,zz1)))
- player.execute("fill "+poss+" "+poss+" bell")
- }
- }
- } else if (num == 40) {
- chat("§2§l:)")
- player.execute("time set night")
- for(let i = 0; i < 15; i++) {
- mobs.spawn(PHANTOM, pos(0,15,0))
- }
- }
- }
- function placeLuckyBlock(poss:Position) {
- if (blocks.testForBlock(GOLD_BLOCK, poss.add(pos(0,-1,0)))) {
- chat("§a§lLucky block set at: §f§l("+poss.add(pos(0,-1,0)).toWorld().toString()+")")
- poss = poss.add(pos(0,-1,0)).toWorld()
- while (blocks.testForBlock(GOLD_BLOCK, poss)) {player.execute("execute @s "+poss.toString()+' kill @e[type=item,c=1,name="Block of Gold",rm=0,r=3]')}
- player.execute("execute @s "+poss.toString()+' kill @e[type=item,c=1,name="Block of Gold",rm=0,r=3]')
- luckyblock(poss)
- }
- }
- player.onItemInteracted(GOLDEN_SHOVEL, function() {
- for (let i = 0; i < 1; i++) {
- //let poss = randpos(pos(-20, 0, -20), pos(20, 0, 20))
- let poss = pos(0,-1,0)
- loops.runInBackground(function() {
- placeLuckyBlock(poss.add(pos(0,1,0)).toWorld())
- })
- }
- })
Add Comment
Please, Sign In to add comment