{
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "minecraft:player",
      "materials": {
        "default": "entity_alphatest",
        "cape": "entity_alphatest",
        "animated": "player_animated"
      },
      "textures": {
        "cape": "textures/entity/cape_invisible"
      },
      "geometry": {
        "default": "geometry.humanoid.custom",
        "arms": "geometry.weeweejuice.arms",
        "cape": "geometry.cape",
        "gun_locators": "geometry.weeweejuice.gun_locators"
      },
      "scripts": {
        "scale": "0.9375",
        "should_update_bones_and_effects_offscreen": true,
        "initialize": [
          "variable.is_holding_right = 0.0;",
          "variable.is_blinking = 0.0;",
          "variable.last_blink_time = 0.0;",
          "variable.hand_bob = 0.0;",

          "variable.wwj_bob = 0.0;"
        ],
        "pre_animation": [
          "variable.helmet_layer_visible = 1.0;",
          "variable.leg_layer_visible = 1.0;",
          "variable.boot_layer_visible = 1.0;",
          "variable.chest_layer_visible = 1.0;",
          "variable.attack_body_rot_y = Math.sin(360*Math.sqrt(variable.attack_time)) * 5.0;",
          "variable.tcos0 = (math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 57.3;",
          "variable.first_person_rotation_factor = math.sin((1 - variable.attack_time) * 180.0);",
          "variable.hand_bob = query.life_time <0.01 ? 0.0 : variable.hand_bob + ((query.is_on_ground && query.is_alive ? math.clamp(math.sqrt(math.pow(query.position_delta(0), 2.0) + math.pow(query.position_delta(2), 2.0)), 0.0, 0.1) : 0.0) - variable.hand_bob) * 0.02;",
          "variable.map_angle = math.clamp(1 - variable.player_x_rotation / 45.1, 0.0, 1.0);",
          "variable.item_use_normalized = query.main_hand_item_use_duration / query.main_hand_item_max_duration;",


          
          "variable.expOriginal = query.player_level;",
          "variable.exp         = query.player_level;",
          "v.rotYOriginal = (Math.round(query.rider_head_y_rotation(0)*32/45) - 1);",
          "v.rotY         = (Math.round(query.rider_head_y_rotation(0)*32/45) - 1);",


          "v.max_pow = 8;",
          "v.is_animating          = (v.exp - (Math.pow(2,14)         -1) > 0) ? 1 : 0;",
					"v.is_animating_test     = (v.exp - (Math.pow(2,14)         -1) > 0) ? (v.exp = v.exp - Math.pow(2,14         )) : 0;",
          //skip 2^13

          "v.bob_toggle_int        = (v.rotY > 0) ? 1 : 0;",
					"v.bob_toggle_int_test   = (v.rotY > 0) ? (v.rotY = v.rotY - 1) : 0;",
          "v.shotgun_cont_int      = (v.exp - (Math.pow(2,v.max_pow-1)-1) > 0) ? 1*v.is_animating : 0;",
					"v.shotgun_cont_int_test = (v.exp - (Math.pow(2,v.max_pow-1)-1) > 0) ? (v.exp = v.exp - Math.pow(2,v.max_pow-1)) : 0;",
          "v.magazine_int          = (v.exp - (Math.pow(2,v.max_pow-2)-1) > 0) ? 1*v.is_animating : 0;",
					"v.magazine_int_test     = (v.exp - (Math.pow(2,v.max_pow-2)-1) > 0) ? (v.exp = v.exp - Math.pow(2,v.max_pow-2)) : 0;",
					"v.reloading_int         = (v.exp - (Math.pow(2,v.max_pow-3)-1) > 0) ? 1*v.is_animating : 0;",
					"v.reloading_int_test    = (v.exp - (Math.pow(2,v.max_pow-3)-1) > 0) ? (v.exp = v.exp - Math.pow(2,v.max_pow-3)) : 0;",
					"v.slide_int             = (v.exp - (Math.pow(2,v.max_pow-4)-1) > 0) ? 1*v.is_animating : 0;",
					"v.slide_int_test        = (v.exp - (Math.pow(2,v.max_pow-4)-1) > 0) ? (v.exp = v.exp - Math.pow(2,v.max_pow-4)) : 0;",
					"v.recoil3_int           = (v.exp - (Math.pow(2,v.max_pow-5)-1) > 0) ? 1*v.is_animating : 0;",
					"v.recoil3_int_test      = (v.exp - (Math.pow(2,v.max_pow-5)-1) > 0) ? (v.exp = v.exp - Math.pow(2,v.max_pow-5)) : 0;",
					"v.recoil2_int           = (v.exp - (Math.pow(2,v.max_pow-6)-1) > 0) ? 1*v.is_animating : 0;",
					"v.recoil2_int_test      = (v.exp - (Math.pow(2,v.max_pow-6)-1) > 0) ? (v.exp = v.exp - Math.pow(2,v.max_pow-6)) : 0;",
					"v.recoil1_int           = (v.exp - (Math.pow(2,v.max_pow-7)-1) > 0) ? 1*v.is_animating : 0;",
					"v.recoil1_int_test      = (v.exp - (Math.pow(2,v.max_pow-7)-1) > 0) ? (v.exp = v.exp - Math.pow(2,v.max_pow-7)) : 0;",
					"v.shooting_int          = (v.exp - (Math.pow(2,v.max_pow-8)-1) > 0) ? 1*v.is_animating : 0;",
					"v.shooting_int_test     = (v.exp - (Math.pow(2,v.max_pow-8)-1) > 0) ? (v.exp = v.exp - Math.pow(2,v.max_pow-8)) : 0;",
          
          "variable.recoil = v.recoil1_int*Math.pow(2,0) + v.recoil2_int*Math.pow(2,1) + v.recoil3_int*Math.pow(2,2);",
          "variable.bob_toggle_int_actual = v.bob_toggle_int;",

          

          //for gun hand bob animation
          "variable.wwj_bob = (q.is_on_ground && query.ground_speed > 0.2) ? (v.wwj_bob == 20 ? 20 : v.wwj_bob + 1) : (v.wwj_bob == 0 ? 0 : v.wwj_bob - 1);",
          "variable.bob_decay = Math.pow(v.wwj_bob/20,2);",

          "variable.r = 0.55;",
          "variable.a = 2;",
          //"variable.x_axis_mult = (v.a*q.modified_move_speed)/(v.r*v.gliding_speed_value);",
          "variable.x_axis = math.cos(query.modified_distance_moved * 28.5) * (v.r/v.a) * v.bob_decay * v.bob_toggle_int_actual;",
          "variable.x_clamp = Math.clamp(v.x_axis,-v.r/v.a,v.r/v.a);",
          "variable.y_axis = Math.sqrt(Math.clamp(Math.pow(v.r,2)-Math.pow((v.x_axis*v.a),2),0,v.r))+v.r;",
          "variable.y_extra = v.x_clamp != v.x_axis ? (Math.abs(v.x_axis)-(v.r/v.a))*2 : 0;",
          //



          "variable.is_holding_weapon = query.equipped_item_any_tag('slot.weapon.mainhand', 'yes:gun_weapon', 'yes:rpg7_weapon', 'yes:javelin_weapon');",


          "variable.ak47_hold = query.equipped_item_any_tag('slot.weapon.mainhand', 'yes:gun_weapon') && !query.is_sneaking && variable.shooting_int == 0;",
          "variable.ak47_hipfire = query.equipped_item_any_tag('slot.weapon.mainhand', 'yes:gun_weapon') && !query.is_sneaking && variable.shooting_int > 0;",
          "variable.ak47_ads = (query.equipped_item_any_tag('slot.weapon.mainhand', 'yes:gun_weapon') || query.equipped_item_any_tag('slot.weapon.mainhand', 'yes:javelin_weapon')) && query.is_sneaking;",

          "variable.holding_smg = query.equipped_item_any_tag('slot.weapon.mainhand', 'yes:smg');",
          "variable.holding_pistol = query.equipped_item_any_tag('slot.weapon.mainhand', 'yes:pistol');",
          "variable.holding_sniper = query.equipped_item_any_tag('slot.weapon.mainhand', 'yes:sniper');",
          "variable.holding_shotgun = query.equipped_item_any_tag('slot.weapon.mainhand', 'yes:shotgun');",
          "variable.holding_dmr = query.equipped_item_any_tag('slot.weapon.mainhand', 'yes:dmr');",

          "variable.holding_shotgun_last = query.equipped_item_any_tag('slot.weapon.mainhand', 'yes:shotgun_last');",
          "variable.holding_explosive_weapon = query.equipped_item_any_tag('slot.weapon.mainhand', 'yes:explosive_weapon');",
          "variable.holding_rpg = query.equipped_item_any_tag('slot.weapon.mainhand', 'yes:rpg7_weapon');",
          "variable.holding_javelin = query.equipped_item_any_tag('slot.weapon.mainhand', 'yes:javelin_weapon');",

          "variable.score = query.scoreboard('pls_work');",
          "variable.score2 = query.scoreboard('pls_work2');",
          "variable.score3 = query.scoreboard('pls_work3');",



					"variable.b = -0.01;",
					"variable.recoil_active = 1;",
					"variable.recoilExp = (1-v.b)*Math.pow((v.b/(v.b-1)),q.anim_time)+v.b;",
					"variable.stop_animation = 1;",

          "variable.holding_ak47 = query.is_item_name_any('slot.weapon.mainhand', 'yes:ak47', 'yes:empty_ak47');",
          "variable.holding_ar15 = query.is_item_name_any('slot.weapon.mainhand', 'yes:ar15', 'yes:empty_ar15');",
          "variable.holding_mk13 = query.is_item_name_any('slot.weapon.mainhand', 'yes:mk13', 'yes:empty_mk13');",
          "variable.holding_hk417 = query.is_item_name_any('slot.weapon.mainhand', 'yes:hk417', 'yes:empty_hk417');",
          "variable.holding_ump45 = query.is_item_name_any('slot.weapon.mainhand', 'yes:ump45', 'yes:empty_ump45');",
          "variable.x_add = v.holding_ak47 ? 0 : v.holding_ar15 ? -0.78 : v.holding_mk13 ? -1.98 : v.holding_hk417 ? 0 : v.holding_ump45 ? 1.15  : 0;",
          "variable.y_add = v.holding_ak47 ? 0 : v.holding_ar15 ? 0.92  : v.holding_mk13 ? 1.30  : v.holding_hk417 ? 0 : v.holding_ump45 ? -0.57 : 0;",
          "variable.z_add = v.holding_ak47 ? 0 : v.holding_ar15 ? 1.33  : v.holding_mk13 ? -0.23 : v.holding_hk417 ? 0 : v.holding_ump45 ? 0.60  : 0;",

          "variable.reload_anim_mult = v.holding_ak47 ? 1 : v.holding_ar15 ? 1.3333 : v.holding_mk13 ? 0.6666 : v.holding_hk417 ? 0.8 : v.holding_ump45 ? 1.6666 : 1;"

          
        ],
        "animate": [
          "root",
          "weeweejuice_guns"
        ]
      },
      "particle_effects": {
          "muzzle_flash": "yes:muzzle_flash",
          "muzzle_blast": "yes:muzzle_blast",
          "bullet_casing": "yes:bullet_casing",
          "sniper_bullet_casing": "yes:sniper_bullet_casing",
          "shotgun_casing": "yes:shotgun_casing",

          "breech_flash": "yes:breech_flash",
          "rpg_smoke": "yes:rpg_smoke",
          "rpg_blast": "yes:rpg_blast",
          "rpg_blast2": "yes:rpg_blast2"
      },
      "sound_effects": {
        "ak47_shoot": "gun.yes.ak47_shoot",
        "ak47_reload": "gun.yes.ak47_reload",
        "ar15_shoot": "gun.yes.ar15_shoot",
        "ar15_reload": "gun.yes.ar15_reload",
        "hk417_shoot": "gun.yes.hk417_shoot",
        "hk417_reload": "gun.yes.hk417_reload",
        "p90_shoot": "gun.yes.p90_shoot",
        "p90_reload": "gun.yes.p90_reload",
        "ump45_shoot": "gun.yes.ump45_shoot",
        "ump45_reload": "gun.yes.ump45_reload",
        "desert_eagle_shoot": "gun.yes.desert_eagle_shoot",
        "desert_eagle_reload": "gun.yes.desert_eagle_reload",
        "mk13_shoot": "gun.yes.mk13_shoot",
        "mk13_reload": "gun.yes.mk13_reload",
        "mk13_bolt": "gun.yes.mk13_bolt",
        "mk13_scope_in": "gun.yes.mk13_scope_in",
        "mk13_scope_out": "gun.yes.mk13_scope_out",
        "remington870_shoot": "gun.yes.remington870_shoot",
        "remington870_reload": "gun.yes.remington870_reload",
        "remington870_pump": "gun.yes.remington870_pump",
        "rpg7_shoot": "gun.yes.rpg7_shoot",
        "rpg7_reload": "gun.yes.rpg7_reload"
      },
      "animations": {
        "root": "controller.animation.player.root",
        "base_controller": "controller.animation.player.base",
        "hudplayer": "controller.animation.player.hudplayer",
        "humanoid_base_pose": "animation.humanoid.base_pose",
        "look_at_target": "controller.animation.humanoid.look_at_target",
        "look_at_target_ui": "animation.player.look_at_target.ui",
        "look_at_target_default": "animation.humanoid.look_at_target.default",
        "look_at_target_gliding": "animation.humanoid.look_at_target.gliding",
        "look_at_target_swimming": "animation.humanoid.look_at_target.swimming",
        "look_at_target_inverted": "animation.player.look_at_target.inverted",
        "cape": "animation.player.cape",
        "move.arms": "animation.player.move.arms",
        "move.legs": "animation.player.move.legs",
        "swimming": "animation.player.swim",
        "swimming.legs": "animation.player.swim.legs",
        "riding.arms": "animation.player.riding.arms",
        "riding.legs": "animation.player.riding.legs",
        "holding": "animation.player.holding",
        "brandish_spear": "animation.humanoid.brandish_spear",
        "holding_spyglass": "animation.humanoid.holding_spyglass",
        "charging": "animation.humanoid.charging",
        "attack.positions": "animation.player.attack.positions",
        "attack.rotations": "animation.player.attack.rotations",
        "sneaking": "animation.player.sneaking",
        "bob": "animation.player.bob",
        "damage_nearby_mobs": "animation.humanoid.damage_nearby_mobs",
        "bow_and_arrow": "animation.humanoid.bow_and_arrow",
        "use_item_progress": "animation.humanoid.use_item_progress",
        "skeleton_attack": "animation.skeleton.attack",
        "sleeping": "animation.player.sleeping",
        "first_person_base_pose": "animation.player.first_person.base_pose",
        "first_person_empty_hand": "animation.player.first_person.empty_hand",
        "first_person_swap_item": "animation.player.first_person.swap_item",
        "first_person_shield_block": "animation.player.first_person.shield_block",
        "first_person_attack_controller": "controller.animation.player.first_person_attack",
        "first_person_attack_rotation": "animation.player.first_person.attack_rotation",
        "first_person_vr_attack_rotation": "animation.player.first_person.vr_attack_rotation",
        "first_person_walk": "animation.player.first_person.walk",
        "first_person_map_controller": "controller.animation.player.first_person_map",
        "first_person_map_hold": "animation.player.first_person.map_hold",
        "first_person_map_hold_attack": "animation.player.first_person.map_hold_attack",
        "first_person_map_hold_off_hand": "animation.player.first_person.map_hold_off_hand",
        "first_person_map_hold_main_hand": "animation.player.first_person.map_hold_main_hand",
        "first_person_crossbow_equipped": "animation.player.first_person.crossbow_equipped",
        "third_person_crossbow_equipped": "animation.player.crossbow_equipped",
        "third_person_bow_equipped": "animation.player.bow_equipped",
        "crossbow_hold": "animation.player.crossbow_hold",
        "crossbow_controller": "controller.animation.player.crossbow",
        "shield_block_main_hand": "animation.player.shield_block_main_hand",
        "shield_block_off_hand": "animation.player.shield_block_off_hand",
        "blink": "controller.animation.persona.blink",

        
        //"ak47_aim_first_person": "animation.ak47_hold_third_person"
        "weeweejuice_guns": "controller.animation.player.guns",

        "weapon_hold_crouch_normalize": "animation.crouch_normalize",
        "weapon_hold_crouch_normalize_back": "animation.crouch_normalize_back",
        "weapon_hold_crouch_normalize_cont": "animation.crouch_normalize_cont",
        "weapon_hold_first_person": "animation.weapon_hold_first_person",

        "ak47_hold_normalize": "animation.ak47_hold_normalize",
        "ak47_hold": "animation.ak47_hold",
        "ak47_hipfire_back_normalize": "animation.ak47_hipfire_back_normalize",
        "ak47_hipfire_back": "animation.ak47_hipfire_back",
        "ak47_ads_back_normalize": "animation.ak47_ads_back_normalize",
        "ak47_ads_back": "animation.ak47_ads_back",

        "ak47_hipfire_normalize": "animation.ak47_hipfire_normalize",
        "ak47_hipfire": "animation.ak47_hipfire",
        "ak47_hipfire_hold_normalize": "animation.ak47_hipfire_hold_normalize",
        "ak47_hipfire_hold": "animation.ak47_hipfire_hold",
        "ak47_ads_to_hipfire_normalize": "animation.ak47_ads_to_hipfire_normalize",
        "ak47_ads_to_hipfire": "animation.ak47_ads_to_hipfire",

        "ak47_ads_normalize": "animation.ak47_ads_normalize",
        "ak47_ads": "animation.ak47_ads",
        "ak47_hipfire_to_ads_normalize": "animation.ak47_hipfire_to_ads_normalize",
        "ak47_hipfire_to_ads": "animation.ak47_hipfire_to_ads",

        "ak47_hold_to_reload_normalize": "animation.ak47_hold_to_reload_normalize",
        "ak47_hold_to_reload": "animation.ak47_hold_to_reload",
        "ak47_hipfire_to_reload_normalize": "animation.ak47_hipfire_to_reload_normalize",
        "ak47_hipfire_to_reload": "animation.ak47_hipfire_to_reload",
        "ak47_ads_to_reload_normalize": "animation.ak47_ads_to_reload_normalize",
        "ak47_ads_to_reload": "animation.ak47_ads_to_reload",

        

        "ar15_hold_to_reload_normalize": "animation.ak47_hold_to_reload_normalize",
        "ar15_hold_to_reload": "animation.ak47_hold_to_reload",
        "ar15_hipfire_to_reload_normalize": "animation.ak47_hipfire_to_reload_normalize",
        "ar15_hipfire_to_reload": "animation.ak47_hipfire_to_reload",
        "ar15_ads_to_reload_normalize": "animation.ak47_ads_to_reload_normalize",
        "ar15_ads_to_reload": "animation.ak47_ads_to_reload",

        

        "p90_hold_to_reload_normalize": "animation.p90_hold_to_reload_normalize",
        "p90_hold_to_reload": "animation.p90_hold_to_reload",
        "p90_hipfire_to_reload_normalize": "animation.p90_hipfire_to_reload_normalize",
        "p90_hipfire_to_reload": "animation.p90_hipfire_to_reload",
        "p90_ads_to_reload_normalize": "animation.p90_ads_to_reload_normalize",
        "p90_ads_to_reload": "animation.p90_ads_to_reload",
        

        "desert_eagle_hold_to_reload_normalize": "animation.desert_eagle_hold_to_reload_normalize",
        "desert_eagle_hold_to_reload": "animation.desert_eagle_hold_to_reload",
        "desert_eagle_hipfire_to_reload_normalize": "animation.desert_eagle_hipfire_to_reload_normalize",
        "desert_eagle_hipfire_to_reload": "animation.desert_eagle_hipfire_to_reload",
        "desert_eagle_ads_to_reload_normalize": "animation.desert_eagle_ads_to_reload_normalize",
        "desert_eagle_ads_to_reload": "animation.desert_eagle_ads_to_reload",
        

        "mk13_hold_to_reload_normalize": "animation.mk13_hold_to_reload_normalize",
        "mk13_hold_to_reload": "animation.mk13_hold_to_reload",
        "mk13_hipfire_to_reload_normalize": "animation.mk13_hipfire_to_reload_normalize",
        "mk13_hipfire_to_reload": "animation.mk13_hipfire_to_reload",
        "mk13_ads_to_reload_normalize": "animation.mk13_ads_to_reload_normalize",
        "mk13_ads_to_reload": "animation.mk13_ads_to_reload",


      
        "remington870_hold_to_reload_normalize": "animation.remington870_hold_to_reload_normalize",
        "remington870_hold_to_reload": "animation.remington870_hold_to_reload",
        "remington870_hipfire_to_reload_normalize": "animation.remington870_hipfire_to_reload_normalize",
        "remington870_hipfire_to_reload": "animation.remington870_hipfire_to_reload",
        "remington870_ads_to_reload_normalize": "animation.remington870_ads_to_reload_normalize",
        "remington870_ads_to_reload": "animation.remington870_ads_to_reload",

        "remington870_hold_to_reload_last_normalize": "animation.remington870_hold_to_reload_last_normalize",
        "remington870_hold_to_reload_last": "animation.remington870_hold_to_reload_last",
        "remington870_hipfire_to_reload_last_normalize": "animation.remington870_hipfire_to_reload_last_normalize",
        "remington870_hipfire_to_reload_last": "animation.remington870_hipfire_to_reload_last",
        "remington870_ads_to_reload_last_normalize": "animation.remington870_ads_to_reload_last_normalize",
        "remington870_ads_to_reload_last": "animation.remington870_ads_to_reload_last",

        "remington870_reload_last_cont_normalize": "animation.remington870_reload_last_cont_normalize",
        "remington870_reload_last_cont": "animation.remington870_reload_last_cont",

        "rpg7_hipfire_to_reload_normalize": "animation.rpg7_hipfire_to_reload_normalize",
        "rpg7_hipfire_to_reload": "animation.rpg7_hipfire_to_reload",


        "ump45_hold_to_reload_normalize": "animation.ump45_hold_to_reload_normalize",
        "ump45_hold_to_reload": "animation.ump45_hold_to_reload",
        "ump45_hipfire_to_reload_normalize": "animation.ump45_hipfire_to_reload_normalize",
        "ump45_hipfire_to_reload": "animation.ump45_hipfire_to_reload",
        "ump45_ads_to_reload_normalize": "animation.ump45_ads_to_reload_normalize",
        "ump45_ads_to_reload": "animation.ump45_ads_to_reload",


        "hk417_hold_to_reload_normalize": "animation.hk417_hold_to_reload_normalize",
        "hk417_hold_to_reload": "animation.hk417_hold_to_reload",
        "hk417_hipfire_to_reload_normalize": "animation.hk417_hipfire_to_reload_normalize",
        "hk417_hipfire_to_reload": "animation.hk417_hipfire_to_reload",
        "hk417_ads_to_reload_normalize": "animation.hk417_ads_to_reload_normalize",
        "hk417_ads_to_reload": "animation.hk417_ads_to_reload",


        "javelin_hipfire_to_reload_normalize": "animation.javelin_hipfire_to_reload_normalize",
        "javelin_hipfire_to_reload": "animation.javelin_hipfire_to_reload",
        "javelin_ads_to_reload_normalize": "animation.javelin_ads_to_reload_normalize",
        "javelin_ads_to_reload": "animation.javelin_ads_to_reload",
        "animation.test_y1": "animation.player.test_y1",
        "test": "controller.animation.test_y1"
      },
      "render_controllers": [
        {
          "controller.render.player.first_person": "variable.is_first_person"
        },
        {
          "controller.render.player.third_person": "!variable.is_first_person && !variable.map_face_icon"
        },
        {
          "controller.render.player.map": "variable.map_face_icon"
        },
        {
          "controller.render.player.arms": "variable.is_holding_weapon && variable.is_first_person"
        },
        { "controller.render.player.gun_locators": "variable.is_holding_weapon" }
      ],
      "enable_attachables": true
    }
  }
}