Mister_Stefan

Godstep Lua (60$)

Oct 19th, 2020
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.48 KB | None | 0 0
  1. local settingsLoaded = false;
  2. local ui = {};
  3. local references = {
  4.     aimware = gui.Reference("MENU"),
  5.     miscGeneral = gui.Reference("SETTINGS", "Miscellaneous");
  6. };
  7. local windowW, windowH = 523, 400;
  8. local luaName = "Godstep";
  9. local luaKey = 'lynx_' .. luaName:lower():gsub(" ", "_") .. '_';
  10.  
  11. local function addGuiComp(key, comp, group, ...)
  12.     ui[#ui + 1] = { luaKey .. key, _G['gui'][comp](group, luaKey .. key, ...) };
  13. end
  14.  
  15. local function getUIVar(key)
  16.     for i = 1, #ui do
  17.         local v = ui[i];
  18.         if (v[1] == luaKey .. key) then
  19.             return v[2]:GetValue();
  20.         end
  21.     end
  22. end
  23.  
  24. local function setUIVar(key, value)
  25.     for i = 1, #ui do
  26.         local v = ui[i];
  27.         if (v[1] == luaKey .. key) then
  28.             return v[2]:SetValue(value);
  29.         end
  30.     end
  31. end
  32.  
  33. local showMenu = gui.Checkbox(references.miscGeneral, luaKey .. "showmenu", "[Lynx] " .. luaName, false);
  34. local window = gui.Window(luaKey .. "tabs", "[Lynx Client] " .. luaName, 200, 200, windowW, windowH);
  35.  
  36. local gsgb = gui.Groupbox(window, "Godstep", 178, 5, 170, 307)
  37. local abgb = gui.Groupbox(window, "Ragebot", 351, 5, 170, 148)
  38. local aagb = gui.Groupbox(window, "Anti-Aim", 351, 158, 170, 154)
  39. local ntgb = gui.Groupbox(window, "Nametags", 5, 5, 170, 148)
  40. local visgb = gui.Groupbox(window, "Visuals", 5, 158, 170, 154)
  41. local dtaps = gui.Multibox(abgb, "Double Tap Settings")
  42.  
  43. local tagbgc = gui.ColorEntry("tagbgc", "Nametag Background Color", 0, 0, 0, 100)
  44. local tagolc = gui.ColorEntry("tagolc", "Nametag Outline Color", 0, 0, 0, 100)
  45. local tagtc = gui.ColorEntry("tagtc", "Nametag Text Color", gui.GetValue("clr_esp_box_t_vis"))
  46.  
  47. local fonts = { "Verdana", "Tahoma", "Arial", "Bahnschrift", "Comic Sans MS", "Courier New" }
  48.  
  49. addGuiComp("stutterwalk", "Checkbox", abgb, "Randomize Slowwalk", false)
  50. addGuiComp("stutterwalkbase", "Slider", abgb, "Slowwalk Randomizer Base", 25, 1, 100)
  51. addGuiComp("stutterwalkfactor", "Slider", abgb, "Slowwalk Randomizer Factor", 15, 1, 100)
  52.  
  53. addGuiComp("yawjitter", "Checkbox", aagb, "Yaw Jitter", false)
  54. addGuiComp("yawjitter_range", "Slider", aagb, "Yaw Jitter Range", 30, 0, 180)
  55. addGuiComp("desync_slowwalk", "Checkbox", aagb, "Desync Slowwalk", false)
  56. addGuiComp("gsps", "Combobox", gsgb, "Godstep", "Custom", "84° Solid", "96° Shift", "120° Shift", "Fake 167° Shift")
  57.  
  58. addGuiComp("tags", "Checkbox", ntgb, "Custom Nametags", false)
  59. addGuiComp("tagsize", "Slider", ntgb, "Nametag Font Size", 13, 1, 36)
  60. addGuiComp("tagfont", "Combobox", ntgb, "Nametag Font", "Verdana", "Tahoma", "Arial", "Bahnschrift", "Comic Sans MS", "Courier New")
  61.  
  62. addGuiComp("hitsound", "Checkbox", visgb, "Skeet Hitsound", false)
  63. addGuiComp("killeffect", "Checkbox", visgb, "Kill Effect", false)
  64. addGuiComp("postprocess", "Checkbox", visgb, "Disable Post-Processing", false)
  65. addGuiComp("ghost_pulse", "Checkbox", visgb, "Pulsating Ghosts", false)
  66. addGuiComp("indicators", "Checkbox", visgb, "Indicators", false)
  67.  
  68. addGuiComp("doubletap", "Checkbox", dtaps, "Disable Delay Shot", false)
  69. addGuiComp("doubletap_autoscale", "Checkbox", dtaps, "Auto Scale", false)
  70.  
  71. addGuiComp("lby", "Checkbox", gsgb, "LBY Drift", false)
  72. addGuiComp("lbyoffsethost", "Combobox", gsgb, "LBY Drift Host", "Desync", "Real", "Void", "Pitch")
  73. addGuiComp("lbyoffset", "Slider", gsgb, "LBY Drift Factor", 0, -86, 86)
  74. addGuiComp("ychoke", "Checkbox", gsgb, "Yaw Choke", false)
  75. addGuiComp("ychokehost", "Combobox", gsgb, "Yaw Choke Host", "Desync", "Real", "Void", "Pitch")
  76. addGuiComp("yoffset", "Slider", gsgb, "Yaw Choke Factor", 0, -86, 86)
  77.  
  78.  
  79. callbacks.Register("CreateMove", function(UserCMD)
  80.     if entities.GetLocalPlayer() then
  81.         if UserCMD:GetSendPacket() then
  82.             dx, dy = UserCMD:GetViewAngles()
  83.         end
  84.         rx, ry = entities.GetLocalPlayer():GetProp('m_angEyeAngles')
  85.         local_lby = entities.GetLocalPlayer():GetProp("m_flLowerBodyYawTarget")
  86.     end
  87. end)
  88.  
  89. callbacks.Register("Draw", function()
  90.  
  91.     espfont = draw.CreateFont(fonts[getUIVar("tagfont") + 1], math.floor(getUIVar("tagsize")))
  92.  
  93.     window:SetActive(showMenu:GetValue() and references.aimware:IsActive());
  94.  
  95.  
  96.     local r, g, b = gui.GetValue("clr_chams_ghost_client")
  97.     local o = math.floor(math.sin((globals.RealTime()) * 10) * 88 + 144) - 55
  98.     local font = draw.CreateFont("Verdana", 13, 12)
  99.  
  100.     if getUIVar("stutterwalk") then
  101.         gui.SetValue("msc_slowwalkspeed", math.random(math.floor(getUIVar("stutterwalkbase")), math.floor(getUIVar("stutterwalkbase") + getUIVar("stutterwalkfactor"))) / 100)
  102.     end
  103.  
  104.     if getUIVar("doubletap") then
  105.  
  106.         if gui.GetValue("rbot_doublefire") then
  107.             gui.SetValue("rbot_delayshot", 0)
  108.         else
  109.             gui.SetValue("rbot_delayshot", 2)
  110.         end
  111.     end
  112.  
  113.     if getUIVar("doubletap_autoscale") then
  114.  
  115.         if gui.GetValue("rbot_doublefire") then
  116.             gui.SetValue("rbot_autosniper_hitbox_auto_ps", 1)
  117.         else
  118.             gui.SetValue("rbot_autosniper_hitbox_auto_ps", 0)
  119.         end
  120.     end
  121.  
  122.     if getUIVar("indicators") and entities.GetLocalPlayer() ~= nil then
  123.         draw.SetFont(font)
  124.         draw.Color(math.abs(ry - local_lby), 255 - math.abs(ry - local_lby), 0)
  125.         draw.OutlinedRect(218, 50, 272, 65)
  126.         draw.TextShadow(220, 50, "LBYSync")
  127.  
  128.         draw.Color(math.abs(ry - dy), 255 - math.abs(ry - dy), 0)
  129.         draw.OutlinedRect(218, 70, 265, 85)
  130.         draw.TextShadow(220, 70, "Desync")
  131.     end
  132.  
  133.  
  134.     if getUIVar("desync_slowwalk") then
  135.  
  136.         if input.IsButtonDown(gui.GetValue("msc_slowwalk")) then
  137.  
  138.             if input.IsButtonDown(65) then
  139.                 gui.SetValue("rbot_antiaim_stand_desync", 3)
  140.             end
  141.  
  142.             if input.IsButtonDown(68) then
  143.                 gui.SetValue("rbot_antiaim_stand_desync", 2)
  144.             end
  145.         end
  146.     end
  147.  
  148.     if getUIVar("pitchjitter") then
  149.         gui.SetValue("rbot_antiaim_stand_pitch_custom", math.random(66, 90))
  150.     end
  151.  
  152.     if getUIVar("yawjitter") then
  153.         gui.SetValue("rbot_antiaim_stand_real_add", math.random(math.floor(0 - getUIVar("yawjitter_range")), math.floor(getUIVar("yawjitter_range"))))
  154.     end
  155.  
  156.     if getUIVar("postprocess") then
  157.         client.SetConVar("mat_postprocess_enable", 0, true)
  158.     else
  159.         client.SetConVar("mat_postprocess_enable", 1, true)
  160.     end
  161.  
  162.     if getUIVar("ghost_pulse") then
  163.         gui.SetValue("clr_chams_ghost_client", r, g, b, o)
  164.     end
  165.  
  166.     local lp = entities.GetLocalPlayer();
  167.  
  168.     if lp then
  169.  
  170.         local x2, y2 = lp:GetProp('m_angEyeAngles')
  171.  
  172.         if getUIVar("lby") then
  173.             if getUIVar("lbyoffsethost") == 0 then
  174.                 lp:SetProp("m_flLowerBodyYawTarget", ry + getUIVar("lbyoffset"))
  175.             elseif getUIVar("lbyoffsethost") == 1 then
  176.                 lp:SetProp("m_flLowerBodyYawTarget", y2 + getUIVar("lbyoffset"))
  177.             elseif getUIVar("lbyoffsethost") == 2 then
  178.                 lp:SetProp("m_flLowerBodyYawTarget", math.huge)
  179.             elseif getUIVar("lbyoffsethost") == 3 then
  180.                 lp:SetProp("m_flLowerBodyYawTarget", x2 + getUIVar("lbyoffset"))
  181.             end
  182.         end
  183.  
  184.         if getUIVar("ychoke") then
  185.             if getUIVar("ychokehost") == 0 then
  186.                 lp:SetProp("m_angEyeAngles[1]", ry + getUIVar("yoffset"))
  187.             elseif getUIVar("ychokehost") == 1 then
  188.                 lp:SetProp("m_angEyeAngles[1]", local_lby + getUIVar("yoffset"))
  189.             elseif getUIVar("ychokehost") == 2 then
  190.                 lp:SetProp("m_angEyeAngles[1]", math.huge)
  191.             elseif getUIVar("ychokehost") == 3 then
  192.                 lp:SetProp("m_angEyeAngles[1]", x2 + getUIVar("yoffset"))
  193.             end
  194.         end
  195.     end
  196.  
  197.  
  198.     if getUIVar("gsps") == 1 then
  199.         setUIVar("lby", 1)
  200.         setUIVar("lbyoffsethost", 1)
  201.         setUIVar("lbyoffset", 0)
  202.         setUIVar("ychoke", 1)
  203.         setUIVar("ychokehost", 0)
  204.         setUIVar("yoffset", 0)
  205.     elseif getUIVar("gsps") == 2 then
  206.         setUIVar("lby", 1)
  207.         setUIVar("lbyoffsethost", 1)
  208.         setUIVar("lbyoffset", 16)
  209.         setUIVar("ychoke", 1)
  210.         setUIVar("ychokehost", 0)
  211.         setUIVar("yoffset", -36)
  212.     elseif getUIVar("gsps") == 3 then
  213.         setUIVar("lby", 1)
  214.         setUIVar("lbyoffsethost", 0)
  215.         setUIVar("lbyoffset", 86)
  216.         setUIVar("ychoke", 1)
  217.         setUIVar("ychokehost", 1)
  218.         setUIVar("yoffset", 0)
  219.     elseif getUIVar("gsps") == 4 then
  220.         setUIVar("lby", 1)
  221.         setUIVar("lbyoffsethost", 1)
  222.         setUIVar("lbyoffset", -36)
  223.         setUIVar("ychoke", 1)
  224.         setUIVar("ychokehost", 0)
  225.         setUIVar("yoffset", 46)
  226.     end
  227. end);
  228.  
  229.  
  230. callbacks.Register("FireGameEvent", function(Event)
  231.  
  232.     if entities.GetLocalPlayer() ~= nil then
  233.  
  234.         if (Event:GetName() == 'player_death') then
  235.             local ME = client.GetLocalPlayerIndex()
  236.  
  237.             local INT_UID = Event:GetInt('userid')
  238.             local INT_ATTACKER = Event:GetInt('attacker')
  239.  
  240.             local INDEX_Victim = client.GetPlayerIndexByUserID(INT_UID)
  241.  
  242.             local INDEX_Attacker = client.GetPlayerIndexByUserID(INT_ATTACKER)
  243.  
  244.             if (INDEX_Attacker == ME and INDEX_Victim ~= ME) then
  245.                 if getUIVar("killeffect") then
  246.                     entities.GetLocalPlayer():SetProp("m_flHealthShotBoostExpirationTime", globals.CurTime() + 1)
  247.                     client.Command("playvol physics\\glass\\glass_pottery_break2 .5", true);
  248.                 end
  249.             end
  250.         end
  251.  
  252.  
  253.         if getUIVar("hitsound") then
  254.  
  255.             if (Event:GetName() == 'player_hurt') then
  256.                 local ME = client.GetLocalPlayerIndex()
  257.  
  258.                 local INT_UID = Event:GetInt('userid')
  259.                 local INT_ATTACKER = Event:GetInt('attacker')
  260.  
  261.                 local INDEX_Victim = client.GetPlayerIndexByUserID(INT_UID)
  262.  
  263.                 local INDEX_Attacker = client.GetPlayerIndexByUserID(INT_ATTACKER)
  264.  
  265.                 if (INDEX_Attacker == ME and INDEX_Victim ~= ME) then
  266.                     client.Command("play buttons\\arena_switch_press_02.wav", true)
  267.                 end
  268.             end
  269.         end
  270.     end
  271. end)
  272.  
  273. local function getESPCenter(ex1, ex2, width)
  274.     return ex1 + ((ex2 - ex1) / 2) - (width / 2);
  275. end
  276.  
  277. callbacks.Register("DrawESP", function(esp)
  278.  
  279.  
  280.  
  281.     draw.SetFont(espfont);
  282.     local e = esp:GetEntity()
  283.     if (e:IsPlayer() ~= true or entities.GetLocalPlayer() == nil) then return end
  284.     local ex1, ey1, ex2, ey2 = esp:GetRect()
  285.     local eName = client.GetPlayerNameByIndex(e:GetIndex())
  286.     local eHealth = e:GetHealth()
  287.     local nameWidth, nameHeight = draw.GetTextSize(eName .. " | hp " .. eHealth)
  288.  
  289.     if getUIVar("tags") then
  290.  
  291.         if (e:IsPlayer() ~= true or entities.GetLocalPlayer() == nil or eName == client.GetPlayerNameByIndex(client.GetLocalPlayerIndex())) then return end
  292.  
  293.         draw.Color(tagbgc:GetValue())
  294.         draw.RoundedRectFill(getESPCenter(ex1, ex2, nameWidth) - 2, ey1 - nameHeight, getESPCenter(ex1, ex2, nameWidth) + nameWidth + 2, ey1 - nameHeight + nameHeight + 1)
  295.         draw.Color(tagolc:GetValue())
  296.         draw.RoundedRect(getESPCenter(ex1, ex2, nameWidth) - 2, ey1 - nameHeight, getESPCenter(ex1, ex2, nameWidth) + nameWidth + 2, ey1 - nameHeight + nameHeight + 1)
  297.         draw.Color(tagtc:GetValue())
  298.         draw.TextShadow(getESPCenter(ex1, ex2, nameWidth), ey1 - nameHeight, eName .. " | hp " .. eHealth)
  299.     end
  300. end);
  301.  
  302. client.AllowListener('player_hurt')
  303. client.AllowListener('player_death')
Add Comment
Please, Sign In to add comment