Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- menu shit
- -- LIBS
- local box
- local wight_slider
- local high_slider
- local gap_slider
- local theme_combo
- local font_size
- local font_thickness
- local setup_done = false
- local function set_up_gui(x, y)
- if (not setup_done) then
- vis_main = gui.Reference('VISUALS', "MISC", "Assistance");
- box = gui.Groupbox(vis_main, "Indicator")
- wight_slider = gui.Slider(box, "wight_slider_indicator", "X Pos", 30, 10, x);
- high_slider = gui.Slider(box, "high_slider_indicator", "Y-Pos", 45, 30, y);
- gap_slider = gui.Slider(box, "gap_slider", "Gap", 25, 0, 100);
- theme_combo = gui.Combobox(box, 'Fonts_Indicator', " Font", "Verdana", "Arial", "Fixedsys");
- font_size = gui.Slider(box, "font_slider_indicator", "Font Size", 25, 0, 60);
- font_thickness = gui.Slider(box, "font_slider_indicator", "Font Size", 700, 100, 1000);
- setup_done = true
- end
- end
- local fonts = { "Verdana", "Arial", "Fixedsys" }
- local indicator_tabl = { {} };
- add = {}
- add.Indicator = function(text, r, g, b, a, status)
- if status then
- indicator_tabl[#indicator_tabl + 1] = { text, r, g, b, a };
- end
- end
- add.IndicatorForCheckbox = function(text, var, mode, status, r1, g1, b1, a1, r2, g2, b2, a2)
- local on
- if mode == 0 then
- on = true
- if gui.GetValue(var) then
- rf, gf, bf, af = r1, g1, b1, a1
- else
- rf, gf, bf, af = r2, g2, b2, a2
- end
- else
- if gui.GetValue(var) then
- on = true
- rf, gf, bf, af = r1, g1, b1, a1
- else
- on = false
- end
- end
- if status and on then
- indicator_tabl[#indicator_tabl + 1] = { text, rf, gf, bf, af };
- end
- end
- add.IndicatorForKeybox = function(text, var, mode, status, r1, g1, b1, a1, r2, g2, b2, a2)
- local on
- if entities.GetLocalPlayer() == nil or not entities.GetLocalPlayer():IsAlive() then
- return
- end
- if gui.GetValue(var) ~= 0 then
- if mode == 0 or mode == 3 then
- on = true
- if input.IsButtonDown(gui.GetValue(var)) then
- rf, gf, bf, af = r1, g1, b1, a1
- else
- rf, gf, bf, af = r2, g2, b2, a2
- end
- elseif mode == 1 then
- if input.IsButtonDown(gui.GetValue(var)) then
- rf, gf, bf, af = r1, g1, b1, a1
- on = true
- else
- on = false
- end
- elseif mode == 2 then
- on = true
- if input.IsButtonDown(gui.GetValue(var)) then
- rf, gf, bf, af = r1, g1, b1, a1
- else
- rf, gf, bf, af = r2, g2, b2, a2
- end
- elseif mode == 4 then
- on = false
- end
- elseif gui.GetValue(var) == 0 then
- if mode == 2 then
- rf, gf, bf, af = r2, g2, b2, a2
- on = true
- elseif mode == 3 then
- rf, gf, bf, af = r1, g1, b1, a1
- on = true
- elseif mode == 4 then
- rf, gf, bf, af = r1, g1, b1, a1
- on = true
- end
- end
- if on and status then
- indicator_tabl[#indicator_tabl + 1] = { text, rf, gf, bf, af };
- end
- end
- local function draw_Indicator()
- local sw, sh = draw.GetScreenSize();
- set_up_gui(sw, sh)
- if setup_done then
- top_text = sh - (gap_slider:GetValue() * #indicator_tabl) - high_slider:GetValue();
- draw.SetFont(draw.CreateFont(fonts[theme_combo:GetValue() + 1], math.floor(font_size:GetValue()), math.floor(font_thickness:GetValue())))
- for i = 1, #indicator_tabl do
- draw.Color(indicator_tabl[i][2], indicator_tabl[i][3], indicator_tabl[i][4], indicator_tabl[i][5]);
- draw.TextShadow(wight_slider:GetValue(), top_text + gap_slider:GetValue() * i, indicator_tabl[i][1]);
- end
- indicator_tabl = {};
- end
- end
- callbacks.Register("Draw", "draw_Indicator", draw_Indicator);
- -- refs
- print("cLua | Loaded")
- local mPlacement = gui.Reference("MISC", "AUTOMATION", "Other");
- -- checkboxes
- local cMenu = gui.Checkbox(mPlacement, "cluashow", "cLua", false);
- -- windows
- local cWindow = gui.Window("clua_menu", "cLua main", 1280, 740, 600, 600)
- local cDesyncgroup = gui.Groupbox(cWindow, "Desync", 20, 20, 200, 140)
- local cFixesGroup = gui.Groupbox(cWindow, "Fixes", 20, 200, 200, 100)
- local cKnifeGroup = gui.Groupbox(cWindow, "Knife/Zeus", 250, 20, 200, 72)
- -- actual features
- local me = entities.GetLocalPlayer()
- -- invert desync
- local invertKey = gui.Keybox(cDesyncgroup, "cluainvert_key", "Invert key", false)
- local desyncators = gui.Multibox(cDesyncgroup, "Indicators")
- local dArrows = gui.Checkbox(desyncators, "cluadesync_arrows", "arrows", false)
- local dText = gui.Checkbox(desyncators, "cluadesync_text", "text", false)
- --local tankCheckBox = gui.Checkbox(cluaInvertGroup, "cluadesync_tank", "Tank AA", false)
- local vleftDesync = 3;
- local vrightDesync = 2;
- local eleftDesync = 2;
- local erightDesync = 3;
- local activeSide = "null";
- local function inverter()
- if entities.GetLocalPlayer() ~= nil then
- if invertKey:GetValue() == 0 then return end
- if input.IsButtonPressed(invertKey:GetValue()) and not input.IsButtonDown(69) then
- if rightDesync == false then
- gui.SetValue("rbot_antiaim_stand_desync", vrightDesync);
- gui.SetValue("rbot_antiaim_move_desync", vrightDesync);
- rightDesync = not rightDesync;
- else
- gui.SetValue("rbot_antiaim_stand_desync", vleftDesync);
- gui.SetValue("rbot_antiaim_move_desync", vleftDesync);
- rightDesync = not rightDesync;
- end
- else if input.IsButtonPressed(invertKey:GetValue()) and input.IsButtonDown(69) then
- if rightDesync == false then
- gui.SetValue("rbot_antiaim_stand_desync", erightDesync);
- gui.SetValue("rbot_antiaim_move_desync", erightDesync);
- rightDesync = not rightDesync;
- else
- gui.SetValue("rbot_antiaim_stand_desync", eleftDesync);
- gui.SetValue("rbot_antiaim_move_desync", eleftDesync);
- rightDesync = not rightDesync;
- end
- end
- end
- end
- end
- callbacks.Register("Draw", "inverter", inverter)
- -- anti knife
- local antiknife_mode = 0;
- local antiknife_value = 7;
- local antiknifeEnabled = gui.Checkbox(cKnifeGroup, "cluaknife_antiknife", "Anti-Knife", false)
- local antiknife, antiknife_modeB, antiknife_valueB;
- antiknife_modeB = gui.GetValue("msc_fakelag_mode")
- antiknife_valueB = gui.GetValue("msc_fakelag_value")
- local function antiknifeE()
- if antiknifeEnabled:GetValue() and me ~= nil then
- if cMenu:IsActive() then
- antiknife_modeB = gui.GetValue("msc_fakelag_mode")
- antiknife_valueB = gui.GetValue("msc_fakelag_value")
- return
- end
- if input.IsButtonDown(69) then
- gui.SetValue("msc_fakelag_mode", antiknife_mode)
- gui.SetValue("msc_fakelag_value", antiknife_value)
- else
- gui.SetValue("msc_fakelag_mode", antiknife_modeB)
- gui.SetValue("msc_fakelag_value", antiknife_valueB)
- end
- end
- end
- callbacks.Register("Draw", "antiknifeE", antiknifeE)
- -- USE desync
- local desync_pitch, desync_yaw = 0;
- local desyncEnabled = gui.Checkbox(cDesyncgroup, "cluaknife_desync", "ON USE Desync", false)
- local desync_pitchS, desync_yawS, desync_pitchM, desync_yawM
- desync_pitchS = gui.GetValue("rbot_antiaim_stand_pitch_real")
- desync_yawS = gui.GetValue("rbot_antiaim_stand_real")
- desync_pitchM = gui.GetValue("rbot_antiaim_move_pitch_real")
- desync_yawM = gui.GetValue("rbot_antiaim_move_real")
- local function eDesync()
- if desyncEnabled:GetValue() and me ~= nil then
- if cMenu:IsActive() then
- desync_pitchS = gui.GetValue("rbot_antiaim_stand_pitch_real")
- desync_yawS = gui.GetValue("rbot_antiaim_stand_real")
- desync_pitchM = gui.GetValue("rbot_antiaim_move_pitch_real")
- desync_yawM = gui.GetValue("rbot_antiaim_move_real")
- return
- end
- if input.IsButtonDown(69) then
- gui.SetValue("rbot_antiaim_stand_pitch_real", desync_pitch)
- gui.SetValue("rbot_antiaim_stand_real",desync_yaw)
- gui.SetValue("rbot_antiaim_move_pitch_real", desync_pitch)
- gui.SetValue("rbot_antiaim_move_real", desync_yaw)
- else
- gui.SetValue("rbot_antiaim_stand_pitch_real", desync_pitchS)
- gui.SetValue("rbot_antiaim_stand_real", desync_yawS)
- gui.SetValue("rbot_antiaim_move_pitch_real", desync_pitchM)
- gui.SetValue("rbot_antiaim_move_real", desync_yawM)
- end
- end
- end
- callbacks.Register("Draw", "eDesync", eDesync)
- -- disable autostrafer on jump
- local straferDisabled = gui.Checkbox(cFixesGroup, "cluafixes_strafer", "Jumpshot anti-strafer", false)
- local function jumpStrafer()
- if gui.GetValue("cluafixes_strafer") == true then
- local velocity = vector.Length(entities.GetLocalPlayer():GetPropVector("localdata", "m_vecVelocity[0]")) -- Thanks to Tomeno!
- gui.SetValue("msc_autostrafer_enable", 0)
- if input.IsButtonDown(32) then
- local x,y,z = entities.GetLocalPlayer():GetPropVector("localdata", "m_vecVelocity[0]") -- Thanks to Tomeno & CloudFlare1337!
- local velocity = math.sqrt(x^2 + y^2)
- if velocity >= 5 then
- gui.SetValue("msc_autostrafer_enable", 1)
- else
- gui.SetValue("msc_autostrafer_enable", 0)
- end
- end
- end
- end
- callbacks.Register("CreateMove", jumpStrafer)
- -- indicators
- local function indicators()
- if entities.GetLocalPlayer() ~= nil then
- local x,y = draw.GetScreenSize()
- local textFont = draw.CreateFont('Verdana', 50, 700)
- draw.SetFont(textFont)
- if not rightDesync then
- add.IndicatorForCheckbox("DSIDE: LEFT","cluadesync_text",66, 135, 245, 255,0,0,0,0,1,true)
- if gui.GetValue("cluadesync_arrows") == true then
- draw.Color(66, 135, 245, 255)
- draw.Text(x/2 - x/16, y/2 - 25, "◄")
- draw.TextShadow(x/2 - x/16, y/2 - 25, "◄")
- draw.Color(255, 255, 255, 255)
- draw.Text(x/2 + x/21.4412955466, y/2 - 25, "►")
- draw.TextShadow(x/2 + x/21.4412955466, y/2 - 25, "►")
- end
- else if rightDesync then
- add.IndicatorForCheckbox("DSIDE: RIGHT","cluadesync_text",66, 135, 245, 255,0,0,0,0,1,true)
- if gui.GetValue("cluadesync_arrows") == true then
- draw.Color(255, 255, 255, 255)
- draw.Text(x/2 - x/16, y/2 - 25, "◄")
- draw.TextShadow(x/2 - x/16, y/2 - 25, "◄")
- draw.Color(66, 135, 245, 255)
- draw.Text(x/2 + x/21.4412955466, y/2 - 25, "►")
- draw.TextShadow(x/2 + x/21.4412955466, y/2 - 25, "►")
- end
- else
- add.IndicatorForCheckbox("DSIDE: OFF","cluadesync_text",66, 135, 245, 255,0,0,0,0,1,true)
- if gui.GetValue("cluadesync_arrows") == true then
- draw.Color(255, 255, 255, 255)
- draw.Text(x/2 - x/16, y/2 - 25, "◄")
- draw.TextShadow(x/2 - x/16, y/2 - 25, "◄")
- draw.Color(255, 255, 255, 255)
- draw.Text(x/2 + x/21.4412955466, y/2 - 25, "►")
- draw.TextShadow(x/2 + x/21.4412955466, y/2 - 25, "►")
- end
- end
- end
- end
- end
- callbacks.Register("Draw", "indicators", indicators)
- --[[
- FIXES FOR VARIOUS SHIT
- ]]--
- -- revolver fix | credits to adrianobessa5682 OR original author
- local revolverEnabled = gui.Checkbox(cFixesGroup, "cluafixes_revolver", "Revolver fix", false)
- local cnt = 0
- local cntmax = 15;
- local function revolverFix(cmd)
- gui.SetValue("rbot_revolver_autocock", 0)
- if revolverEnabled:GetValue() and me ~= nil then
- local wep = me:GetPropEntity("m_hActiveWeapon")
- if wep ~= nil and wep:GetWeaponID() == 64 then
- cnt = cnt + 1
- if cnt <= cntmax then
- cmd:SetButtons(cmd:GetButtons() | (1 << 0))
- else
- cnt = 0
- local m_flPostponeFireReadyTime = wep:GetPropFloat("m_flPostponeFireReadyTime")
- if m_flPostponeFireReadyTime > 0 and m_flPostponeFireReadyTime < globals.CurTime() then
- cmd:SetButtons(cmd:GetButtons() & ~(1 << 0))
- end
- end
- end
- end
- end
- callbacks.Register("CreateMove", revolverFix)
- -- fakeduck fix
- local fakeduckEnabled = gui.Checkbox(cFixesGroup, "cluafixes_fakeduck", "Fakeduck Fakelag", false)
- local fakeduckDisable = gui.Checkbox(cFixesGroup, "cluafixes_fakeduckdisable", "Fakeduck AA fix", false)
- local fakeduckKey = gui.GetValue("rbot_antiaim_fakeduck")
- local fakeducking = false
- local fakeduck_mode = 0;
- local fakeduck_value = 4;
- local fakeduck_valueB, fakeduck_modeB, desyncS, desyncM;
- function fakeduckFix()
- if entities.GetLocalPlayer() ~= nil then
- if fakeduckEnabled:GetValue() == true and fakeduckKey ~= nil then
- if input.IsButtonDown( fakeduckKey ) then
- if fakeducking == false then
- fakeduck_modeB = gui.GetValue("msc_fakelag_mode")
- fakeduck_valueB = gui.GetValue("msc_fakelag_value")
- desyncS = gui.GetValue("rbot_antiaim_stand_desync")
- desyncM = gui.GetValue("rbot_antiaim_move_desync")
- fakeducking = true;
- end
- if fakeduckDisable:GetValue() == true then
- gui.SetValue("rbot_antiaim_stand_desync", 0)
- gui.SetValue("rbot_antiaim_move_desync", 0)
- end
- gui.SetValue("msc_fakelag_mode", fakeduck_mode)
- gui.SetValue("msc_fakelag_value", fakeduck_value)
- else
- if fakeducking == true then
- gui.SetValue("msc_fakelag_mode", fakeduck_modeB)
- gui.SetValue("msc_fakelag_value", fakeduck_valueB)
- gui.SetValue("rbot_antiaim_stand_desync", desyncS)
- gui.SetValue("rbot_antiaim_move_desync", desyncM)
- fakeducking = false;
- end
- end
- end
- end
- end
- callbacks.Register("Draw", "fakeduckFix", fakeduckFix)
- -- menu hide
- local ogMenu = gui.Reference("MENU");
- local function hideMenu()
- if ogMenu:IsActive() then
- cActive = 1
- else
- cActive = 0
- end
- if (cMenu:GetValue()) then
- cWindow:SetActive(cActive);
- else
- cWindow:SetActive(0);
- end
- end
- callbacks.Register("Draw", "hideMenu", hideMenu)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement