Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Pre-view: https://imgur.com/PRITP0c
- print("Loaded key_bind by Clyde 🍏")
- print("Loaded Keybind by Clyde | Fixed by Verieth")
- local mouseX, mouseY, x, y, dx, dy, w, h = 0, 0, 128, 290, 0, 0, 1, 50;
- local shouldDrag = false;
- local font = draw.CreateFont("Verdana", 12, 12);
- local topbarSize = 23;
- local imgRGBA, imgWidth, imgHeight = common.DecodePNG( svgData );
- local texture = draw.CreateTexture( imgRGBA, imgWidth, imgHeight );
- local render = {};
- render.outline = function( x, y, w, h, col )
- draw.Color( col[1], col[2], col[3], col[4] );
- draw.OutlinedRect( x, y, x + w, y + h );
- end
- render.rect = function( x, y, w, h, col )
- draw.Color( col[1], col[2], col[3], col[4] );
- end
- render.rect2 = function( x, y, w, h )
- draw.FilledRect( x, y, x + w, y + h );
- end
- render.gradient = function( x, y, w, h, col1, col2, is_vertical )
- render.rect( x, y, w, h, col1 );
- local r, g, b = col2[1], col2[2], col2[3];
- if is_vertical then
- for i = 1, h do
- local a = i / h * 255;
- render.rect( x, y + i, w, 1, { r, g, b, a } );
- end
- else
- for i = 1, w do
- local a = i / w * 255;
- render.rect( x + i, y, 1, h, { r, g, b, a } );
- end
- end
- end
- local function getKeybinds()
- local Keybinds = {};
- local i = 1;
- hLocalPlayer = entities.GetLocalPlayer();
- wid = hLocalPlayer:GetWeaponID()
- if gui.GetValue("rbot.master") and gui.GetValue("rbot.accuracy.attack.shared.fire") == '"Shift Fire"' then
- Keybinds[i] = ' On shot AA';
- i = i + 1;
- end
- if gui.GetValue("rbot.master") and cheat.IsFakeDucking() then
- Keybinds[i] = ' Fake Duck';
- i = i + 1;
- end
- if gui.GetValue("rbot.master") and gui.GetValue("rbot.accuracy.movement.slowkey") ~= 0 and input.IsButtonDown(gui.GetValue("rbot.accuracy.movement.slowkey")) then
- Keybinds[i] = ' Slowwalk';
- i = i + 1;
- end
- if gui.GetValue("esp.master") and gui.GetValue("esp.world.thirdperson") then
- Keybinds[i] = ' Thirdperson';
- i = i + 1;
- end
- if gui.GetValue("rbot.master") and gui.GetValue("rbot.accuracy.attack.shared.fire") == '"Defensive Warp Fire"'
- or ((wid == 1 or wid == 64) and gui.GetValue("rbot.accuracy.attack.hpistol.fire") == '"Defensive Warp Fire"') then
- Keybinds[i] = ' Double shot';
- i = i + 1;
- elseif gui.GetValue("rbot.master") and (wid == 2 or wid == 3 or wid == 4 or wid == 30 or wid == 32 or wid == 36 or wid == 61 or wid == 63) and gui.GetValue("rbot.accuracy.attack.pistol.fire") == '"Defensive Warp Fire"' then
- Keybinds[i] = ' Double shot';
- i = i + 1;
- elseif gui.GetValue("rbot.master") and (wid == 11 or wid == 38) and gui.GetValue("rbot.accuracy.attack.asniper.fire") == '"Defensive Warp Fire"' then
- Keybinds[i] = ' Double shot';
- i = i + 1;
- elseif gui.GetValue("rbot.master") and (wid == 40) and gui.GetValue("rbot.accuracy.attack.scout.fire") == '"Defensive Warp Fire"' then
- Keybinds[i] = ' Double shot';
- i = i + 1;
- elseif gui.GetValue("rbot.master") and (wid == 9) and gui.GetValue("rbot.accuracy.attack.sniper.fire") == '"Defensive Warp Fire"' then
- Keybinds[i] = ' Double shot';
- i = i + 1;
- end
- return Keybinds;
- end
- local function drawkeybinds(Keybinds)
- local temp = false;
- for index in pairs(Keybinds) do
- if (temp) then
- render.gradient( x+9, (y + topbarSize + 5) + (index * 15), 198, 1, { 13, 14, 15, 255 }, {40, 30, 30, 255 }, false );
- end
- temp=true;
- draw.SetFont(font);
- draw.Color(0, 0, 0, 200);
- draw.Text(x + 10, (y + topbarSize + 5) + (index * 15), Keybinds[index])
- draw.Text(x + 85, (y + topbarSize + 5) + (index * 15), " [ 👍 ] ")
- draw.SetFont(font);
- draw.Color(255, 255, 255, 255);
- draw.Text(x + 84, (y + topbarSize + 4) + (index * 15), " [ 👍 ] " )
- draw.Text(x + 9, (y + topbarSize + 4) + (index * 15), Keybinds [index])
- end
- end
- local function drawRectFill(r, g, b, a, x, y, w, h, texture)
- if (texture ~= nil) then
- draw.SetTexture(texture);
- else
- draw.SetTexture(texture);
- end
- draw.Color(r, g, b, a);
- draw.FilledRect(x, y, x + w, y + h);
- end
- local function dragFeature()
- if input.IsButtonDown(1) then
- mouseX, mouseY = input.GetMousePos();
- if shouldDrag then
- x = mouseX - dx;
- y = mouseY - dy;
- end
- if mouseX >= x and mouseX <= x + w and mouseY >= y and mouseY <= y + 40 then
- shouldDrag = true;
- dx = mouseX - x;
- dy = mouseY - y;
- end
- else
- shouldDrag = false;
- end
- end
- local function drawOutline(r, g, b, a, x, y, w, h, howMany)
- for i = 1, howMany do
- draw.Color(r, g, b, a);
- draw.OutlinedRect(x - i, y - i, x + w + i, y + h + i);
- end
- end
- local function drawWindow(Keybinds)
- local tW, _ = draw.GetTextSize(keytext);
- local h2 = 5 + (Keybinds * 15);
- local h = h + (Keybinds * 15);
- drawRectFill(164,93,145, 180, x + 7, y + 21, 121, 1);
- drawRectFill(164,93,145, 190, x + 7, y + 20, 121, 1);
- drawRectFill(0, 0, 0, 150, x + 7, y + 22, 121, 17);
- draw.Color(0, 0, 0, 255);
- draw.SetFont(font);
- local keytext = "⚔❤ keybinds ❤⚔";
- draw.Text(x + ((40 - tW) / 2), y + 26, keytext)
- draw.Color(255, 255, 255, 255);
- draw.SetFont(font);
- draw.Text(x + ((40 - tW) / 2), y + 26, keytext)
- draw.Color(255, 255, 255);
- draw.SetTexture( texture );
- end
- panorama.RunScript([[
- SteamOverlayAPI.OpenUrlInOverlayOrExternalBrowser("https://www.youtube.com/watch?v=19KC0QLbDqQ");
- ]])
- callbacks.Register("Draw", function()
- if keybindlist:GetValue() == false then return end
- if not entities.GetLocalPlayer() or not entities.GetLocalPlayer():IsAlive() then return end
- draw.SetTexture( texture );
- local Keybinds = getKeybinds();
- drawWindow(#Keybinds);
- drawkeybinds(Keybinds);
- dragFeature();
- end)
- function DrawUI()
- --colortop = gui. ColorPicker( gui.Reference("Misc","General","Extra") , "keycolor ", 255, 255, 255, 255 )
- keybindlist = gui.Checkbox(gui.Reference("Misc","General","Extra"),"keybindlist","Keybind", true);
- end
- DrawUI();
Advertisement
Add Comment
Please, Sign In to add comment