Full View keybinds.lua

Preview File Updated: v1.2.5 - 13.02.2024

local Keys = {
    ["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, 
    ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40,
    ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["H"] = 74, ["K"] = 311, ["L"] = 182,
    ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81,
}

keybinds = {
    [1] = {},
    [2] = {},
    [3] = {},
    [4] = {},
    [5] = {},
    --[6] = {},
    -- If you want to add more keys to bind you can do it here but keep in mind that it will also require changes to the HTML and JS
}

CreateThread(function()
    while true do
        local sleep = 4
        if keybinds[1].key and Keys[keybinds[1].key] then 
            if IsControlJustPressed(0, Keys[keybinds[1].key]) then
                PlayAnimation(false, Animations[tonumber(keybinds[1].animId)])
            end
        end
        if keybinds[2].key and Keys[keybinds[2].key]then
            if IsControlJustPressed(0, Keys[keybinds[2].key]) then
                PlayAnimation(false, Animations[tonumber(keybinds[2].animId)])
            end
        end
        if keybinds[3].key and Keys[keybinds[3].key] then 
            if IsControlJustPressed(0, Keys[keybinds[3].key]) then
                PlayAnimation(false, Animations[tonumber(keybinds[3].animId)])
            end
        end
        if keybinds[4].key and Keys[keybinds[4].key]then
            if IsControlJustPressed(0, Keys[keybinds[4].key]) then
                PlayAnimation(false, Animations[tonumber(keybinds[4].animId)])
            end
        end
        if keybinds[5].key and Keys[keybinds[5].key] then
            if IsControlJustPressed(0, Keys[keybinds[5].key]) then
                PlayAnimation(false, Animations[tonumber(keybinds[5].animId)])
            end
        end
        --[[
        if keybinds[6].key and Keys[keybinds[6].key] then
            if IsControlJustPressed(0, Keys[keybinds[6].key]) then
                PlayAnimation(false, Animations[tonumber(keybinds[6].animId)])
            end
        end
        ]]
        if 
            not keybinds[1].key
            and not keybinds[2].key 
            and not keybinds[3].key 
            and not keybinds[4].key 
            and not keybinds[5].key 
            -- and not keybinds[6].key
        then
            sleep = 5000
        end
        Wait(sleep)
    end
end)

Last updated