bones = {
    [0] = { BoneId = '0', BoneName = "SKEL_ROOT", BoneHex = 0x0 },
    [2108] = { BoneId = '2108', BoneName = "SKEL_L_Toe0", BoneHex = 0x83C },
    [4089] = { BoneId = '4089', BoneName = "SKEL_L_Finger01", BoneHex = 0x3779 },
    [4090] = { BoneId = '4090', BoneName = "SKEL_L_Finger02", BoneHex = 0xCC4D },
    [4137] = { BoneId = '4137', BoneName = "SKEL_L_Finger31", BoneHex = 0x512D },
    [4138] = { BoneId = '4138', BoneName = "SKEL_L_Finger32", BoneHex = 0x512D },
    [4153] = { BoneId = '4153', BoneName = "SKEL_L_Finger41", BoneHex = 0x512D },
    [4154] = { BoneId = '4154', BoneName = "SKEL_L_Finger42", BoneHex = 0x512D },
    [4169] = { BoneId = '4169', BoneName = "SKEL_L_Finger11", BoneHex = 0x512D },
    [4170] = { BoneId = '4170', BoneName = "SKEL_L_Finger12", BoneHex = 0x512D },
    [4185] = { BoneId = '4185', BoneName = "SKEL_L_Finger21", BoneHex = 0x512D },
    [4186] = { BoneId = '4186', BoneName = "SKEL_L_Finger22", BoneHex = 0x512D },
    [10706] = { BoneId = '10706', BoneName = "SKEL_R_Clavicle", BoneHex = 0x29D2 },
    [11816] = { BoneId = '11816', BoneName = "SKEL_Pelvis", BoneHex = 0x2E28 },
    [14201] = { BoneId = '14201', BoneName = "SKEL_L_Foot", BoneHex = 0x3779 },
    [18905] = { BoneId = '18905', BoneName = "SKEL_L_Hand", BoneHex = 0x49D9 },
    [20781] = { BoneId = '20781', BoneName = "SKEL_R_Toe0", BoneHex = 0x512D },
    [23553] = { BoneId = '23553', BoneName = "SKEL_Spine0", BoneHex = 0x5C01 },
    [24816] = { BoneId = '24816', BoneName = "SKEL_Spine1", BoneHex = 0x60F0 },
    [24817] = { BoneId = '24817', BoneName = "SKEL_Spine2", BoneHex = 0x60F1 },
    [24818] = { BoneId = '24818', BoneName = "SKEL_Spine3", BoneHex = 0x60F2 },
    [26610] = { BoneId = '26610', BoneName = "SKEL_L_Finger00", BoneHex = 0x67F2 },
    [26611] = { BoneId = '26611', BoneName = "SKEL_L_Finger10", BoneHex = 0x67F3 },
    [26612] = { BoneId = '26612', BoneName = "SKEL_L_Finger20", BoneHex = 0x67F4 },
    [26613] = { BoneId = '26613', BoneName = "SKEL_L_Finger30", BoneHex = 0x67F5 },
    [26614] = { BoneId = '26614', BoneName = "SKEL_L_Finger40", BoneHex = 0x67F6 },
    [28252] = { BoneId = '28252', BoneName = "SKEL_R_Forearm", BoneHex = 0x6E5C },
    [31086] = { BoneId = '31086', BoneName = "SKEL_Head", BoneHex = 0x796E },
    [36864] = { BoneId = '36864', BoneName = "SKEL_R_Calf", BoneHex = 0xF9BB },
    [39317] = { BoneId = '39317', BoneName = "SKEL_Neck_1", BoneHex = 0x9995 },
    [40269] = { BoneId = '40269', BoneName = "SKEL_R_UpperArm", BoneHex = 0x9D4D },
    [45509] = { BoneId = '45509', BoneName = "SKEL_L_UpperArm", BoneHex = 0xB1C5 },
    [51826] = { BoneId = '51826', BoneName = "SKEL_R_Thigh", BoneHex = 0xE39F },
    [52301] = { BoneId = '52301', BoneName = "SKEL_R_Foot", BoneHex = 0xCC4D },
    [57005] = { BoneId = '57005', BoneName = "SKEL_R_Hand", BoneHex = 0xDEAD },
    [57597] = { BoneId = '57597', BoneName = "SKEL_Spine_Root", BoneHex = 0xE0FD },
    [58271] = { BoneId = '58271', BoneName = "SKEL_L_Thigh", BoneHex = 0xE39F },
    [58866] = { BoneId = '58866', BoneName = "SKEL_R_Finger00", BoneHex = 0xE5F2 },
    [58867] = { BoneId = '58867', BoneName = "SKEL_R_Finger10", BoneHex = 0xE5F3 },
    [58868] = { BoneId = '58868', BoneName = "SKEL_R_Finger20", BoneHex = 0xE5F4 },
    [58869] = { BoneId = '58869', BoneName = "SKEL_R_Finger30", BoneHex = 0xE5F5 },
    [58870] = { BoneId = '58870', BoneName = "SKEL_R_Finger40", BoneHex = 0xE5F6 },
    [61163] = { BoneId = '61163', BoneName = "SKEL_L_Forearm", BoneHex = 0xEEEB },
    [63931] = { BoneId = '63931', BoneName = "SKEL_L_Calf", BoneHex = 0xF9BB },
    [64016] = { BoneId = '64016', BoneName = "SKEL_R_Finger01", BoneHex = 0xFA10 },
    [64017] = { BoneId = '64017', BoneName = "SKEL_R_Finger02", BoneHex = 0xFA11 },
    [64064] = { BoneId = '64064', BoneName = "SKEL_R_Finger31", BoneHex = 0xFA40 },
    [64065] = { BoneId = '64065', BoneName = "SKEL_R_Finger32", BoneHex = 0xFA41 },
    [64080] = { BoneId = '64080', BoneName = "SKEL_R_Finger41", BoneHex = 0xFA50 },
    [64081] = { BoneId = '64081', BoneName = "SKEL_R_Finger42", BoneHex = 0xFA51 },
    [64096] = { BoneId = '64096', BoneName = "SKEL_R_Finger11", BoneHex = 0xFA60 },
    [64097] = { BoneId = '64097', BoneName = "SKEL_R_Finger12", BoneHex = 0xFA61 },
    [64112] = { BoneId = '64112', BoneName = "SKEL_R_Finger21", BoneHex = 0xFA70 },
    [64113] = { BoneId = '64113', BoneName = "SKEL_R_Finger22", BoneHex = 0xFA71 },
    [64729] = { BoneId = '64729', BoneName = "SKEL_L_Clavicle", BoneHex = 0xFCD9 },
    [1356] = { BoneId = '1356', BoneName = "FB_R_Brow_Out_000", BoneHex = 0xE3DB },
    [2992] = { BoneId = '2992', BoneName = "MH_R_Elbow", BoneHex = 0xB1C },
    [5232] = { BoneId = '5232', BoneName = "RB_L_ArmRoll", BoneHex = 0x1470 },
    [6286] = { BoneId = '6286', BoneName = "IK_R_Hand", BoneHex = 0x188E },
    [6442] = { BoneId = '6442', BoneName = "RB_R_ThighRoll", BoneHex = 0x192A },
    [11174] = { BoneId = '11174', BoneName = "FB_R_Lip_Corner_000", BoneHex = 0x2BA6 },
    [12844] = { BoneId = '12844', BoneName = "IK_Head", BoneHex = 0x322C },
    [16335] = { BoneId = '16335', BoneName = "MH_R_Knee", BoneHex = 0x3FCF },
    [17188] = { BoneId = '17188', BoneName = "FB_LowerLipRoot_000", BoneHex = 0x4324 },
    [17719] = { BoneId = '17719', BoneName = "FB_R_Lip_Top_000", BoneHex = 0x4537 },
    [19336] = { BoneId = '19336', BoneName = "FB_R_CheekBone_000", BoneHex = 0x4B88 },
    [20178] = { BoneId = '20178', BoneName = "FB_UpperLipRoot_000", BoneHex = 0x4ED2 },
    [20279] = { BoneId = '20279', BoneName = "FB_L_Lip_Top_000", BoneHex = 0x4F37 },
    [20623] = { BoneId = '20623', BoneName = "FB_LowerLip_000", BoneHex = 0x508F },
    [21550] = { BoneId = '21550', BoneName = "FB_L_CheekBone_000", BoneHex = 0x542E },
    [22711] = { BoneId = '22711', BoneName = "MH_L_Elbow", BoneHex = 0x58B7 },
    [23639] = { BoneId = '23639', BoneName = "RB_L_ThighRoll", BoneHex = 0x5C57 },
    [24806] = { BoneId = '24806', BoneName = "PH_R_Foot", BoneHex = 0x60E6 },
    [25260] = { BoneId = '25260', BoneName = "FB_L_Eye_000", BoneHex = 0x62AC },
    [27474] = { BoneId = '27474', BoneName = "FB_R_Eye_000", BoneHex = 0x6B52 },
    [28422] = { BoneId = '28422', BoneName = "PH_R_Hand", BoneHex = 0x6F06 },
    [29868] = { BoneId = '29868', BoneName = "FB_L_Lip_Corner_000", BoneHex = 0x74AC },
    [35502] = { BoneId = '35502', BoneName = "IK_R_Foot", BoneHex = 0x8AAE },
    [35731] = { BoneId = '35731', BoneName = "RB_Neck_1", BoneHex = 0x8B93 },
    [36029] = { BoneId = '36029', BoneName = "IK_L_Hand", BoneHex = 0x8CBD },
    [37119] = { BoneId = '37119', BoneName = "RB_R_ArmRoll", BoneHex = 0x90FF },
    [37193] = { BoneId = '37193', BoneName = "FB_Brow_Centre_000", BoneHex = 0x9149 },
    [43536] = { BoneId = '43536', BoneName = "FB_R_Lid_Upper_000", BoneHex = 0xAA10 },
    [43810] = { BoneId = '43810', BoneName = "RB_R_ForeArmRoll", BoneHex = 0xAB22 },
    [45750] = { BoneId = '45750', BoneName = "FB_L_Lid_Upper_000", BoneHex = 0xB2B6 },
    [46078] = { BoneId = '46078', BoneName = "MH_L_Knee", BoneHex = 0xB3FE },
    [46240] = { BoneId = '46240', BoneName = "FB_Jaw_000", BoneHex = 0xB4A0 },
    [47419] = { BoneId = '47419', BoneName = "FB_L_Lip_Bot_000", BoneHex = 0xB93B },
    [47495] = { BoneId = '47495', BoneName = "FB_Tongue_000", BoneHex = 0xB987 },
    [49979] = { BoneId = '49979', BoneName = "FB_R_Lip_Bot_000", BoneHex = 0xC33B },
    [56604] = { BoneId = '56604', BoneName = "IK_Root", BoneHex = 0xDD1C },
    [57717] = { BoneId = '57717', BoneName = "PH_L_Foot", BoneHex = 0xE175 },
    [58331] = { BoneId = '58331', BoneName = "FB_L_Brow_Out_000", BoneHex = 0xE3DB },
    [60309] = { BoneId = '60309', BoneName = "PH_L_Hand", BoneHex = 0xEB95 },
    [61007] = { BoneId = '61007', BoneName = "RB_L_ForeArmRoll", BoneHex = 0xEE4F },
    [61839] = { BoneId = '61839', BoneName = "FB_UpperLip_000", BoneHex = 0xF18F },
    [65068] = { BoneId = '65068', BoneName = "FACIAL_facialRoot", BoneHex = 0xFE2C },
    [65245] = { BoneId = '65245', BoneName = "IK_L_Foot", BoneHex = 0xFEDD }
}

function getBoneIdFromInput(input)
    local numericId = tonumber(input)
    if numericId then
        for _, bone in pairs(bones) do
            if tonumber(bone.BoneId) == numericId then
                return bone.BoneHex
            end
        end
    else
        for _, bone in pairs(bones) do
            if bone.BoneName == input then
                return bone.BoneHex
            end
        end
    end
end
