Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 143.53 KB | None | 0 0
  1. local GamsteronAIOVer = 0.085
  2. local LocalCore, Menu, CHAMPION, INTERRUPTER, ORB, TS, OB, DMG, SPELLS
  3. do
  4.     if _G.GamsteronAIOLoaded == true then return end
  5.     _G.GamsteronAIOLoaded = true
  6.    
  7.     local SUPPORTED_CHAMPIONS =
  8.     {
  9.         ["Twitch"] = true,
  10.         ["Morgana"] = true,
  11.         ["Karthus"] = true,
  12.         ["KogMaw"] = true,
  13.         ["Vayne"] = true,
  14.         ["Brand"] = true,
  15.         ["Ezreal"] = true,
  16.         ["Varus"] = true,
  17.         ["Katarina"] = true,
  18.     }
  19.     if not SUPPORTED_CHAMPIONS[myHero.charName] then
  20.         print("GamsteronAIO - " .. myHero.charName .. " is not supported !")
  21.         return
  22.     end
  23.    
  24.     if not FileExist(COMMON_PATH .. "GamsteronCore.lua") then
  25.         DownloadFileAsync("https://raw.githubusercontent.com/gamsteron/GOS-External/master/Common/GamsteronCore.lua", COMMON_PATH .. "GamsteronCore.lua", function() end)
  26.         while not FileExist(COMMON_PATH .. "GamsteronCore.lua") do end
  27.     end
  28.    
  29.     if not FileExist(COMMON_PATH .. "GamsteronPrediction.lua") then
  30.         DownloadFileAsync("https://raw.githubusercontent.com/gamsteron/GOS-External/master/Common/GamsteronPrediction.lua", COMMON_PATH .. "GamsteronPrediction.lua", function() end)
  31.         while not FileExist(COMMON_PATH .. "GamsteronPrediction.lua") do end
  32.     end
  33.    
  34.     require('GamsteronPrediction')
  35.     if _G.GamsteronPredictionUpdated then
  36.         return
  37.     end
  38.    
  39.     require('GamsteronCore')
  40.     if _G.GamsteronCoreUpdated then return end
  41.     LocalCore = _G.GamsteronCore
  42.    
  43.     local success, version = LocalCore:AutoUpdate({
  44.         version = GamsteronAIOVer,
  45.         scriptPath = SCRIPT_PATH .. "GamsteronAIO.lua",
  46.         scriptUrl = "https://raw.githubusercontent.com/gamsteron/GOS-External/master/GamsteronAIO.lua",
  47.         versionPath = SCRIPT_PATH .. "GamsteronAIO.version",
  48.         versionUrl = "https://raw.githubusercontent.com/gamsteron/GOS-External/master/GamsteronAIO.version"
  49.     })
  50.     if success then
  51.         print("GamsteronAIO updated to version " .. version .. ". Please Reload with 2x F6 !")
  52.         _G.GamsteronAIOUpdated = true
  53.         return
  54.     end
  55. end
  56. --locals
  57. local GetTickCount = GetTickCount
  58. local myHero = myHero
  59. local LocalCharName = myHero.charName
  60. local LocalVector = Vector
  61. local LocalOsClock = os.clock
  62. local LocalCallbackAdd = Callback.Add
  63. local LocalCallbackDel = Callback.Del
  64. local LocalDrawLine = Draw.Linek
  65. local LocalDrawColor = Draw.Color
  66. local LocalDrawCircle = Draw.Circle
  67. local LocalDrawText = Draw.Text
  68. local LocalControlIsKeyDown = Control.IsKeyDown
  69. local LocalControlMouseEvent = Control.mouse_event
  70. local LocalControlSetCursorPos = Control.SetCursorPos
  71. local LocalControlKeyUp = Control.KeyUp
  72. local LocalControlKeyDown = Control.KeyDown
  73. local LocalGameCanUseSpell = Game.CanUseSpell
  74. local LocalGameLatency = Game.Latency
  75. local LocalGameTimer = Game.Timer
  76. local LocalGameParticleCount = Game.ParticleCount
  77. local LocalGameParticle = Game.Particle
  78. local LocalGameHeroCount = Game.HeroCount
  79. local LocalGameHero = Game.Hero
  80. local LocalGameMinionCount = Game.MinionCount
  81. local LocalGameMinion = Game.Minion
  82. local LocalGameTurretCount = Game.TurretCount
  83. local LocalGameTurret = Game.Turret
  84. local LocalGameWardCount = Game.WardCount
  85. local LocalGameWard = Game.Ward
  86. local LocalGameObjectCount = Game.ObjectCount
  87. local LocalGameObject = Game.Object
  88. local LocalGameMissileCount = Game.MissileCount
  89. local LocalGameMissile = Game.Missile
  90. local LocalGameIsChatOpen = Game.IsChatOpen
  91. local LocalGameIsOnTop = Game.IsOnTop
  92. local STATE_UNKNOWN = STATE_UNKNOWN
  93. local STATE_ATTACK = STATE_ATTACK
  94. local STATE_WINDUP = STATE_WINDUP
  95. local STATE_WINDDOWN = STATE_WINDDOWN
  96. local ITEM_1 = ITEM_1
  97. local ITEM_2 = ITEM_2
  98. local ITEM_3 = ITEM_3
  99. local ITEM_4 = ITEM_4
  100. local ITEM_5 = ITEM_5
  101. local ITEM_6 = ITEM_6
  102. local ITEM_7 = ITEM_7
  103. local _Q = _Q
  104. local _W = _W
  105. local _E = _E
  106. local _R = _R
  107. local MOUSEEVENTF_RIGHTDOWN = MOUSEEVENTF_RIGHTDOWN
  108. local MOUSEEVENTF_RIGHTUP = MOUSEEVENTF_RIGHTUP
  109. local Obj_AI_Barracks = Obj_AI_Barracks
  110. local Obj_AI_Hero = Obj_AI_Hero
  111. local Obj_AI_Minion = Obj_AI_Minion
  112. local Obj_AI_Turret = Obj_AI_Turret
  113. local Obj_HQ = "obj_HQ"
  114. local pairs = pairs
  115. local LocalMathCeil = math.ceil
  116. local LocalMathMax = math.max
  117. local LocalMathMin = math.min
  118. local LocalMathSqrt = math.sqrt
  119. local LocalMathRandom = math.random
  120. local LocalMathHuge = math.huge
  121. local LocalMathAbs = math.abs
  122. local LocalStringSub = string.sub
  123. local LocalStringLen = string.len
  124. local EPSILON = 1E-12
  125. local TEAM_ALLY = myHero.team
  126. local TEAM_ENEMY = 300 - TEAM_ALLY
  127. local TEAM_JUNGLE = 300
  128. local ORBWALKER_MODE_NONE = -1
  129. local ORBWALKER_MODE_COMBO = 0
  130. local ORBWALKER_MODE_HARASS = 1
  131. local ORBWALKER_MODE_LANECLEAR = 2
  132. local ORBWALKER_MODE_JUNGLECLEAR = 3
  133. local ORBWALKER_MODE_LASTHIT = 4
  134. local ORBWALKER_MODE_FLEE = 5
  135. local DAMAGE_TYPE_PHYSICAL = 0
  136. local DAMAGE_TYPE_MAGICAL = 1
  137. local DAMAGE_TYPE_TRUE = 2
  138. local function CheckWall(from, to, distance)
  139.     local pos1 = to + (to - from):Normalized() * 50
  140.     local pos2 = pos1 + (to - from):Normalized() * (distance - 50)
  141.     local point1 = Point(pos1.x, pos1.z)
  142.     local point2 = Point(pos2.x, pos2.z)
  143.     if MapPosition:intersectsWall(LineSegment(point1, point2)) or (MapPosition:inWall(point1) and MapPosition:inWall(point2)) then
  144.         return true
  145.     end
  146.     return false
  147. end
  148. local function CastSpell(spell, unit, spelldata, hitchance)
  149.     if LocalCore:IsValidTarget(unit) then
  150.         local HitChance = hitchance or 3
  151.         local Pred = GetGamsteronPrediction(unit, spelldata, myHero)
  152.         if Pred.Hitchance >= HitChance then
  153.             return LocalCore:CastSpell(spell, nil, Pred.CastPosition)
  154.         end
  155.     end
  156.     return false
  157. end
  158. local AIO = {
  159.     Twitch = function()
  160.         local TwitchVersion = 0.01
  161.         Menu = MenuElement({name = "Gamsteron Twitch", id = "Gamsteron_Twitch", type = _G.MENU, leftIcon = "https://raw.githubusercontent.com/gamsteron/GOS-External/master/Icons/twitch.png"})
  162.         -- Q
  163.         Menu:MenuElement({name = "Q settings", id = "qset", type = _G.MENU})
  164.         Menu.qset:MenuElement({id = "combo", name = "Use Q Combo", value = false})
  165.         Menu.qset:MenuElement({id = "harass", name = "Use Q Harass", value = false})
  166.         Menu.qset:MenuElement({id = "recallkey", name = "Invisible Recall Key", key = string.byte("T"), value = false, toggle = true})
  167.         Menu.qset.recallkey:Value(false)
  168.         Menu.qset:MenuElement({id = "note1", name = "Note: Key should be diffrent than recall key", type = SPACE})
  169.         -- W
  170.         Menu:MenuElement({name = "W settings", id = "wset", type = _G.MENU})
  171.         Menu.wset:MenuElement({id = "stopq", name = "Stop if Q invisible", value = true})
  172.         Menu.wset:MenuElement({id = "stopwult", name = "Stop if R", value = false})
  173.         Menu.wset:MenuElement({id = "combo", name = "Use W Combo", value = true})
  174.         Menu.wset:MenuElement({id = "harass", name = "Use W Harass", value = false})
  175.         Menu.wset:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  176.         -- E
  177.         Menu:MenuElement({name = "E settings", id = "eset", type = _G.MENU})
  178.         Menu.eset:MenuElement({id = "combo", name = "Use E Combo", value = true})
  179.         Menu.eset:MenuElement({id = "harass", name = "Use E Harass", value = false})
  180.         Menu.eset:MenuElement({id = "killsteal", name = "Use E KS", value = true})
  181.         Menu.eset:MenuElement({id = "stacks", name = "X stacks", value = 6, min = 1, max = 6, step = 1})
  182.         Menu.eset:MenuElement({id = "enemies", name = "X enemies", value = 1, min = 1, max = 5, step = 1})
  183.         -- R
  184.         Menu:MenuElement({name = "R settings", id = "rset", type = _G.MENU})
  185.         Menu.rset:MenuElement({id = "combo", name = "Use R Combo", value = true})
  186.         Menu.rset:MenuElement({id = "harass", name = "Use R Harass", value = false})
  187.         Menu.rset:MenuElement({id = "xenemies", name = "x - enemies", value = 3, min = 1, max = 5, step = 1})
  188.         Menu.rset:MenuElement({id = "xrange", name = "x - distance", value = 750, min = 300, max = 1500, step = 50})
  189.         -- Drawings
  190.         Menu:MenuElement({name = "Drawings", id = "draws", type = _G.MENU})
  191.         Menu.draws:MenuElement({id = "enabled", name = "Enabled", value = true})
  192.         Menu.draws:MenuElement({name = "Q Timer", id = "qtimer", type = _G.MENU})
  193.         Menu.draws.qtimer:MenuElement({id = "enabled", name = "Enabled", value = true})
  194.         Menu.draws.qtimer:MenuElement({id = "color", name = "Color ", color = Draw.Color(200, 65, 255, 100)})
  195.         Menu.draws:MenuElement({name = "Q Invisible Range", id = "qinvisible", type = _G.MENU})
  196.         Menu.draws.qinvisible:MenuElement({id = "enabled", name = "Enabled", value = true})
  197.         Menu.draws.qinvisible:MenuElement({id = "color", name = "Color ", color = Draw.Color(200, 255, 0, 0)})
  198.         Menu.draws:MenuElement({name = "Q Notification Range", id = "qnotification", type = _G.MENU})
  199.         Menu.draws.qnotification:MenuElement({id = "enabled", name = "Enabled", value = true})
  200.         Menu.draws.qnotification:MenuElement({id = "color", name = "Color ", color = Draw.Color(200, 188, 77, 26)})
  201.         -- Version
  202.         Menu:MenuElement({name = "Version " .. tostring(TwitchVersion), type = _G.SPACE, id = "verspace"})
  203.         CHAMPION = LocalCore:Class()
  204.         function CHAMPION:__init()
  205.             self.WData = {Delay = 0.25, Radius = 50, Range = 950, Speed = 1400, Type = _G.SPELLTYPE_CIRCLE}
  206.             self.HasQBuff = false
  207.             self.QBuffDuration = 0
  208.             self.HasQASBuff = false
  209.             self.QASBuffDuration = 0
  210.             self.Recall = true
  211.             self.EBuffs = {}
  212.         end
  213.         function CHAMPION:Tick()
  214.             --[[q buff best orbwalker dps
  215.             if gsoGetTickCount() - gsoSpellTimers.lqk < 500 and gsoGetTickCount() > champInfo.lastASCheck + 1000 then
  216.             champInfo.asNoQ = gsoMyHero.attackSpeed
  217.             champInfo.windUpNoQ = gsoTimers.windUpTime
  218.             champInfo.lastASCheck = gsoGetTickCount()
  219.             end--]]
  220.             --[[disable attack
  221.             local num = 1150 - (gsoGetTickCount() - (gsoSpellTimers.lqk + (gsoExtra.maxLatency*1000)))
  222.             if num < (gsoTimers.windUpTime*1000)+50 and num > - 50 then
  223.             return false
  224.             end--]]
  225.             --qrecall
  226.             if Menu.qset.recallkey:Value() == self.Recall then
  227.                 LocalControlKeyDown(HK_Q)
  228.                 LocalControlKeyUp(HK_Q)
  229.                 LocalControlKeyDown(string.byte("B"))
  230.                 LocalControlKeyUp(string.byte("B"))
  231.                 self.Recall = not self.Recall
  232.             end
  233.             --qbuff
  234.             local qDuration = LocalCore:GetBuffDuration(myHero, "globalcamouflage")--twitchhideinshadows
  235.             self.HasQBuff = qDuration > 0
  236.             if qDuration > 0 then
  237.                 self.QBuffDuration = Game.Timer() + qDuration
  238.             else
  239.                 self.QBuffDuration = 0
  240.             end
  241.             --qasbuff
  242.             local qasDuration = LocalCore:GetBuffDuration(myHero, "twitchhideinshadowsbuff")
  243.             self.HasQASBuff = qasDuration > 0
  244.             if qasDuration > 0 then
  245.                 self.QASBuffDuration = Game.Timer() + qasDuration
  246.             else
  247.                 self.QASBuffDuration = 0
  248.             end
  249.             --handle e buffs
  250.             local enemyList = OB:GetEnemyHeroes(1200, false, 0)
  251.             for i = 1, #enemyList do
  252.                 local hero = enemyList[i]
  253.                 local nID = hero.networkID
  254.                 if self.EBuffs[nID] == nil then
  255.                     self.EBuffs[nID] = {count = 0, durT = 0}
  256.                 end
  257.                 if not hero.dead then
  258.                     local hasB = false
  259.                     local cB = self.EBuffs[nID].count
  260.                     local dB = self.EBuffs[nID].durT
  261.                     for i = 0, hero.buffCount do
  262.                         local buff = hero:GetBuff(i)
  263.                         if buff and buff.count > 0 and buff.name:lower() == "twitchdeadlyvenom" then
  264.                             hasB = true
  265.                             if cB < 6 and buff.duration > dB then
  266.                                 self.EBuffs[nID].count = cB + 1
  267.                                 self.EBuffs[nID].durT = buff.duration
  268.                             else
  269.                                 self.EBuffs[nID].durT = buff.duration
  270.                             end
  271.                             break
  272.                         end
  273.                     end
  274.                     if not hasB then
  275.                         self.EBuffs[nID].count = 0
  276.                         self.EBuffs[nID].durT = 0
  277.                     end
  278.                 end
  279.             end
  280.             -- Combo / Harass
  281.             if ORB:IsAutoAttacking() then
  282.                 return
  283.             end
  284.             --EKS
  285.             if Menu.eset.killsteal:Value() and SPELLS:IsReady(_E, {q = 0, w = 0.25, e = 0.5, r = 0}) then
  286.                 for i = 1, #enemyList do
  287.                     local hero = enemyList[i]
  288.                     local buffCount
  289.                     if self.EBuffs[hero.networkID] then
  290.                         buffCount = self.EBuffs[hero.networkID].count
  291.                     else
  292.                         buffCount = 0
  293.                     end
  294.                     if buffCount > 0 and myHero.pos:DistanceTo(hero.pos) < 1200 - 35 then
  295.                         local elvl = myHero:GetSpellData(_E).level
  296.                         local basedmg = 10 + (elvl * 10)
  297.                         local perstack = (10 + (5 * elvl)) * buffCount
  298.                         local bonusAD = myHero.bonusDamage * 0.25 * buffCount
  299.                         local bonusAP = myHero.ap * 0.2 * buffCount
  300.                         local edmg = basedmg + perstack + bonusAD + bonusAP
  301.                         if DMG:CalculateDamage(myHero, hero, DAMAGE_TYPE_PHYSICAL, edmg) >= hero.health + (1.5 * hero.hpRegen) and Control.CastSpell(HK_E) then
  302.                             break
  303.                         end
  304.                     end
  305.                 end
  306.             end
  307.             local isCombo = ORB.Modes[ORBWALKER_MODE_COMBO]
  308.             local isHarass = ORB.Modes[ORBWALKER_MODE_HARASS]
  309.             if isCombo or isHarass then
  310.                 -- R
  311.                 if ((isCombo and Menu.rset.combo:Value()) or (isHarass and Menu.rset.harass:Value())) and SPELLS:IsReady(_R, {q = 1, w = 0.33, e = 0.33, r = 0.5}) and #OB:GetEnemyHeroes(Menu.rset.xrange:Value(), false, 1) >= Menu.rset.xenemies:Value() and Control.CastSpell(HK_R) then
  312.                     return
  313.                 end
  314.                 -- [ get combo target ]
  315.                 local target = TS:GetComboTarget()
  316.                 if target and ORB:CanAttack() then
  317.                     return
  318.                 end
  319.                 -- Q
  320.                 if ((isCombo and Menu.qset.combo:Value()) or (isHarass and Menu.qset.harass:Value())) and target and SPELLS:IsReady(_Q, {q = 0.5, w = 0.33, e = 0.33, r = 0.1}) and Control.CastSpell(HK_Q) then
  321.                     return
  322.                 end
  323.                 --W
  324.                 if ((isCombo and Menu.wset.combo:Value())or(isHarass and Menu.wset.harass:Value())) and not(Menu.wset.stopwult:Value() and Game.Timer() < SPELLS.lastRk + 5.45) and not(Menu.wset.stopq:Value() and self.HasQBuff) and SPELLS:IsReady(_W, {q = 0, w = 1, e = 0.75, r = 0}) then
  325.                     if target then
  326.                         WTarget = target
  327.                     else
  328.                         WTarget = TS:GetTarget(OB:GetEnemyHeroes(950, false, 0), 0)
  329.                     end
  330.                     CastSpell(HK_W, WTarget, self.WData, Menu.wset.hitchance:Value() + 1)
  331.                 end
  332.                 --E
  333.                 if ((ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.eset.combo:Value())or(ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.eset.harass:Value())) and SPELLS:IsReady(_E, {q = 0, w = 0.25, e = 0.5, r = 0}) then
  334.                     local countE = 0
  335.                     local xStacks = Menu.eset.stacks:Value()
  336.                     local enemyList = OB:GetEnemyHeroes(1200, false, 0)
  337.                     for i = 1, #enemyList do
  338.                         local hero = enemyList[i]
  339.                         local buffCount
  340.                         if self.EBuffs[hero.networkID] then
  341.                             buffCount = self.EBuffs[hero.networkID].count
  342.                         else
  343.                             buffCount = 0
  344.                         end
  345.                         if hero and myHero.pos:DistanceTo(hero.pos) < 1200 - 35 and buffCount >= xStacks then
  346.                             countE = countE + 1
  347.                         end
  348.                     end
  349.                     if countE >= Menu.eset.enemies:Value() and Control.CastSpell(HK_E) then
  350.                         return
  351.                     end
  352.                 end
  353.             end
  354.         end
  355.         function CHAMPION:Draw()
  356.             local lastQ, lastQk, lastW, lastWk, lastE, lastEk, lastR, lastRk = SPELLS:GetLastSpellTimers()
  357.             if Game.Timer() < lastQk + 16 then
  358.                 local pos2D = myHero.pos:To2D()
  359.                 local posX = pos2D.x - 50
  360.                 local posY = pos2D.y
  361.                 local num1 = 1.35 - (Game.Timer() - lastQk)
  362.                 local timerEnabled = Menu.draws.qtimer.enabled:Value()
  363.                 local timerColor = Menu.draws.qtimer.color:Value()
  364.                 if num1 > 0.001 then
  365.                     if timerEnabled then
  366.                         local str1 = tostring(math.floor(num1 * 1000))
  367.                         local str2 = ""
  368.                         for i = 1, #str1 do
  369.                             if #str1 <= 2 then
  370.                                 str2 = 0
  371.                                 break
  372.                             end
  373.                             local char1
  374.                             if i <= #str1 - 2 then
  375.                                 char1 = str1:sub(i, i)
  376.                             else
  377.                                 char1 = "0"
  378.                             end
  379.                             str2 = str2..char1
  380.                         end
  381.                         Draw.Text(str2, 50, posX + 50, posY - 15, timerColor)
  382.                     end
  383.                 elseif self.HasQBuff then
  384.                     local num2 = math.floor(1000 * (self.QBuffDuration - Game.Timer()))
  385.                     if num2 > 1 then
  386.                         if Menu.draws.qinvisible.enabled:Value() then
  387.                             Draw.Circle(myHero.pos, 500, 1, Menu.draws.qinvisible.color:Value())
  388.                         end
  389.                         if Menu.draws.qnotification.enabled:Value() then
  390.                             Draw.Circle(myHero.pos, 800, 1, Menu.draws.qnotification.color:Value())
  391.                         end
  392.                         if timerEnabled then
  393.                             local str1 = tostring(num2)
  394.                             local str2 = ""
  395.                             for i = 1, #str1 do
  396.                                 if #str1 <= 2 then
  397.                                     str2 = 0
  398.                                     break
  399.                                 end
  400.                                 local char1
  401.                                 if i <= #str1 - 2 then
  402.                                     char1 = str1:sub(i, i)
  403.                                 else
  404.                                     char1 = "0"
  405.                                 end
  406.                                 str2 = str2..char1
  407.                             end
  408.                             Draw.Text(str2, 50, posX + 50, posY - 15, timerColor)
  409.                         end
  410.                     end
  411.                 end
  412.             end
  413.         end
  414.         function CHAMPION:PreAttack(args)
  415.             local isCombo = ORB.Modes[ORBWALKER_MODE_COMBO]
  416.             local isHarass = ORB.Modes[ORBWALKER_MODE_HARASS]
  417.             if isCombo or isHarass then
  418.                 -- R
  419.                 if (isCombo and Menu.rset.combo:Value()) or (isHarass and Menu.rset.harass:Value()) then
  420.                     if SPELLS:IsReady(_R, {q = 1, w = 0.33, e = 0.33, r = 0.5}) and #OB:GetEnemyHeroes(Menu.rset.xrange:Value(), false, 1) >= Menu.rset.xenemies:Value() and Control.CastSpell(HK_R) then
  421.                         return
  422.                     end
  423.                 end
  424.             end
  425.         end
  426.         function CHAMPION:CanMove()
  427.             if not SPELLS:CheckSpellDelays({q = 0, w = 0.2, e = 0.2, r = 0}) then
  428.                 return false
  429.             end
  430.             return true
  431.         end
  432.         function CHAMPION:CanAttack()
  433.             if not SPELLS:CheckSpellDelays({q = 0, w = 0.33, e = 0.33, r = 0}) then
  434.                 return false
  435.             end
  436.             return true
  437.         end
  438.     end,
  439.     Morgana = function()
  440.         local MorganaVersion = "0.02 - fixed error"
  441.         Menu = MenuElement({name = "Gamsteron Morgana", id = "Gamsteron_Morgana", type = _G.MENU, leftIcon = "https://raw.githubusercontent.com/gamsteron/GOS-External/master/Icons/morganads83fd.png"})
  442.         -- Q
  443.         Menu:MenuElement({name = "Q settings", id = "qset", type = _G.MENU})
  444.         -- Disable Attack
  445.         Menu.qset:MenuElement({id = "disaa", name = "Disable attack if ready or almostReady", value = false})
  446.         -- Interrupt:
  447.         Menu.qset:MenuElement({id = "interrupter", name = "Interrupter", value = true})
  448.         -- KS
  449.         Menu.qset:MenuElement({name = "KS", id = "killsteal", type = _G.MENU})
  450.         Menu.qset.killsteal:MenuElement({id = "enabled", name = "Enabled", value = false})
  451.         Menu.qset.killsteal:MenuElement({id = "minhp", name = "minimum enemy hp", value = 200, min = 1, max = 300, step = 1})
  452.         Menu.qset.killsteal:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"Normal", "High", "Immobile"}})
  453.         -- Auto
  454.         Menu.qset:MenuElement({name = "Auto", id = "auto", type = _G.MENU})
  455.         Menu.qset.auto:MenuElement({id = "enabled", name = "Enabled", value = true})
  456.         Menu.qset.auto:MenuElement({name = "Use on:", id = "useon", type = _G.MENU})
  457.         LocalCore:OnEnemyHeroLoad(function(hero) Menu.qset.auto.useon:MenuElement({id = hero.charName, name = hero.charName, value = true}) end)
  458.         Menu.qset.auto:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"Normal", "High", "Immobile"}})
  459.         -- Combo / Harass
  460.         Menu.qset:MenuElement({name = "Combo / Harass", id = "comhar", type = _G.MENU})
  461.         Menu.qset.comhar:MenuElement({id = "combo", name = "Combo", value = true})
  462.         Menu.qset.comhar:MenuElement({id = "harass", name = "Harass", value = false})
  463.         Menu.qset.comhar:MenuElement({name = "Use on:", id = "useon", type = _G.MENU})
  464.         LocalCore:OnEnemyHeroLoad(function(hero) Menu.qset.comhar.useon:MenuElement({id = hero.charName, name = hero.charName, value = true}) end)
  465.         Menu.qset.comhar:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"Normal", "High", "Immobile"}})
  466.         -- W
  467.         Menu:MenuElement({name = "W settings", id = "wset", type = _G.MENU})
  468.         -- KS
  469.         Menu.wset:MenuElement({name = "KS", id = "killsteal", type = _G.MENU})
  470.         Menu.wset.killsteal:MenuElement({id = "enabled", name = "Enabled", value = false})
  471.         Menu.wset.killsteal:MenuElement({id = "minhp", name = "minimum enemy hp", value = 200, min = 1, max = 300, step = 1})
  472.         -- Auto
  473.         Menu.wset:MenuElement({name = "Auto", id = "auto", type = _G.MENU})
  474.         Menu.wset.auto:MenuElement({id = "enabled", name = "Enabled", value = true})
  475.         -- Combo / Harass
  476.         Menu.wset:MenuElement({name = "Combo / Harass", id = "comhar", type = _G.MENU})
  477.         Menu.wset.comhar:MenuElement({id = "combo", name = "Use W Combo", value = false})
  478.         Menu.wset.comhar:MenuElement({id = "harass", name = "Use W Harass", value = false})
  479.         -- Clear
  480.         Menu.wset:MenuElement({name = "Clear", id = "laneclear", type = _G.MENU})
  481.         Menu.wset.laneclear:MenuElement({id = "enabled", name = "Enbaled", value = false})
  482.         Menu.wset.laneclear:MenuElement({id = "xminions", name = "Min minions W Clear", value = 3, min = 1, max = 5, step = 1})
  483.         -- E
  484.         Menu:MenuElement({name = "E settings", id = "eset", type = _G.MENU})
  485.         -- Auto
  486.         Menu.eset:MenuElement({name = "Auto", id = "auto", type = _G.MENU})
  487.         Menu.eset.auto:MenuElement({id = "enabled", name = "Enabled", value = true})
  488.         Menu.eset.auto:MenuElement({id = "ally", name = "Use on ally", value = true})
  489.         Menu.eset.auto:MenuElement({id = "selfish", name = "Use on yourself", value = true})
  490.         --R
  491.         Menu:MenuElement({name = "R settings", id = "rset", type = _G.MENU})
  492.         -- KS
  493.         Menu.rset:MenuElement({name = "KS", id = "killsteal", type = _G.MENU})
  494.         Menu.rset.killsteal:MenuElement({id = "enabled", name = "Enabled", value = false})
  495.         Menu.rset.killsteal:MenuElement({id = "minhp", name = "Minimum enemy hp", value = 200, min = 1, max = 300, step = 1})
  496.         -- Auto
  497.         Menu.rset:MenuElement({name = "Auto", id = "auto", type = _G.MENU})
  498.         Menu.rset.auto:MenuElement({id = "enabled", name = "Enabled", value = true})
  499.         Menu.rset.auto:MenuElement({id = "xenemies", name = ">= X enemies near morgana", value = 3, min = 1, max = 5, step = 1})
  500.         Menu.rset.auto:MenuElement({id = "xrange", name = "< X distance enemies to morgana", value = 300, min = 100, max = 550, step = 50})
  501.         -- Combo / Harass
  502.         Menu.rset:MenuElement({name = "Combo / Harass", id = "comhar", type = _G.MENU})
  503.         Menu.rset.comhar:MenuElement({id = "combo", name = "Use R Combo", value = true})
  504.         Menu.rset.comhar:MenuElement({id = "harass", name = "Use R Harass", value = false})
  505.         Menu.rset.comhar:MenuElement({id = "xenemies", name = ">= X enemies near morgana", value = 2, min = 1, max = 4, step = 1})
  506.         Menu.rset.comhar:MenuElement({id = "xrange", name = "< X distance enemies to morgana", value = 300, min = 100, max = 550, step = 50})
  507.         -- Version
  508.         Menu:MenuElement({name = "Version " .. tostring(MorganaVersion), type = _G.SPACE, id = "verspace"})
  509.         CHAMPION = LocalCore:Class()
  510.         function CHAMPION:__init()
  511.             self.QData = {Type = _G.SPELLTYPE_LINE, Delay = 0.25, Radius = 70, Range = 1175, Speed = 1200, Collision = true, MaxCollision = 0, CollisionTypes = {_G.COLLISION_MINION, _G.COLLISION_YASUOWALL}}
  512.             self.WData = {Type = _G.SPELLTYPE_CIRCLE, Collision = false, Delay = 0.25, Radius = 150, Range = 900, Speed = math.huge}
  513.             self.EData = {Range = 800}
  514.             self.RData = {Range = 625}
  515.         end
  516.         function CHAMPION:QLogic()
  517.             local result = false
  518.             if SPELLS:IsReady(_Q, {q = 1, w = 0.3, e = 0.3, r = 0.3}) then
  519.                 local EnemyHeroes = OB:GetEnemyHeroes(self.QData.Range, false, LocalCore.HEROES_SPELL)
  520.                
  521.                 if Menu.qset.killsteal.enabled:Value() then
  522.                     local baseDmg = 25
  523.                     local lvlDmg = 55 * myHero:GetSpellData(_Q).level
  524.                     local apDmg = myHero.ap * 0.9
  525.                     local qDmg = baseDmg + lvlDmg + apDmg
  526.                     if qDmg > Menu.qset.killsteal.minhp:Value() then
  527.                         for i = 1, #EnemyHeroes do
  528.                             local qTarget = EnemyHeroes[i]
  529.                             if qTarget.health > Menu.qset.killsteal.minhp:Value() and qTarget.health < DMG:CalculateDamage(myHero, qTarget, LocalCore.DAMAGE_TYPE_MAGICAL, qDmg) then
  530.                                 result = CastSpell(HK_Q, qTarget, self.QData, Menu.qset.killsteal.hitchance:Value() + 1)
  531.                             end
  532.                         end
  533.                     end
  534.                 end if result then return end
  535.                
  536.                 if (ORB.Modes[LocalCore.ORBWALKER_MODE_COMBO] and Menu.qset.comhar.combo:Value()) or (ORB.Modes[LocalCore.ORBWALKER_MODE_HARASS] and Menu.qset.comhar.harass:Value()) then
  537.                     local qList = {}
  538.                     for i = 1, #EnemyHeroes do
  539.                         local hero = EnemyHeroes[i]
  540.                         local heroName = hero.charName
  541.                         if Menu.qset.comhar.useon[heroName] and Menu.qset.comhar.useon[heroName]:Value() then
  542.                             qList[#qList + 1] = hero
  543.                         end
  544.                     end
  545.                     result = CastSpell(HK_Q, TS:GetTarget(qList, LocalCore.DAMAGE_TYPE_MAGICAL), self.QData, Menu.qset.comhar.hitchance:Value() + 1)
  546.                 end if result then return end
  547.                
  548.                 if Menu.qset.auto.enabled:Value() then
  549.                     local qList = {}
  550.                     for i = 1, #EnemyHeroes do
  551.                         local hero = EnemyHeroes[i]
  552.                         local heroName = hero.charName
  553.                         if Menu.qset.auto.useon[heroName] and Menu.qset.auto.useon[heroName]:Value() then
  554.                             qList[#qList + 1] = hero
  555.                         end
  556.                     end
  557.                     CastSpell(HK_Q, TS:GetTarget(qList, LocalCore.DAMAGE_TYPE_MAGICAL), self.QData, Menu.qset.auto.hitchance:Value() + 1)
  558.                 end
  559.             end
  560.         end
  561.         function CHAMPION:WLogic()
  562.             local result = false
  563.             if SPELLS:IsReady(_W, {q = 0.3, w = 1, e = 0.3, r = 0.3}) then
  564.                 local EnemyHeroes = OB:GetEnemyHeroes(self.WData.Range, false, 0)
  565.                
  566.                 if Menu.wset.killsteal.enabled:Value() then
  567.                     local baseDmg = 10
  568.                     local lvlDmg = 14 * myHero:GetSpellData(_W).level
  569.                     local apDmg = myHero.ap * 0.22
  570.                     local wDmg = baseDmg + lvlDmg + apDmg
  571.                     if wDmg > Menu.wset.killsteal.minhp:Value() then
  572.                         for i = 1, #EnemyHeroes do
  573.                             local wTarget = EnemyHeroes[i]
  574.                             if wTarget.health > Menu.wset.killsteal.minhp:Value() and wTarget.health < DMG:CalculateDamage(myHero, wTarget, LocalCore.DAMAGE_TYPE_MAGICAL, wDmg) then
  575.                                 result = CastSpell(HK_W, wTarget, self.WData, _G.HITCHANCE_HIGH)
  576.                             end
  577.                         end
  578.                     end
  579.                 end if result then return end
  580.                
  581.                 if (ORB.Modes[LocalCore.ORBWALKER_MODE_COMBO] and Menu.wset.comhar.combo:Value()) or (ORB.Modes[LocalCore.ORBWALKER_MODE_HARASS] and Menu.wset.comhar.harass:Value()) then
  582.                     for i = 1, #EnemyHeroes do
  583.                         result = CastSpell(HK_W, EnemyHeroes[i], self.WData, _G.HITCHANCE_HIGH)
  584.                         if result then break end
  585.                     end
  586.                 end if result then return end
  587.                
  588.                 if (ORB.Modes[LocalCore.ORBWALKER_MODE_LANECLEAR] and Menu.wset.laneclear.enabled:Value()) then
  589.                     local target = nil
  590.                     local BestHit = 0
  591.                     local CurrentCount = 0
  592.                     local eMinions = OB:GetEnemyMinions(self.WData.Range + 200)
  593.                     for i = 1, #eMinions do
  594.                         local minion = eMinions[i]
  595.                         CurrentCount = 0
  596.                         local minionPos = minion.pos
  597.                         for j = 1, #eMinions do
  598.                             local minion2 = eMinions[i]
  599.                             if LocalCore:IsInRange(minionPos, minion2.pos, 250) then
  600.                                 CurrentCount = CurrentCount + 1
  601.                             end
  602.                         end
  603.                         if CurrentCount > BestHit then
  604.                             BestHit = CurrentCount
  605.                             target = minion
  606.                         end
  607.                     end
  608.                     if target and BestHit >= Menu.wset.laneclear.xminions:Value() then
  609.                         result = Control.CastSpell(HK_W, target)
  610.                     end
  611.                 end if result then return end
  612.                
  613.                 if Menu.wset.auto.enabled:Value() then
  614.                     for i = 1, #EnemyHeroes do
  615.                         local unit = EnemyHeroes[i]
  616.                         local ImmobileDuration, SpellStartTime, AttackStartTime, KnockDuration = GetImmobileDuration(unit);
  617.                         if ImmobileDuration > 0.5 and not unit.pathing.isDashing and not unit.pathing.hasMovePath then
  618.                             Control.CastSpell(HK_W, unit)
  619.                         end
  620.                     end
  621.                 end
  622.             end
  623.         end
  624.         function CHAMPION:ELogic()
  625.             if Menu.eset.auto.enabled:Value() and (Menu.eset.auto.ally:Value() or Menu.eset.auto.selfish:Value()) and SPELLS:IsReady(_E, {q = 0.3, w = 0.3, e = 1, r = 0.3}) then
  626.                 local EnemyHeroes = OB:GetEnemyHeroes(2500, false, LocalCore.HEROES_IMMORTAL)
  627.                 local AllyHeroes = OB:GetAllyHeroes(self.EData.Range)
  628.                 for i = 1, #EnemyHeroes do
  629.                     local hero = EnemyHeroes[i]
  630.                     local heroPos = hero.pos
  631.                     local currSpell = hero.activeSpell
  632.                     if currSpell and currSpell.valid and hero.isChanneling then
  633.                         for j = 1, #AllyHeroes do
  634.                             local ally = AllyHeroes[j]
  635.                             if (Menu.eset.auto.selfish:Value() and ally.isMe) or (Menu.eset.auto.ally:Value() and not ally.isMe) then
  636.                                 local canUse = false
  637.                                 local allyPos = ally.pos
  638.                                 if currSpell.target == ally.handle then
  639.                                     canUse = true
  640.                                 else
  641.                                     local spellPos = currSpell.placementPos
  642.                                     local width = ally.boundingRadius + 100
  643.                                     if currSpell.width > 0 then width = width + currSpell.width end
  644.                                     local isOnSegment, pointSegment, pointLine = LocalCore:ProjectOn(allyPos, spellPos, heroPos)
  645.                                     if LocalCore:IsInRange(pointSegment, allyPos, width) then
  646.                                         canUse = true
  647.                                     end
  648.                                 end
  649.                                 if canUse then
  650.                                     Control.CastSpell(HK_E, ally)
  651.                                 end
  652.                             end
  653.                         end
  654.                     end
  655.                 end
  656.             end
  657.         end
  658.         function CHAMPION:RLogic()
  659.             local result = false
  660.             if SPELLS:IsReady(_R, {q = 0.33, w = 0.33, e = 0.33, r = 1}) then
  661.                 local EnemyHeroes = OB:GetEnemyHeroes(self.RData.Range, false, 0)
  662.                
  663.                 if Menu.rset.killsteal.enabled:Value() then
  664.                     local baseDmg = 75
  665.                     local lvlDmg = 75 * myHero:GetSpellData(_R).level
  666.                     local apDmg = myHero.ap * 0.7
  667.                     local rDmg = baseDmg + lvlDmg + apDmg
  668.                     if rDmg > Menu.rset.killsteal.minhp:Value() then
  669.                         for i = 1, #EnemyHeroes do
  670.                             local rTarget = EnemyHeroes[i]
  671.                             if rTarget.health > Menu.rset.killsteal.minhp:Value() and rTarget.health < DMG:CalculateDamage(myHero, rTarget, LocalCore.DAMAGE_TYPE_MAGICAL, rDmg) then
  672.                                 result = LocalCore:CastSpell(HK_R)
  673.                             end
  674.                         end
  675.                     end
  676.                 end if result then return end
  677.                
  678.                 if (ORB.Modes[LocalCore.ORBWALKER_MODE_COMBO] and Menu.rset.comhar.combo:Value()) or (ORB.Modes[LocalCore.ORBWALKER_MODE_HARASS] and Menu.rset.comhar.harass:Value()) then
  679.                     local count = 0
  680.                     local mePos = myHero.pos
  681.                     for i = 1, #EnemyHeroes do
  682.                         local unit = EnemyHeroes[i]
  683.                         if LocalCore:IsInRange(mePos, unit.pos, Menu.rset.comhar.xrange:Value()) then
  684.                             count = count + 1
  685.                         end
  686.                     end
  687.                     if count >= Menu.rset.comhar.xenemies:Value() then
  688.                         result = LocalCore:CastSpell(HK_R)
  689.                     end
  690.                 end if result then return end
  691.                
  692.                 if Menu.rset.auto.enabled:Value() then
  693.                     local count = 0
  694.                     local mePos = myHero.pos
  695.                     for i = 1, #EnemyHeroes do
  696.                         local unit = EnemyHeroes[i]
  697.                         if LocalCore:GetDistance(mePos, unit.pos) < Menu.rset.auto.xrange:Value() then
  698.                             count = count + 1
  699.                         end
  700.                     end
  701.                     if count >= Menu.rset.auto.xenemies:Value() then
  702.                         result = LocalCore:CastSpell(HK_R)
  703.                     end if result then return end
  704.                 end
  705.             end
  706.         end
  707.         function CHAMPION:Tick()
  708.             -- Is Attacking
  709.             if ORB:IsAutoAttacking() then
  710.                 return
  711.             end
  712.             self:QLogic()
  713.             self:WLogic()
  714.             self:ELogic()
  715.             self:RLogic()
  716.         end
  717.         function CHAMPION:Interrupter()
  718.             INTERRUPTER = LocalCore:__Interrupter()
  719.             INTERRUPTER:OnInterrupt(function(enemy)
  720.                 if Menu.qset.interrupter:Value() and SPELLS:IsReady(_Q, {q = 1, w = 0.3, e = 0.3, r = 0.3}) and enemy.pos:ToScreen().onScreen and myHero.pos:DistanceTo(enemy.pos) < 1000 then
  721.                     CastSpell(HK_Q, enemy, self.QData, _G.HITCHANCE_NORMAL)
  722.                 end
  723.             end)
  724.         end
  725.         function CHAMPION:CanAttack()
  726.             if not SPELLS:CheckSpellDelays({q = 0.33, w = 0.33, e = 0.33, r = 0.33}) then
  727.                 return false
  728.             end
  729.             -- LastHit, LaneClear
  730.             if not ORB.Modes[LocalCore.ORBWALKER_MODE_COMBO] and not ORB.Modes[LocalCore.ORBWALKER_MODE_HARASS] then
  731.                 return true
  732.             end
  733.             -- Q
  734.             if Menu.qset.disaa:Value() and myHero:GetSpellData(_Q).level > 0 and myHero.mana > myHero:GetSpellData(_Q).mana and (LocalGameCanUseSpell(_Q) == 0 or myHero:GetSpellData(_Q).currentCd < 1) then
  735.                 return false
  736.             end
  737.             return true
  738.         end
  739.         function CHAMPION:CanMove()
  740.             if not SPELLS:CheckSpellDelays({q = 0.25, w = 0.25, e = 0.25, r = 0.25}) then
  741.                 return false
  742.             end
  743.             return true
  744.         end
  745.     end,
  746.     Karthus = function()
  747.         local KarthusVersion = 0.01
  748.         Menu = MenuElement({name = "Gamsteron Karthus", id = "Gamsteron_Karthus", type = _G.MENU, leftIcon = "https://raw.githubusercontent.com/gamsteron/GOS-External/master/Icons/karthusw5s.png"})
  749.         -- Q
  750.         Menu:MenuElement({name = "Q settings", id = "qset", type = _G.MENU})
  751.         -- Disable Attack
  752.         Menu.qset:MenuElement({id = "disaa", name = "Disable attack", value = true})
  753.         -- KS
  754.         Menu.qset:MenuElement({name = "KS", id = "killsteal", type = _G.MENU})
  755.         Menu.qset.killsteal:MenuElement({id = "enabled", name = "Enabled", value = true})
  756.         Menu.qset.killsteal:MenuElement({id = "minhp", name = "minimum enemy hp", value = 200, min = 1, max = 300, step = 1})
  757.         Menu.qset.killsteal:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  758.         -- Auto
  759.         Menu.qset:MenuElement({name = "Auto", id = "auto", type = _G.MENU})
  760.         Menu.qset.auto:MenuElement({id = "enabled", name = "Enabled", value = true})
  761.         Menu.qset.auto:MenuElement({name = "Use on:", id = "useon", type = _G.MENU})
  762.         LocalCore:OnEnemyHeroLoad(function(hero) Menu.qset.auto.useon:MenuElement({id = hero.charName, name = hero.charName, value = true}) end)
  763.         Menu.qset.auto:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  764.         -- Combo / Harass
  765.         Menu.qset:MenuElement({name = "Combo / Harass", id = "comhar", type = _G.MENU})
  766.         Menu.qset.comhar:MenuElement({id = "combo", name = "Combo", value = true})
  767.         Menu.qset.comhar:MenuElement({id = "harass", name = "Harass", value = false})
  768.         Menu.qset.comhar:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  769.         -- W
  770.         Menu:MenuElement({name = "W settings", id = "wset", type = _G.MENU})
  771.         Menu.wset:MenuElement({id = "combo", name = "Combo", value = true})
  772.         Menu.wset:MenuElement({id = "harass", name = "Harass", value = false})
  773.         Menu.wset:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  774.         -- E
  775.         Menu:MenuElement({name = "E settings", id = "eset", type = _G.MENU})
  776.         Menu.eset:MenuElement({id = "auto", name = "Auto", value = true})
  777.         Menu.eset:MenuElement({id = "combo", name = "Combo", value = true})
  778.         Menu.eset:MenuElement({id = "harass", name = "Harass", value = false})
  779.         Menu.eset:MenuElement({id = "minmp", name = "minimum mana percent", value = 25, min = 1, max = 100, step = 1})
  780.         --R
  781.         Menu:MenuElement({name = "R settings", id = "rset", type = _G.MENU})
  782.         Menu.rset:MenuElement({id = "killsteal", name = "Auto KS X enemies in passive form", value = true})
  783.         Menu.rset:MenuElement({id = "kscount", name = "^^^ X enemies ^^^", value = 2, min = 1, max = 5, step = 1})
  784.         -- Drawings
  785.         Menu:MenuElement({name = "Drawings", id = "draws", type = _G.MENU})
  786.         Menu.draws:MenuElement({name = "Draw Kill Count", id = "ksdraw", type = _G.MENU})
  787.         Menu.draws.ksdraw:MenuElement({id = "enabled", name = "Enabled", value = true})
  788.         Menu.draws.ksdraw:MenuElement({id = "size", name = "Text Size", value = 25, min = 1, max = 64, step = 1})
  789.         -- Version
  790.         Menu:MenuElement({name = "Version " .. tostring(KarthusVersion), type = _G.SPACE, id = "verspace"})
  791.         CHAMPION = LocalCore:Class()
  792.         function CHAMPION:__init()
  793.             self.QData = {Delay = 1, Radius = 200, Range = 875, Speed = math.huge, Collision = false, Type = _G.SPELLTYPE_CIRCLE}
  794.             self.WData = {Delay = 0.25, Radius = 1, Range = 1000, Speed = math.huge, Collision = false, Type = _G.SPELLTYPE_CIRCLE}
  795.         end
  796.        
  797.         function CHAMPION:GetMinions()
  798.             local EnemyMinions = {}
  799.             for i = 1, Game.MinionCount() do
  800.                 local Minion = Game.Minion(i)
  801.                 if self:IsValidTarget(Minion, 425, false, myHero) then
  802.                     table.insert(EnemyMinions, Minion)
  803.                 end
  804.             end
  805.             return EnemyMinions
  806.         end
  807.      
  808.         function CHAMPION:Tick()
  809.             -- Is Attacking
  810.             if ORB:IsAutoAttacking() then
  811.                 return
  812.             end
  813.             -- Has Passive Buff
  814.             local hasPassive = LocalCore:HasBuff(myHero, "karthusdeathdefiedbuff")
  815.             -- W
  816.             if SPELLS:IsReady(_W, {q = 0.33, w = 0.5, e = 0.33, r = 3.23}) then
  817.                 if (ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.wset.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.wset.harass:Value()) then
  818.                     local enemyList = OB:GetEnemyHeroes(1000, false, 0)
  819.                     CastSpell(HK_W, TS:GetTarget(enemyList, 1), self.WData, Menu.wset.hitchance:Value() + 1)
  820.                 end
  821.             end
  822.             -- E
  823.             if SPELLS:IsReady(_E, {q = 0.33, w = 0.33, e = 0.5, r = 3.23}) and not hasPassive then
  824.                 if Menu.eset.auto:Value() or (ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.eset.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.eset.harass:Value()) then
  825.                     local enemyList = OB:GetEnemyHeroes(425, false, 0)
  826.                     local minionList = self:GetMinions()
  827.                     local eBuff = LocalCore:HasBuff(myHero, "karthusdefile")
  828.                     if eBuff and (#enemyList == 0  or #minionList == 0 ) and Control.CastSpell(HK_E) then
  829.                         return
  830.                     end
  831.                     local manaPercent = 100 * myHero.mana / myHero.maxMana
  832.                     if not eBuff and (#enemyList > 0  or #minionList > 0 ) and manaPercent > Menu.eset.minmp:Value() and Control.CastSpell(HK_E) then
  833.                         return
  834.                     end
  835.                 end
  836.             end
  837.             -- Q
  838.             local qdata = myHero:GetSpellData(_Q);
  839.             if (SPELLS:IsReady(_Q, {q = 0.5, w = 0.33, e = 0.33, r = 3.23}) and qdata.ammoCd == 0 and qdata.ammoCurrentCd == 0 and qdata.ammo == 2 and qdata.ammoTime - Game.Timer() < 0) then
  840.                 -- KS
  841.                 if Menu.qset.killsteal.enabled:Value() then
  842.                     local qDmg = self:GetQDmg()
  843.                     local minHP = Menu.qset.killsteal.minhp:Value()
  844.                     if qDmg > minHP then
  845.                         local enemyList = OB:GetEnemyHeroes(875, false, 0)
  846.                         for i = 1, #enemyList do
  847.                             local qTarget = enemyList[i]
  848.                             if qTarget.health > minHP and qTarget.health < DMG:CalculateDamage(myHero, qTarget, DAMAGE_TYPE_MAGICAL, self:GetQDmg()) then
  849.                                 CastSpell(HK_Q, qTarget, self.QData, Menu.qset.killsteal.hitchance:Value() + 1)
  850.                             end
  851.                         end
  852.                     end
  853.                 end
  854.                 -- Combo Harass
  855.                 if (ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.qset.comhar.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.qset.comhar.harass:Value()) then
  856.                     for i = 1, 3 do
  857.                         local enemyList = OB:GetEnemyHeroes(1000 - (i * 100), false, 0)
  858.                         CastSpell(HK_Q, TS:GetTarget(enemyList, 1), self.QData, Menu.qset.comhar.hitchance:Value() + 1)
  859.                     end
  860.                     -- Auto
  861.                 elseif Menu.qset.auto.enabled:Value() then
  862.                     for i = 1, 3 do
  863.                         local qList = {}
  864.                         local enemyList = OB:GetEnemyHeroes(1000 - (i * 100), false, 0)
  865.                         for i = 1, #enemyList do
  866.                             local hero = enemyList[i]
  867.                             local heroName = hero.charName
  868.                             if Menu.qset.auto.useon[heroName] and Menu.qset.auto.useon[heroName]:Value() then
  869.                                 qList[#qList + 1] = hero
  870.                             end
  871.                         end
  872.                         CastSpell(HK_Q, TS:GetTarget(qList, 1), self.QData, Menu.qset.auto.hitchance:Value() + 1)
  873.                     end
  874.                 end
  875.             end
  876.             -- R
  877.             if SPELLS:IsReady(_R, {q = 0.33, w = 0.33, e = 0.33, r = 0.5}) and Menu.rset.killsteal:Value() and hasPassive then
  878.                 local rCount = 0
  879.                 local enemyList = OB:GetEnemyHeroes(99999, false, 0)
  880.                 for i = 1, #enemyList do
  881.                     local rTarget = enemyList[i]
  882.                     if rTarget.health < DMG:CalculateDamage(myHero, rTarget, DAMAGE_TYPE_MAGICAL, self:GetRDmg()) then
  883.                         rCount = rCount + 1
  884.                     end
  885.                 end
  886.                 if rCount > Menu.rset.kscount:Value() and Control.CastSpell(HK_R) then
  887.                     return
  888.                 end
  889.             end
  890.         end
  891.         function CHAMPION:Draw()
  892.             if Menu.draws.ksdraw.enabled:Value() and LocalGameCanUseSpell(_R) == 0 then
  893.                 local rCount = 0
  894.                 local enemyList = OB:GetEnemyHeroes(99999, false, 0)
  895.                 for i = 1, #enemyList do
  896.                     local rTarget = enemyList[i]
  897.                     if rTarget.health < DMG:CalculateDamage(myHero, rTarget, DAMAGE_TYPE_MAGICAL, self:GetRDmg()) then
  898.                         rCount = rCount + 1
  899.                     end
  900.                 end
  901.                 local mePos = myHero.pos:To2D()
  902.                 local posX = mePos.x - 50
  903.                 local posY = mePos.y
  904.                 if rCount > 0 then
  905.                     LocalDrawText("Kill Count: "..rCount, Menu.draws.ksdraw.size:Value(), posX, posY, LocalDrawColor(255, 000, 255, 000))
  906.                 else
  907.                     LocalDrawText("Kill Count: "..rCount, Menu.draws.ksdraw.size:Value(), posX, posY, LocalDrawColor(150, 255, 000, 000))
  908.                 end
  909.             end
  910.         end
  911.         function CHAMPION:CanAttack()
  912.             if not SPELLS:CheckSpellDelays({q = 0.33, w = 0.33, e = 0.33, r = 3.23}) then
  913.                 return false
  914.             end
  915.             if not Menu.qset.disaa:Value() then
  916.                 return true
  917.             end
  918.             if not ORB.Modes[ORBWALKER_MODE_COMBO] and not ORB.Modes[ORBWALKER_MODE_HARASS] then
  919.                 return true
  920.             end
  921.             if myHero.mana > myHero:GetSpellData(_Q).mana then
  922.                 return false
  923.             end
  924.             return true
  925.         end
  926.         function CHAMPION:CanMove()
  927.             if not SPELLS:CheckSpellDelays({q = 0.2, w = 0.2, e = 0.2, r = 3.13}) then
  928.                 return false
  929.             end
  930.             return true
  931.         end
  932.         function CHAMPION:GetQDmg()
  933.             local qLvl = myHero:GetSpellData(_Q).level
  934.             if qLvl == 0 then return 0 end
  935.             local baseDmg = 30
  936.             local lvlDmg = 20 * qLvl
  937.             local apDmg = myHero.ap * 0.3
  938.             return baseDmg + lvlDmg + apDmg
  939.         end
  940.         function CHAMPION:GetRDmg()
  941.             local rLvl = myHero:GetSpellData(_R).level
  942.             if rLvl == 0 then return 0 end
  943.             local baseDmg = 100
  944.             local lvlDmg = 150 * rLvl
  945.             local apDmg = myHero.ap * 0.75
  946.             return baseDmg + lvlDmg + apDmg
  947.         end
  948.     end,
  949.     KogMaw = function()
  950.         local KogMawVersion = 0.01
  951.         Menu = MenuElement({name = "Gamsteron KogMaw", id = "Gamsteron_KogMaw", type = _G.MENU, leftIcon = "https://raw.githubusercontent.com/gamsteron/GOS-External/master/Icons/kog.png"})
  952.         -- Q
  953.         Menu:MenuElement({name = "Q settings", id = "qset", type = _G.MENU})
  954.         Menu.qset:MenuElement({id = "combo", name = "Combo", value = true})
  955.         Menu.qset:MenuElement({id = "harass", name = "Harass", value = false})
  956.         Menu.qset:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  957.         -- W
  958.         Menu:MenuElement({name = "W settings", id = "wset", type = _G.MENU})
  959.         Menu.wset:MenuElement({id = "combo", name = "Combo", value = true})
  960.         Menu.wset:MenuElement({id = "harass", name = "Harass", value = false})
  961.         Menu.wset:MenuElement({id = "stopq", name = "Stop Q if has W buff", value = false})
  962.         Menu.wset:MenuElement({id = "stope", name = "Stop E if has W buff", value = false})
  963.         Menu.wset:MenuElement({id = "stopr", name = "Stop R if has W buff", value = false})
  964.         -- E
  965.         Menu:MenuElement({name = "E settings", id = "eset", type = _G.MENU})
  966.         Menu.eset:MenuElement({id = "combo", name = "Combo", value = true})
  967.         Menu.eset:MenuElement({id = "harass", name = "Harass", value = false})
  968.         Menu.eset:MenuElement({id = "emana", name = "Minimum Mana %", value = 20, min = 1, max = 100, step = 1})
  969.         Menu.eset:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  970.         -- R
  971.         Menu:MenuElement({name = "R settings", id = "rset", type = _G.MENU})
  972.         Menu.rset:MenuElement({id = "combo", name = "Combo", value = true})
  973.         Menu.rset:MenuElement({id = "harass", name = "Harass", value = false})
  974.         Menu.rset:MenuElement({id = "onlylow", name = "Only 0-40 % HP enemies", value = true})
  975.         Menu.rset:MenuElement({id = "stack", name = "Stop at x stacks", value = 3, min = 1, max = 9, step = 1})
  976.         Menu.rset:MenuElement({id = "rmana", name = "Minimum Mana %", value = 20, min = 1, max = 100, step = 1})
  977.         Menu.rset:MenuElement({name = "KS", id = "ksmenu", type = _G.MENU})
  978.         Menu.rset.ksmenu:MenuElement({id = "ksr", name = "KS - Enabled", value = true})
  979.         Menu.rset.ksmenu:MenuElement({id = "csksr", name = "KS -> Check R stacks", value = false})
  980.         Menu.rset:MenuElement({name = "Semi Manual", id = "semirkog", type = _G.MENU})
  981.         Menu.rset.semirkog:MenuElement({name = "Semi-Manual Key", id = "semir", key = string.byte("T")})
  982.         Menu.rset.semirkog:MenuElement({name = "Check R stacks", id = "semistacks", value = false})
  983.         Menu.rset.semirkog:MenuElement({name = "Only 0-40 % HP enemies", id = "semilow", value = false})
  984.         Menu.rset.semirkog:MenuElement({name = "Use on:", id = "useon", type = _G.MENU})
  985.         LocalCore:OnEnemyHeroLoad(function(hero) Menu.rset.semirkog.useon:MenuElement({id = hero.charName, name = hero.charName, value = true}) end)
  986.         Menu.rset:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  987.         -- Version
  988.         Menu:MenuElement({name = "Version " .. tostring(KogMawVersion), type = _G.SPACE, id = "verspace"})
  989.         CHAMPION = LocalCore:Class()
  990.         function CHAMPION:__init()
  991.             self.QData = {Delay = 0.25, Radius = 70, Range = 1175, Speed = 1650, Collision = true, Type = _G.SPELLTYPE_LINE}
  992.             self.EData = {Delay = 0.25, Radius = 120, Range = 1280, Speed = 1350, Collision = false, Type = _G.SPELLTYPE_LINE}
  993.             self.RData = {Delay = 1.2, Radius = 225, Range = 0, Speed = math.huge, Collision = false, Type = _G.SPELLTYPE_CIRCLE}
  994.             self.HasWBuff = false
  995.         end
  996.         function CHAMPION:Tick()
  997.             -- Is Attacking
  998.             if ORB:IsAutoAttacking() then
  999.                 return
  1000.             end
  1001.             -- Can Attack
  1002.             local AATarget = TS:GetComboTarget()
  1003.             if AATarget and not ORB.IsNone and ORB:CanAttack() then
  1004.                 return
  1005.             end
  1006.             -- W
  1007.             if ((ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.wset.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.wset.harass:Value())) and ORB:IsBeforeAttack(0.55) and SPELLS:IsReady(_W, {q = 0.33, w = 0.5, e = 0.33, r = 0.33}) then
  1008.                 local enemyList = OB:GetEnemyHeroes(610 + (20 * myHero:GetSpellData(_W).level) + myHero.boundingRadius - 35, true, 1)
  1009.                 if #enemyList > 0 and Control.CastSpell(HK_W) then
  1010.                     return
  1011.                 end
  1012.             end
  1013.             -- Check W Buff
  1014.             local HasWBuff = false
  1015.             for i = 0, myHero.buffCount do
  1016.                 local buff = myHero:GetBuff(i)
  1017.                 if buff and buff.count > 0 and buff.duration > 0 and buff.name == "KogMawBioArcaneBarrage" then
  1018.                     HasWBuff = true
  1019.                     break
  1020.                 end
  1021.             end
  1022.             self.HasWBuff = HasWBuff
  1023.             -- Get Mana Percent
  1024.             local manaPercent = 100 * myHero.mana / myHero.maxMana
  1025.             -- Save Mana
  1026.             local wMana = 40 - (myHero:GetSpellData(_W).currentCd * myHero.mpRegen)
  1027.             local meMana = myHero.mana - wMana
  1028.             if not(AATarget) and (LocalGameTimer() < SPELLS.LastW + 0.3 or LocalGameTimer() < SPELLS.LastWk + 0.3) then
  1029.                 return
  1030.             end
  1031.             -- R
  1032.             local result = false
  1033.             if meMana > myHero:GetSpellData(_R).mana and SPELLS:IsReady(_R, {q = 0.33, w = 0.15, e = 0.33, r = 0.5}) then
  1034.                 self.RData.Range = 900 + 300 * myHero:GetSpellData(_R).level
  1035.                 local enemyList = OB:GetEnemyHeroes(self.RData.Range, false, 0)
  1036.                 local rStacks = LocalCore:GetBuffCount(myHero, "kogmawlivingartillerycost") < Menu.rset.stack:Value()
  1037.                 local checkRStacksKS = Menu.rset.ksmenu.csksr:Value()
  1038.                 -- KS
  1039.                 if Menu.rset.ksmenu.ksr:Value() and (not checkRStacksKS or rStacks) then
  1040.                     local rTargets = {}
  1041.                     for i = 1, #enemyList do
  1042.                         local hero = enemyList[i]
  1043.                         local baseRDmg = 60 + (40 * myHero:GetSpellData(_R).level) + (myHero.bonusDamage * 0.65) + (myHero.ap * 0.25)
  1044.                         local rMultipier = math.floor(100 - (((hero.health + (hero.hpRegen * 3)) * 100) / hero.maxHealth))
  1045.                         local rDmg
  1046.                         if rMultipier > 60 then
  1047.                             rDmg = baseRDmg * 2
  1048.                         else
  1049.                             rDmg = baseRDmg * (1 + (rMultipier * 0.00833))
  1050.                         end
  1051.                         rDmg = DMG:CalculateDamage(myHero, hero, DAMAGE_TYPE_MAGICAL, rDmg)
  1052.                         local unitKillable = rDmg > hero.health + (hero.hpRegen * 2)
  1053.                         if unitKillable then
  1054.                             rTargets[#rTargets + 1] = hero
  1055.                         end
  1056.                     end
  1057.                     result = CastSpell(HK_R, TS:GetTarget(rTargets, 1), self.RData, Menu.rset.hitchance:Value() + 1)
  1058.                 end if result then return end
  1059.                 -- SEMI MANUAL
  1060.                 local checkRStacksSemi = Menu.rset.semirkog.semistacks:Value()
  1061.                 if Menu.rset.semirkog.semir:Value() and (not checkRStacksSemi or rStacks) then
  1062.                     local onlyLowR = Menu.rset.semirkog.semilow:Value()
  1063.                     local rTargets = {}
  1064.                     if onlyLowR then
  1065.                         for i = 1, #enemyList do
  1066.                             local hero = enemyList[i]
  1067.                             if hero and ((hero.health + (hero.hpRegen * 3)) * 100) / hero.maxHealth < 40 then
  1068.                                 rTargets[#rTargets + 1] = hero
  1069.                             end
  1070.                         end
  1071.                     else
  1072.                         rTargets = enemyList
  1073.                     end
  1074.                     result = CastSpell(HK_R, TS:GetTarget(rTargets, 1), self.RData, Menu.rset.hitchance:Value() + 1)
  1075.                 end if result then return end
  1076.                 -- Combo / Harass
  1077.                 if (ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.rset.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.rset.harass:Value()) then
  1078.                     local stopRIfW = Menu.wset.stopr:Value() and self.HasWBuff
  1079.                     if not stopRIfW and rStacks and manaPercent > Menu.rset.rmana:Value() then
  1080.                         local onlyLowR = Menu.rset.onlylow:Value()
  1081.                         local AATarget2
  1082.                         if onlyLowR and AATarget and (AATarget.health * 100) / AATarget.maxHealth > 39 then
  1083.                             AATarget2 = nil
  1084.                         else
  1085.                             AATarget2 = AATarget
  1086.                         end
  1087.                         local t
  1088.                         if AATarget2 then
  1089.                             t = AATarget2
  1090.                         else
  1091.                             local rTargets = {}
  1092.                             if onlyLowR then
  1093.                                 for i = 1, #enemyList do
  1094.                                     local hero = enemyList[i]
  1095.                                     if hero and ((hero.health + (hero.hpRegen * 3)) * 100) / hero.maxHealth < 40 then
  1096.                                         rTargets[#rTargets + 1] = hero
  1097.                                     end
  1098.                                 end
  1099.                             else
  1100.                                 rTargets = enemyList
  1101.                             end
  1102.                             t = TS:GetTarget(rTargets, 1)
  1103.                         end
  1104.                         result = CastSpell(HK_R, t, self.RData, Menu.rset.hitchance:Value() + 1)
  1105.                     end
  1106.                 end if result then return end
  1107.             end
  1108.             -- Q
  1109.             local stopQIfW = Menu.wset.stopq:Value() and self.HasWBuff
  1110.             if not stopQIfW and meMana > myHero:GetSpellData(_Q).mana and SPELLS:IsReady(_Q, {q = 0.5, w = 0.15, e = 0.33, r = 0.33}) then
  1111.                 -- Combo / Harass
  1112.                 if (ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.qset.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.qset.harass:Value()) then
  1113.                     local t
  1114.                     if AATarget then
  1115.                         t = AATarget
  1116.                     else
  1117.                         t = TS:GetTarget(OB:GetEnemyHeroes(1175, false, 0), 1)
  1118.                     end
  1119.                     result = CastSpell(HK_Q, t, self.QData, Menu.qset.hitchance:Value() + 1)
  1120.                 end
  1121.             end if result then return end
  1122.             -- E
  1123.             local stopEifW = Menu.wset.stope:Value() and self.HasWBuff
  1124.             if not stopEifW and manaPercent > Menu.eset.emana:Value() and meMana > myHero:GetSpellData(_E).mana and SPELLS:IsReady(_E, {q = 0.33, w = 0.15, e = 0.5, r = 0.33}) then
  1125.                 if (ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.eset.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.eset.harass:Value()) then
  1126.                     local t
  1127.                     if AATarget then
  1128.                         t = AATarget
  1129.                     else
  1130.                         t = TS:GetTarget(OB:GetEnemyHeroes(1280, false, 0), 1)
  1131.                     end
  1132.                     result = CastSpell(HK_E, t, self.EData, Menu.eset.hitchance:Value() + 1)
  1133.                 end
  1134.             end if result then return end
  1135.         end
  1136.         function CHAMPION:PreAttack(args)
  1137.             if ((ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.wset.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.wset.harass:Value())) and SPELLS:IsReady(_W, {q = 0.33, w = 0.5, e = 0.33, r = 0.33}) then
  1138.                 local enemyList = OB:GetEnemyHeroes(610 + (20 * myHero:GetSpellData(_W).level) + myHero.boundingRadius - 35, true, 1)
  1139.                 if #enemyList > 0 and Control.CastSpell(HK_W) then
  1140.                     args.Process = false
  1141.                 end
  1142.             end
  1143.         end
  1144.         function CHAMPION:CanMove()
  1145.             if not SPELLS:CheckSpellDelays({q = 0.2, w = 0, e = 0.2, r = 0.2}) then
  1146.                 return false
  1147.             end
  1148.             return true
  1149.         end
  1150.         function CHAMPION:CanAttack()
  1151.             if not SPELLS:CheckSpellDelays({q = 0.33, w = 0, e = 0.33, r = 0.33}) then
  1152.                 return false
  1153.             end
  1154.             return true
  1155.         end
  1156.     end,
  1157.     Vayne = function()
  1158.         require "MapPositionGOS"
  1159.         local VayneVersion = "0.03 - antimelee, antidash, interrupt etc."
  1160.         Menu = MenuElement({name = "Gamsteron Vayne", id = "Gamsteron_Vayne", type = _G.MENU, leftIcon = "https://raw.githubusercontent.com/gamsteron/GOS-External/master/Icons/vayne.png"})
  1161.         -- Q
  1162.         Menu:MenuElement({name = "Q settings", id = "qset", type = _G.MENU})
  1163.         Menu.qset:MenuElement({id = "combo", name = "Combo", value = true})
  1164.         Menu.qset:MenuElement({id = "harass", name = "Harass", value = false})
  1165.         -- E
  1166.         Menu:MenuElement({name = "E settings", id = "eset", type = _G.MENU})
  1167.         Menu.eset:MenuElement({id = "melee", name = "AntiMelee", value = true})
  1168.         Menu.eset:MenuElement({name = "Use on (AntiMelee):", id = "useonmelee", type = _G.MENU})
  1169.         LocalCore:OnEnemyHeroLoad(function(hero)
  1170.             local notMelee = {
  1171.                 ["Thresh"] = true,
  1172.                 ["Azir"] = true,
  1173.                 ["Velkoz"] = true
  1174.             }
  1175.             if LocalCore.IsMelee[hero.charName] and not notMelee[hero.charName] then
  1176.                 Menu.eset.useonmelee:MenuElement({id = hero.charName, name = hero.charName, value = true})
  1177.             end
  1178.         end)
  1179.         Menu.eset:MenuElement({id = "dash", name = "AntiDash - kha e, rangar r", value = true})
  1180.         Menu.eset:MenuElement({id = "interrupt", name = "Interrupt dangerous spells", value = true})
  1181.         Menu.eset:MenuElement({id = "combo", name = "Combo (Stun)", value = true})
  1182.         Menu.eset:MenuElement({id = "harass", name = "Harass (Stun)", value = false})
  1183.         Menu.eset:MenuElement({name = "Use on (Stun):", id = "useonstun", type = _G.MENU})
  1184.         LocalCore:OnEnemyHeroLoad(function(hero) Menu.eset.useonstun:MenuElement({id = hero.charName, name = hero.charName, value = true}) end)
  1185.         --R
  1186.         Menu:MenuElement({name = "R settings", id = "rset", type = _G.MENU})
  1187.         Menu.rset:MenuElement({id = "qready", name = "Only if Q ready or almost ready", value = true})
  1188.         Menu.rset:MenuElement({id = "combo", name = "Combo - if X enemies near vayne", value = true})
  1189.         Menu.rset:MenuElement({id = "xcount", name = "  ^^^ X enemies ^^^", value = 3, min = 1, max = 5, step = 1})
  1190.         Menu.rset:MenuElement({id = "xdistance", name = "^^^ max. distance ^^^", value = 500, min = 250, max = 750, step = 50})
  1191.         -- Version
  1192.         Menu:MenuElement({name = "Version " .. tostring(VayneVersion), type = _G.SPACE, id = "verspace"})
  1193.         CHAMPION = LocalCore:Class()
  1194.         function CHAMPION:__init()
  1195.             _G.GamsteronMenuSpell.isaaa:Value(false)
  1196.             self.LastReset = 0
  1197.             self.EData = {Delay = 0.5, Radius = 0, Range = 550 - 35, Speed = 2000, Collision = false, Type = _G.SPELLTYPE_LINE}
  1198.         end
  1199.         function CHAMPION:Tick()
  1200.            
  1201.             -- reset attack after Q
  1202.             if LocalGameCanUseSpell(_Q) ~= 0 and LocalGameTimer() > self.LastReset + 1 and LocalCore:HasBuff(myHero, "vaynetumblebonus") then
  1203.                 ORB:__OnAutoAttackReset()
  1204.                 self.LastReset = LocalGameTimer()
  1205.             end
  1206.             -- reset attack after Q
  1207.            
  1208.             local result = false
  1209.            
  1210.             -- r
  1211.             if ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.rset.combo:Value() and SPELLS:IsReady(_R, {q = 0.5, w = 0, e = 0.5, r = 0.5}) then
  1212.                 local canR = true
  1213.                 if Menu.rset.qready:Value() then
  1214.                     canR = false
  1215.                     if LocalGameCanUseSpell(_Q) == 0 then canR = true end
  1216.                     if LocalGameCanUseSpell(_Q) == 32 and myHero.mana > myHero:GetSpellData(_Q).mana and myHero:GetSpellData(_Q).currentCd < 0.75 then canR = true end
  1217.                 end
  1218.                 if canR then
  1219.                     local countEnemies = 0
  1220.                     for i = 1, LocalGameHeroCount() do
  1221.                         local hero = LocalGameHero(i)
  1222.                         if LocalCore:IsValidTarget(hero) and hero.team == LocalCore.TEAM_ENEMY and myHero.pos:DistanceTo(hero.pos) < Menu.rset.xdistance:Value() and not OB:IsHeroImmortal(hero, false) then
  1223.                             countEnemies = countEnemies + 1
  1224.                         end
  1225.                     end
  1226.                     if countEnemies >= Menu.rset.xcount:Value() then
  1227.                         result = Control.CastSpell(HK_R)
  1228.                     end
  1229.                 end
  1230.             end
  1231.             -- r
  1232.            
  1233.             -- e
  1234.             if not result and SPELLS:IsReady(_E, {q = 0.75, w = 0, e = 0.75, r = 0}) then
  1235.                
  1236.                 -- e antiMelee
  1237.                 if Menu.eset.melee:Value() then
  1238.                     local meleeHeroes = {}
  1239.                     for i = 1, LocalGameHeroCount() do
  1240.                         local hero = LocalGameHero(i)
  1241.                         if LocalCore:IsValidTarget(hero) and hero.team == LocalCore.TEAM_ENEMY and hero.range < 400 and Menu.eset.useonmelee[hero.charName] and Menu.eset.useonmelee[hero.charName]:Value() and myHero.pos:DistanceTo(hero.pos) < hero.range + myHero.boundingRadius + hero.boundingRadius then
  1242.                             _G.table.insert(meleeHeroes, hero)
  1243.                         end
  1244.                     end
  1245.                     if #meleeHeroes > 0 then
  1246.                         _G.table.sort(meleeHeroes, function(a, b) return a.health + (a.totalDamage * 2) + (a.attackSpeed * 100) > b.health + (b.totalDamage * 2) + (b.attackSpeed * 100) end)
  1247.                         local meleeTarget = meleeHeroes[1]
  1248.                         if LocalCore:IsFacing(meleeTarget, myHero, 60) then
  1249.                             Control.CastSpell(HK_E, meleeTarget)
  1250.                             result = true
  1251.                         end
  1252.                     end
  1253.                 end
  1254.                 -- e antiMelee
  1255.                
  1256.                 -- e antiDash
  1257.                 if not result and Menu.eset.dash:Value() then
  1258.                     for i = 1, LocalGameHeroCount() do
  1259.                         local hero = LocalGameHero(i)
  1260.                         if LocalCore:IsValidTarget(hero) and hero.team == LocalCore.TEAM_ENEMY then
  1261.                             local path = hero.pathing
  1262.                             if path and path.isDashing and hero.posTo and myHero.pos:DistanceTo(hero.posTo) < 500 and LocalCore:IsFacing(hero, myHero, 75) then
  1263.                                 local extpos = hero.pos:Extended(hero.posTo, path.dashSpeed * (0.07 + _G.LATENCY))
  1264.                                 if myHero.pos:DistanceTo(extpos) < 550 + myHero.boundingRadius + hero.boundingRadius then
  1265.                                     Control.CastSpell(HK_E, hero)
  1266.                                     result = true
  1267.                                     break
  1268.                                 end
  1269.                             end
  1270.                         end
  1271.                     end
  1272.                 end
  1273.                 -- e antiDash
  1274.                
  1275.                 -- e stun
  1276.                 if not result and ((ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.eset.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.eset.harass:Value())) then
  1277.                     local eRange = self.EData.Range + myHero.boundingRadius
  1278.                     for i = 1, LocalGameHeroCount() do
  1279.                         local hero = LocalGameHero(i)
  1280.                         if LocalCore:IsValidTarget(hero) and hero.team == LocalCore.TEAM_ENEMY and myHero.pos:DistanceTo(hero.pos) < eRange + hero.boundingRadius and not OB:IsHeroImmortal(hero, false) then
  1281.                             if Menu.eset.useonstun[hero.charName] and Menu.eset.useonstun[hero.charName]:Value() and CheckWall(myHero.pos, hero:GetPrediction(self.EData.Delay + 0.06 + LATENCY, self.EData.Speed), 475) then
  1282.                                 result = Control.CastSpell(HK_E, hero)
  1283.                                 break
  1284.                             end
  1285.                         end
  1286.                     end
  1287.                 end
  1288.                 -- e stun
  1289.             end
  1290.             -- e
  1291.            
  1292.             -- q
  1293.             if not result and SPELLS:IsReady(_Q, {q = 0.5, w = 0, e = 0.5, r = 0}) then
  1294.                
  1295.                 -- Is Attacking
  1296.                 local isAttacking = false
  1297.                 if ORB:IsAutoAttacking() then
  1298.                     isAttacking = true
  1299.                 end
  1300.                 -- Can Attack
  1301.                 local AATarget = TS:GetComboTarget()
  1302.                 if AATarget and not ORB.IsNone and ORB:CanAttack() then
  1303.                     isAttacking = true
  1304.                 end
  1305.                 --Q
  1306.                 if not isAttacking and ((ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.qset.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.qset.harass:Value())) then
  1307.                     local mePos = myHero.pos
  1308.                     local extended = Vector(myHero.pos):Extended(Vector(_G.mousePos), 300)
  1309.                     local meRange = myHero.range + myHero.boundingRadius
  1310.                     for i = 1, LocalGameHeroCount() do
  1311.                         local hero = LocalGameHero(i)
  1312.                         if LocalCore:IsValidTarget(hero) and hero.team == LocalCore.TEAM_ENEMY and extended and Vector(extended):DistanceTo(hero.pos) < meRange + hero.boundingRadius - 35 and not OB:IsHeroImmortal(hero, true) then
  1313.                             result = Control.CastSpell(HK_Q)
  1314.                             break
  1315.                         end
  1316.                     end
  1317.                 end
  1318.                
  1319.             end
  1320.             -- q
  1321.            
  1322.             return result
  1323.         end
  1324.         function CHAMPION:Interrupter()
  1325.             INTERRUPTER = LocalCore:__Interrupter()
  1326.             INTERRUPTER:OnInterrupt(function(enemy)
  1327.                 if Menu.eset.interrupt:Value() and SPELLS:IsReady(_E, {q = 0.75, w = 0, e = 0.5, r = 0}) and enemy.pos:ToScreen().onScreen and myHero.pos:DistanceTo(enemy.pos) < 550 + myHero.boundingRadius + enemy.boundingRadius - 35 then
  1328.                     Control.CastSpell(HK_E, enemy)
  1329.                 end
  1330.             end)
  1331.         end
  1332.         function CHAMPION:CanAttack()
  1333.             if not SPELLS:CheckSpellDelays({q = 0.3, w = 0, e = 0.5, r = 0}) then
  1334.                 return false
  1335.             end
  1336.             return true
  1337.         end
  1338.         function CHAMPION:CanMove()
  1339.             if not SPELLS:CheckSpellDelays({q = 0.2, w = 0, e = 0.4, r = 0}) then
  1340.                 return false
  1341.             end
  1342.             return true
  1343.         end
  1344.     end,
  1345.     Brand = function()
  1346.         local BrandVersion = "0.02 - fixed q casting, no bugs, faster combo"
  1347.         Menu = MenuElement({name = "Gamsteron Brand", id = "Gamsteron_Brand", type = _G.MENU, leftIcon = "https://raw.githubusercontent.com/gamsteron/GOS-External/master/Icons/x1xxbrandx3xx.png"})
  1348.         -- Q
  1349.         Menu:MenuElement({name = "Q settings", id = "qset", type = _G.MENU})
  1350.         -- KS
  1351.         Menu.qset:MenuElement({name = "KS", id = "killsteal", type = _G.MENU})
  1352.         Menu.qset.killsteal:MenuElement({id = "enabled", name = "Enabled", value = true})
  1353.         Menu.qset.killsteal:MenuElement({id = "minhp", name = "minimum enemy hp", value = 200, min = 1, max = 300, step = 1})
  1354.         Menu.qset.killsteal:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  1355.         -- Auto
  1356.         Menu.qset:MenuElement({name = "Auto", id = "auto", type = _G.MENU})
  1357.         Menu.qset.auto:MenuElement({id = "stun", name = "Auto Stun", value = true})
  1358.         Menu.qset.auto:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  1359.         -- Combo / Harass
  1360.         Menu.qset:MenuElement({name = "Combo / Harass", id = "comhar", type = _G.MENU})
  1361.         Menu.qset.comhar:MenuElement({id = "combo", name = "Combo", value = true})
  1362.         Menu.qset.comhar:MenuElement({id = "harass", name = "Harass", value = false})
  1363.         Menu.qset.comhar:MenuElement({id = "stun", name = "Only if will stun", value = true})
  1364.         Menu.qset.comhar:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  1365.         -- W
  1366.         Menu:MenuElement({name = "W settings", id = "wset", type = _G.MENU})
  1367.         Menu.wset:MenuElement({id = "disaa", name = "Disable attack if ready or almostReady", value = true})
  1368.         -- KS
  1369.         Menu.wset:MenuElement({name = "KS", id = "killsteal", type = _G.MENU})
  1370.         Menu.wset.killsteal:MenuElement({id = "enabled", name = "Enabled", value = true})
  1371.         Menu.wset.killsteal:MenuElement({id = "minhp", name = "minimum enemy hp", value = 200, min = 1, max = 300, step = 1})
  1372.         Menu.wset.killsteal:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  1373.         -- Auto
  1374.         Menu.wset:MenuElement({name = "Auto", id = "auto", type = _G.MENU})
  1375.         Menu.wset.auto:MenuElement({id = "enabled", name = "Enabled", value = true})
  1376.         Menu.wset.auto:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  1377.         -- Combo / Harass
  1378.         Menu.wset:MenuElement({name = "Combo / Harass", id = "comhar", type = _G.MENU})
  1379.         Menu.wset.comhar:MenuElement({id = "combo", name = "Combo", value = true})
  1380.         Menu.wset.comhar:MenuElement({id = "harass", name = "Harass", value = false})
  1381.         Menu.wset.comhar:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  1382.         -- E
  1383.         Menu:MenuElement({name = "E settings", id = "eset", type = _G.MENU})
  1384.         Menu.eset:MenuElement({id = "disaa", name = "Disable attack if ready or almostReady", value = true})
  1385.         -- KS
  1386.         Menu.eset:MenuElement({name = "KS", id = "killsteal", type = _G.MENU})
  1387.         Menu.eset.killsteal:MenuElement({id = "enabled", name = "Enabled", value = true})
  1388.         Menu.eset.killsteal:MenuElement({id = "minhp", name = "minimum enemy hp", value = 100, min = 1, max = 300, step = 1})
  1389.         -- Auto
  1390.         Menu.eset:MenuElement({name = "Auto", id = "auto", type = _G.MENU})
  1391.         Menu.eset.auto:MenuElement({id = "stun", name = "If Q ready | no collision & W not ready $ mana for Q + E", value = true})
  1392.         Menu.eset.auto:MenuElement({id = "passive", name = "If Q not ready & W not ready $ enemy has passive buff", value = true})
  1393.         -- Combo / Harass
  1394.         Menu.eset:MenuElement({name = "Combo / Harass", id = "comhar", type = _G.MENU})
  1395.         Menu.eset.comhar:MenuElement({id = "combo", name = "Combo", value = true})
  1396.         Menu.eset.comhar:MenuElement({id = "harass", name = "Harass", value = false})
  1397.         --R
  1398.         Menu:MenuElement({name = "R settings", id = "rset", type = _G.MENU})
  1399.         -- Auto
  1400.         Menu.rset:MenuElement({name = "Auto", id = "auto", type = _G.MENU})
  1401.         Menu.rset.auto:MenuElement({id = "enabled", name = "Enabled", value = true})
  1402.         Menu.rset.auto:MenuElement({id = "xenemies", name = ">= X enemies near target", value = 2, min = 1, max = 4, step = 1})
  1403.         Menu.rset.auto:MenuElement({id = "xrange", name = "< X distance enemies to target", value = 300, min = 100, max = 600, step = 50})
  1404.         -- Combo / Harass
  1405.         Menu.rset:MenuElement({name = "Combo / Harass", id = "comhar", type = _G.MENU})
  1406.         Menu.rset.comhar:MenuElement({id = "combo", name = "Use R Combo", value = true})
  1407.         Menu.rset.comhar:MenuElement({id = "harass", name = "Use R Harass", value = false})
  1408.         Menu.rset.comhar:MenuElement({id = "xenemies", name = ">= X enemies near target", value = 1, min = 1, max = 4, step = 1})
  1409.         Menu.rset.comhar:MenuElement({id = "xrange", name = "< X distance enemies to target", value = 300, min = 100, max = 600, step = 50})
  1410.         -- Version
  1411.         Menu:MenuElement({name = "Version " .. tostring(BrandVersion), type = _G.SPACE, id = "verspace"})
  1412.         CHAMPION = LocalCore:Class()
  1413.         function CHAMPION:__init()
  1414.             _G.GamsteronMenuSpell.isaaa:Value(false);
  1415.             self.ETarget = nil
  1416.             self.QData = {Delay = 0.25, Radius = 60, Range = 1085, Speed = 1600, Collision = true, Type = _G.SPELLTYPE_LINE}
  1417.             self.WData = {Delay = 0.9, Radius = 260, Range = 880, Speed = math.huge, Collision = false, Type = _G.SPELLTYPE_CIRCLE}
  1418.         end
  1419.         function CHAMPION:Tick()
  1420.             -- Is Attacking
  1421.             if ORB:IsAutoAttacking() then
  1422.                 return
  1423.             end
  1424.             -- Q
  1425.             if SPELLS:IsReady(_Q, {q = 0.5, w = 0.53, e = 0.53, r = 0.33}) then
  1426.                 -- KS
  1427.                 if Menu.qset.killsteal.enabled:Value() then
  1428.                     local baseDmg = 50
  1429.                     local lvlDmg = 30 * myHero:GetSpellData(_Q).level
  1430.                     local apDmg = myHero.ap * 0.55
  1431.                     local qDmg = baseDmg + lvlDmg + apDmg
  1432.                     local minHP = Menu.qset.killsteal.minhp:Value()
  1433.                     if qDmg > minHP then
  1434.                         local enemyList = OB:GetEnemyHeroes(1050, false, 0)
  1435.                         for i = 1, #enemyList do
  1436.                             local qTarget = enemyList[i]
  1437.                             if LocalCore:IsValidTarget(qTarget, Obj_AI_Hero) and qTarget.health > minHP and qTarget.health < DMG:CalculateDamage(myHero, qTarget, DAMAGE_TYPE_MAGICAL, qDmg) then
  1438.                                 if CastSpell(HK_Q, qTarget, self.QData, Menu.qset.killsteal.hitchance:Value() + 1) then
  1439.                                     return
  1440.                                 end
  1441.                             end
  1442.                         end
  1443.                     end
  1444.                 end
  1445.                 -- Combo Harass
  1446.                 if (ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.qset.comhar.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.qset.comhar.harass:Value()) then
  1447.                     if LocalGameTimer() < SPELLS.LastEk + 1 and LocalGameTimer() > SPELLS.LastE + 0.33 and LocalCore:IsValidTarget(self.ETarget) and self.ETarget:GetCollision(self.QData.Radius, self.QData.Speed, self.QData.Delay) == 0 then
  1448.                         if CastSpell(HK_Q, self.ETarget, self.QData, Menu.qset.comhar.hitchance:Value() + 1) then
  1449.                             return
  1450.                         end
  1451.                     end
  1452.                     local blazeList = {}
  1453.                     local enemyList = OB:GetEnemyHeroes(1050, false, 0)
  1454.                     for i = 1, #enemyList do
  1455.                         local unit = enemyList[i]
  1456.                         if LocalCore:IsValidTarget(unit, Obj_AI_Hero) and LocalCore:GetBuffDuration(unit, "brandablaze") > 0.5 and unit:GetCollision(self.QData.Radius, self.QData.Speed, self.QData.Delay) == 0 then
  1457.                             blazeList[#blazeList + 1] = unit
  1458.                         end
  1459.                     end
  1460.                     if CastSpell(HK_Q, TS:GetTarget(blazeList, 1), self.QData, Menu.qset.comhar.hitchance:Value() + 1) then
  1461.                         return
  1462.                     end
  1463.                     if not Menu.qset.comhar.stun:Value() and LocalGameTimer() > SPELLS.LastWk + 1.33 and LocalGameTimer() > SPELLS.LastEk + 0.77 and LocalGameTimer() > SPELLS.LastRk + 0.77 then
  1464.                         if CastSpell(HK_Q, TS:GetTarget(OB:GetEnemyHeroes(1050, false, 0), 1), self.QData, Menu.qset.comhar.hitchance:Value() + 1) then
  1465.                             return
  1466.                         end
  1467.                     end
  1468.                     -- Auto
  1469.                 elseif Menu.qset.auto.stun:Value() then
  1470.                     if LocalGameTimer() < SPELLS.LastEk + 1 and LocalGameTimer() > SPELLS.LastE + 0.33 and LocalCore:IsValidTarget(self.ETarget) and self.ETarget:GetCollision(self.QData.Radius, self.QData.Speed, self.QData.Delay) == 0 then
  1471.                         if CastSpell(HK_Q, self.ETarget, self.QData, Menu.qset.auto.hitchance:Value() + 1) then
  1472.                             return
  1473.                         end
  1474.                     end
  1475.                     local blazeList = {}
  1476.                     local enemyList = OB:GetEnemyHeroes(1050, false, 0)
  1477.                     for i = 1, #enemyList do
  1478.                         local unit = enemyList[i]
  1479.                         if LocalCore:IsValidTarget(unit, Obj_AI_Hero) and LocalCore:GetBuffDuration(unit, "brandablaze") > 0.5 and unit:GetCollision(self.QData.Radius, self.QData.Speed, self.QData.Delay) == 0 then
  1480.                             blazeList[#blazeList + 1] = unit
  1481.                         end
  1482.                     end
  1483.                     if CastSpell(HK_Q, TS:GetTarget(blazeList, 1), self.QData, Menu.qset.auto.hitchance:Value() + 1) then
  1484.                         return
  1485.                     end
  1486.                 end
  1487.             end
  1488.             -- E
  1489.             if SPELLS:IsReady(_E, {q = 0.33, w = 0.53, e = 0.5, r = 0.33}) then
  1490.                 -- antigap
  1491.                 local enemyList = OB:GetEnemyHeroes(635, false, 0)
  1492.                 for i = 1, #enemyList do
  1493.                     local unit = enemyList[i]
  1494.                     if LocalCore:IsValidTarget(unit, Obj_AI_Hero) and LocalCore:GetDistanceSquared(myHero.pos, unit.pos) < 300 * 300 and Control.CastSpell(HK_E, unit) then
  1495.                         return
  1496.                     end
  1497.                 end
  1498.                 -- KS
  1499.                 if Menu.eset.killsteal.enabled:Value() then
  1500.                     local baseDmg = 50
  1501.                     local lvlDmg = 20 * myHero:GetSpellData(_E).level
  1502.                     local apDmg = myHero.ap * 0.35
  1503.                     local eDmg = baseDmg + lvlDmg + apDmg
  1504.                     local minHP = Menu.eset.killsteal.minhp:Value()
  1505.                     if eDmg > minHP then
  1506.                         for i = 1, #enemyList do
  1507.                             local unit = enemyList[i]
  1508.                             if LocalCore:IsValidTarget(unit, Obj_AI_Hero) and unit.health > minHP and unit.health < DMG:CalculateDamage(myHero, unit, DAMAGE_TYPE_MAGICAL, eDmg) and Control.CastSpell(HK_E, unit) then
  1509.                                 return
  1510.                             end
  1511.                         end
  1512.                     end
  1513.                 end
  1514.                 -- Combo / Harass
  1515.                 if (ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.eset.comhar.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.eset.comhar.harass:Value()) then
  1516.                     local blazeList = {}
  1517.                     for i = 1, #enemyList do
  1518.                         local unit = enemyList[i]
  1519.                         if LocalCore:IsValidTarget(unit, Obj_AI_Hero) and LocalCore:GetBuffDuration(unit, "brandablaze") > 0.33 then
  1520.                             blazeList[#blazeList + 1] = unit
  1521.                         end
  1522.                     end
  1523.                     local eTarget = TS:GetTarget(blazeList, 1)
  1524.                     if LocalCore:IsValidTarget(eTarget, Obj_AI_Hero) and Control.CastSpell(HK_E, eTarget) then
  1525.                         self.ETarget = eTarget
  1526.                         return
  1527.                     end
  1528.                     if LocalGameTimer() > SPELLS.LastQk + 0.77 and LocalGameTimer() > SPELLS.LastWk + 1.33 and LocalGameTimer() > SPELLS.LastRk + 0.77 then
  1529.                         eTarget = TS:GetTarget(enemyList, 1)
  1530.                         if LocalCore:IsValidTarget(eTarget, Obj_AI_Hero) and Control.CastSpell(HK_E, eTarget) then
  1531.                             self.ETarget = eTarget
  1532.                             return
  1533.                         end
  1534.                     end
  1535.                     -- Auto
  1536.                 elseif myHero:GetSpellData(_Q).level > 0 and myHero:GetSpellData(_W).level > 0 then
  1537.                     -- EQ -> if Q ready | no collision & W not ready $ mana for Q + E
  1538.                     if Menu.eset.auto.stun:Value() and myHero.mana > myHero:GetSpellData(_Q).mana + myHero:GetSpellData(_E).mana then
  1539.                         if (LocalGameCanUseSpell(_Q) == 0 or myHero:GetSpellData(_Q).currentCd < 0.75) and not(LocalGameCanUseSpell(_W) == 0 or myHero:GetSpellData(_W).currentCd < 0.75) then
  1540.                             local blazeList = {}
  1541.                             local enemyList = OB:GetEnemyHeroes(635, false, 0)
  1542.                             for i = 1, #enemyList do
  1543.                                 local unit = enemyList[i]
  1544.                                 if LocalCore:IsValidTarget(unit, Obj_AI_Hero) and LocalCore:GetBuffDuration(unit, "brandablaze") > 0.33 then
  1545.                                     blazeList[#blazeList + 1] = unit
  1546.                                 end
  1547.                             end
  1548.                             local eTarget = TS:GetTarget(blazeList, 1)
  1549.                             if LocalCore:IsValidTarget(eTarget, Obj_AI_Hero) and eTarget:GetCollision(self.QData.Radius, self.QData.Speed, self.QData.Delay) == 0 and Control.CastSpell(HK_E, eTarget) then
  1550.                                 return
  1551.                             end
  1552.                             if LocalGameTimer() > SPELLS.LastQk + 0.77 and LocalGameTimer() > SPELLS.LastWk + 1.33 and LocalGameTimer() > SPELLS.LastRk + 0.77 then
  1553.                                 eTarget = TS:GetTarget(enemyList, 1)
  1554.                                 if LocalCore:IsValidTarget(eTarget, Obj_AI_Hero) and eTarget:GetCollision(self.QData.Radius, self.QData.Speed, self.QData.Delay) == 0 and Control.CastSpell(HK_E, eTarget) then
  1555.                                     self.ETarget = eTarget
  1556.                                     return
  1557.                                 end
  1558.                             end
  1559.                         end
  1560.                     end
  1561.                     -- Passive -> If Q not ready & W not ready $ enemy has passive buff
  1562.                     if Menu.eset.auto.passive:Value() and not(LocalGameCanUseSpell(_Q) == 0 or myHero:GetSpellData(_Q).currentCd < 0.75) and not(LocalGameCanUseSpell(_W) == 0 or myHero:GetSpellData(_W).currentCd < 0.75) then
  1563.                         local blazeList = {}
  1564.                         local enemyList = OB:GetEnemyHeroes(670, false, 0)
  1565.                         for i = 1, #enemyList do
  1566.                             local unit = enemyList[i]
  1567.                             if LocalCore:IsValidTarget(unit, Obj_AI_Hero) and LocalCore:GetBuffDuration(unit, "brandablaze") > 0.33 then
  1568.                                 blazeList[#blazeList + 1] = unit
  1569.                             end
  1570.                         end
  1571.                         local eTarget = TS:GetTarget(blazeList, 1)
  1572.                         if LocalCore:IsValidTarget(eTarget, Obj_AI_Hero) and Control.CastSpell(HK_E, eTarget) then
  1573.                             self.ETarget = eTarget
  1574.                             return
  1575.                         end
  1576.                     end
  1577.                 end
  1578.             end
  1579.             -- W
  1580.             if SPELLS:IsReady(_W, {q = 0.33, w = 0.5, e = 0.33, r = 0.33}) then
  1581.                 -- KS
  1582.                 if Menu.wset.killsteal.enabled:Value() then
  1583.                     local baseDmg = 30
  1584.                     local lvlDmg = 45 * myHero:GetSpellData(_W).level
  1585.                     local apDmg = myHero.ap * 0.6
  1586.                     local wDmg = baseDmg + lvlDmg + apDmg
  1587.                     local minHP = Menu.wset.killsteal.minhp:Value()
  1588.                     if wDmg > minHP then
  1589.                         local enemyList = OB:GetEnemyHeroes(950, false, 0)
  1590.                         for i = 1, #enemyList do
  1591.                             local wTarget = enemyList[i]
  1592.                             if LocalCore:IsValidTarget(wTarget, Obj_AI_Hero) and wTarget.health > minHP and wTarget.health < DMG:CalculateDamage(myHero, wTarget, DAMAGE_TYPE_MAGICAL, wDmg) and CastSpell(HK_W, wTarget, self.WData, Menu.wset.killsteal.hitchance:Value() + 1) then
  1593.                                 return;
  1594.                             end
  1595.                         end
  1596.                     end
  1597.                 end
  1598.                 -- Combo / Harass
  1599.                 if (ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.wset.comhar.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.wset.comhar.harass:Value()) then
  1600.                     local blazeList = {}
  1601.                     local enemyList = OB:GetEnemyHeroes(950, false, 0)
  1602.                     for i = 1, #enemyList do
  1603.                         local unit = enemyList[i]
  1604.                         if LocalCore:GetBuffDuration(unit, "brandablaze") > 1.33 then
  1605.                             blazeList[#blazeList + 1] = unit
  1606.                         end
  1607.                     end
  1608.                     local wTarget = TS:GetTarget(blazeList, 1)
  1609.                     if LocalCore:IsValidTarget(wTarget, Obj_AI_Hero) and CastSpell(HK_W, wTarget, self.WData, Menu.wset.comhar.hitchance:Value() + 1) then
  1610.                         return
  1611.                     end
  1612.                     if LocalGameTimer() > SPELLS.LastQk + 0.77 and LocalGameTimer() > SPELLS.LastEk + 0.77 and LocalGameTimer() > SPELLS.LastRk + 0.77 then
  1613.                         wTarget = TS:GetTarget(enemyList, 1)
  1614.                         if LocalCore:IsValidTarget(wTarget, Obj_AI_Hero) and CastSpell(HK_W, wTarget, self.WData, Menu.wset.comhar.hitchance:Value() + 1) then
  1615.                             return
  1616.                         end
  1617.                     end
  1618.                     -- Auto
  1619.                 elseif Menu.wset.auto.enabled:Value() then
  1620.                     for i = 1, 3 do
  1621.                         local blazeList = {}
  1622.                         local enemyList = OB:GetEnemyHeroes(1200 - (i * 100), false, 0)
  1623.                         for j = 1, #enemyList do
  1624.                             local unit = enemyList[j]
  1625.                             if LocalCore:IsValidTarget(unit, Obj_AI_Hero) and LocalCore:GetBuffDuration(unit, "brandablaze") > 1.33 then
  1626.                                 blazeList[#blazeList + 1] = unit
  1627.                             end
  1628.                         end
  1629.                         local wTarget = TS:GetTarget(blazeList, 1);
  1630.                         if LocalCore:IsValidTarget(wTarget, Obj_AI_Hero) then
  1631.                             if CastSpell(HK_W, wTarget, self.WData, Menu.wset.auto.hitchance:Value() + 1) then
  1632.                                 return
  1633.                             end
  1634.                         end
  1635.                         if LocalGameTimer() > SPELLS.LastQk + 0.77 and LocalGameTimer() > SPELLS.LastEk + 0.77 and LocalGameTimer() > SPELLS.LastRk + 0.77 then
  1636.                             wTarget = TS:GetTarget(enemyList, 1)
  1637.                             if LocalCore:IsValidTarget(wTarget, Obj_AI_Hero) then
  1638.                                 if CastSpell(HK_W, wTarget, self.WData, Menu.wset.auto.hitchance:Value() + 1) then
  1639.                                     return
  1640.                                 end
  1641.                             end
  1642.                         end
  1643.                     end
  1644.                 end
  1645.             end
  1646.             -- R
  1647.             if SPELLS:IsReady(_R, {q = 0.33, w = 0.33, e = 0.33, r = 0.5}) then
  1648.                 -- Combo / Harass
  1649.                 if (ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.rset.comhar.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.rset.comhar.harass:Value()) then
  1650.                     local enemyList = OB:GetEnemyHeroes(750, false, 0)
  1651.                     local xRange = Menu.rset.comhar.xrange:Value()
  1652.                     local xEnemies = Menu.rset.comhar.xenemies:Value()
  1653.                     for i = 1, #enemyList do
  1654.                         local count = 0
  1655.                         local rTarget = enemyList[i]
  1656.                         if LocalCore:IsValidTarget(rTarget, Obj_AI_Hero) then
  1657.                             for j = 1, #enemyList do
  1658.                                 if i ~= j then
  1659.                                     local unit = enemyList[j]
  1660.                                     if LocalCore:IsValidTarget(unit, Obj_AI_Hero) and rTarget.pos:DistanceTo(unit.pos) < xRange then
  1661.                                         count = count + 1
  1662.                                     end
  1663.                                 end
  1664.                             end
  1665.                             if count >= xEnemies and Control.CastSpell(HK_R, rTarget) then
  1666.                                 return
  1667.                             end
  1668.                         end
  1669.                     end
  1670.                     -- Auto
  1671.                 elseif Menu.rset.auto.enabled:Value() then
  1672.                     local enemyList = OB:GetEnemyHeroes(750, false, 0)
  1673.                     local xRange = Menu.rset.auto.xrange:Value()
  1674.                     local xEnemies = Menu.rset.auto.xenemies:Value()
  1675.                     for i = 1, #enemyList do
  1676.                         local count = 0
  1677.                         local rTarget = enemyList[i]
  1678.                         if LocalCore:IsValidTarget(rTarget, Obj_AI_Hero) then
  1679.                             for j = 1, #enemyList do
  1680.                                 if i ~= j then
  1681.                                     local unit = enemyList[j]
  1682.                                     if LocalCore:IsValidTarget(unit, Obj_AI_Hero) and rTarget.pos:DistanceTo(unit.pos) < xRange then
  1683.                                         count = count + 1
  1684.                                     end
  1685.                                 end
  1686.                             end
  1687.                             if count >= xEnemies and Control.CastSpell(HK_R, rTarget) then
  1688.                                 return
  1689.                             end
  1690.                         end
  1691.                     end
  1692.                 end
  1693.             end
  1694.         end
  1695.         function CHAMPION:CanMove()
  1696.             if not SPELLS:CheckSpellDelays({q = 0.2, w = 0.2, e = 0.2, r = 0.2}) then
  1697.                 return false
  1698.             end
  1699.             return true
  1700.         end
  1701.         function CHAMPION:CanAttack()
  1702.             if not SPELLS:CheckSpellDelays({q = 0.33, w = 0.33, e = 0.33, r = 0.33}) then
  1703.                 return false
  1704.             end
  1705.             -- LastHit, LaneClear
  1706.             if not ORB.Modes[ORBWALKER_MODE_COMBO] and not ORB.Modes[ORBWALKER_MODE_HARASS] then
  1707.                 return true
  1708.             end
  1709.             -- W
  1710.             local wData = myHero:GetSpellData(_W);
  1711.             if Menu.wset.disaa:Value() and wData.level > 0 and myHero.mana > wData.mana and (LocalGameCanUseSpell(_W) == 0 or wData.currentCd < 1) then
  1712.                 return false
  1713.             end
  1714.             -- E
  1715.             local eData = myHero:GetSpellData(_E);
  1716.             if Menu.eset.disaa:Value() and eData.level > 0 and myHero.mana > eData.mana and (LocalGameCanUseSpell(_E) == 0 or eData.currentCd < 1) then
  1717.                 return false
  1718.             end
  1719.             return true
  1720.         end
  1721.     end,
  1722.     Ezreal = function()
  1723.         local EzrealVersion = "0.02 - smoother and faster E usage"
  1724.         Menu = MenuElement({name = "Gamsteron Ezreal", id = "Gamsteron_Ezreal", type = _G.MENU, leftIcon = "https://raw.githubusercontent.com/gamsteron/GOS-External/master/Icons/ezreal.png"})
  1725.         -- E Manual
  1726.         Menu:MenuElement({name = "Manual E", id = "mane", type = _G.MENU})
  1727.         Menu.mane:MenuElement({id = "efake", name = "E Fake Key", value = false, key = string.byte("E")})
  1728.         Menu.mane:MenuElement({id = "elol", name = "E LoL Key", value = false, key = string.byte("L")})
  1729.         -- Auto Q
  1730.         Menu:MenuElement({name = "Auto Q", id = "autoq", type = _G.MENU})
  1731.         Menu.autoq:MenuElement({id = "enable", name = "Enable", value = true, key = string.byte("T"), toggle = true})
  1732.         Menu.autoq:MenuElement({id = "mana", name = "Q Auto min. mana percent", value = 50, min = 0, max = 100, step = 1})
  1733.         Menu.autoq:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  1734.         -- Q
  1735.         Menu:MenuElement({name = "Q settings", id = "qset", type = _G.MENU})
  1736.         Menu.qset:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  1737.         Menu.qset:MenuElement({id = "combo", name = "Combo", value = true})
  1738.         Menu.qset:MenuElement({id = "harass", name = "Harass", value = false})
  1739.         Menu.qset:MenuElement({id = "clearm", name = "LaneClear/LastHit", type = _G.MENU})
  1740.         Menu.qset.clearm:MenuElement({id = "lhenabled", name = "LastHit Enabled", value = true})
  1741.         Menu.qset.clearm:MenuElement({id = "lhmana", name = "LastHit Min. Mana %", value = 50, min = 0, max = 100, step = 5})
  1742.         Menu.qset.clearm:MenuElement({id = "lcenabled", name = "LaneClear Enabled", value = false})
  1743.         Menu.qset.clearm:MenuElement({id = "lcmana", name = "LaneClear Min. Mana %", value = 75, min = 0, max = 100, step = 5})
  1744.         -- W
  1745.         Menu:MenuElement({name = "W settings", id = "wset", type = _G.MENU})
  1746.         Menu.wset:MenuElement({id = "hitchance", name = "Hitchance", value = 1, drop = {"normal", "high"}})
  1747.         Menu.wset:MenuElement({id = "combo", name = "Combo", value = true})
  1748.         Menu.wset:MenuElement({id = "harass", name = "Harass", value = false})
  1749.         -- Drawings
  1750.         Menu:MenuElement({name = "Drawings", id = "draws", type = _G.MENU})
  1751.         Menu.draws:MenuElement({name = "Auto Q", id = "autoq", type = _G.MENU})
  1752.         Menu.draws.autoq:MenuElement({id = "enabled", name = "Enabled", value = true})
  1753.         Menu.draws.autoq:MenuElement({id = "size", name = "Text Size", value = 25, min = 1, max = 64, step = 1})
  1754.         Menu.draws.autoq:MenuElement({id = "custom", name = "Custom Position", value = false})
  1755.         Menu.draws.autoq:MenuElement({id = "posX", name = "Text Position Width", value = Game.Resolution().x * 0.5 - 150, min = 1, max = Game.Resolution().x, step = 1})
  1756.         Menu.draws.autoq:MenuElement({id = "posY", name = "Text Position Height", value = Game.Resolution().y * 0.5, min = 1, max = Game.Resolution().y, step = 1})
  1757.         Menu.draws:MenuElement({name = "Q Farm", id = "qfarm", type = _G.MENU})
  1758.         Menu.draws.qfarm:MenuElement({name = "LastHitable Minion", id = "lasthit", type = _G.MENU})
  1759.         Menu.draws.qfarm.lasthit:MenuElement({name = "Enabled", id = "enabled", value = true})
  1760.         Menu.draws.qfarm.lasthit:MenuElement({name = "Color", id = "color", color = LocalDrawColor(150, 255, 255, 255)})
  1761.         Menu.draws.qfarm.lasthit:MenuElement({name = "Width", id = "width", value = 3, min = 1, max = 10})
  1762.         Menu.draws.qfarm.lasthit:MenuElement({name = "Radius", id = "radius", value = 50, min = 1, max = 100})
  1763.         Menu.draws.qfarm:MenuElement({name = "Almost LastHitable Minion", id = "almostlasthit", type = _G.MENU})
  1764.         Menu.draws.qfarm.almostlasthit:MenuElement({name = "Enabled", id = "enabled", value = true})
  1765.         Menu.draws.qfarm.almostlasthit:MenuElement({name = "Color", id = "color", color = LocalDrawColor(150, 239, 159, 55)})
  1766.         Menu.draws.qfarm.almostlasthit:MenuElement({name = "Width", id = "width", value = 3, min = 1, max = 10})
  1767.         Menu.draws.qfarm.almostlasthit:MenuElement({name = "Radius", id = "radius", value = 50, min = 1, max = 100})
  1768.         -- Version
  1769.         Menu:MenuElement({name = "Version " .. tostring(EzrealVersion), type = _G.SPACE, id = "verspace"})
  1770.         CHAMPION = LocalCore:Class()
  1771.         function CHAMPION:__init()
  1772.             self.QData = {Delay = 0.25, Radius = 60, Range = 1150, Speed = 2000, Collision = true, Type = _G.SPELLTYPE_LINE}
  1773.             self.WData = {Delay = 0.25, Radius = 60, Range = 1150, Speed = 2000, Collision = false, Type = _G.SPELLTYPE_LINE}
  1774.             self.QFarm = nil
  1775.             self.LastEFake = 0
  1776.         end
  1777.         function CHAMPION:Farm()
  1778.             -- [ mana percent ]
  1779.             local manaPercent = 100 * myHero.mana / myHero.maxMana
  1780.            
  1781.             -- [ q farm ]
  1782.             if Menu.qset.clearm.lhenabled:Value() or Menu.qset.clearm.lcenabled:Value() then
  1783.                 if manaPercent > Menu.qset.clearm.lhmana:Value() then
  1784.                     self.QFarm:Tick()
  1785.                 end
  1786.             end
  1787.         end
  1788.         function CHAMPION:WndMsg(msg, wParam)
  1789.             if wParam == Menu.mane.efake:Key() then
  1790.                 self.LastEFake = os.clock()
  1791.             end
  1792.         end
  1793.         function CHAMPION:Tick()
  1794.            
  1795.             -- [ e manual ]
  1796.             if os.clock() < self.LastEFake + 0.5 and SPELLS:IsReady(_E, {q = 0.33, w = 0.33, e = 0.2, r = 0.77}) then
  1797.                 local key = Menu.mane.elol:Key()
  1798.                 LocalControlKeyDown(key)
  1799.                 LocalControlKeyUp(key)
  1800.                 LocalControlKeyDown(key)
  1801.                 LocalControlKeyUp(key)
  1802.                 LocalControlKeyDown(key)
  1803.                 LocalControlKeyUp(key)
  1804.                 _G.ORB_NEXT_CONTROLL = LocalGameTimer() + 0.25
  1805.             end
  1806.            
  1807.             -- [ is attacking ]
  1808.             if ORB:IsAutoAttacking() then
  1809.                 return
  1810.             end
  1811.            
  1812.             -- [ get attack target ]
  1813.             local AATarget = TS:GetComboTarget()
  1814.            
  1815.             -- [ can attack ]
  1816.             if AATarget and not ORB.IsNone and ORB:CanAttack() then
  1817.                 return
  1818.             end
  1819.            
  1820.             local result = false
  1821.            
  1822.             -- [ mana percent ]
  1823.             local manaPercent = 100 * myHero.mana / myHero.maxMana
  1824.            
  1825.             -- [ use q ]
  1826.             if SPELLS:IsReady(_Q, {q = 0.5, w = 0.33, e = 0.33, r = 1.13}) then
  1827.                
  1828.                 -- [ combo / harass ]
  1829.                 if (ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.qset.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.qset.harass:Value()) then
  1830.                     local QTarget
  1831.                     if AATarget then
  1832.                         QTarget = AATarget
  1833.                     else
  1834.                         QTarget = TS:GetTarget(OB:GetEnemyHeroes(1150, false, 0), 0)
  1835.                     end
  1836.                     result = CastSpell(HK_Q, QTarget, self.QData, Menu.qset.hitchance:Value() + 1)
  1837.                     -- [ auto ]
  1838.                 elseif Menu.autoq.enable:Value() and manaPercent > Menu.autoq.mana:Value() then
  1839.                     local enemyHeroes = OB:GetEnemyHeroes(1150, false, 0)
  1840.                     for i = 1, #enemyHeroes do
  1841.                         result = CastSpell(HK_Q, enemyHeroes[i], self.QData, Menu.autoq.hitchance:Value() + 1)
  1842.                         if result then break end
  1843.                     end
  1844.                 end
  1845.                
  1846.                 -- [ cast q clear ]
  1847.                 if not result and Menu.qset.clearm.lhenabled:Value() and not ORB.IsNone and not ORB.Modes[ORBWALKER_MODE_COMBO] and manaPercent > Menu.qset.clearm.lhmana:Value() then
  1848.                     -- [ last hit ]
  1849.                     local lhtargets = self.QFarm:GetLastHitTargets()
  1850.                     for i = 1, #lhtargets do
  1851.                         local unit = lhtargets[i]
  1852.                         if unit.alive and unit:GetCollision(self.QData.Radius + 35, self.QData.Speed, self.QData.Delay) == 1 then
  1853.                             result = Control.CastSpell(HK_Q, unit:GetPrediction(self.QData.Speed, self.QData.Delay))
  1854.                             if result then
  1855.                                 ORB:SetAttack(false)
  1856.                                 DelayAction(function() ORB:SetAttack(true) end, self.QData.Delay + (unit.pos:DistanceTo(myHero.pos) / self.QData.Speed) + 0.05)
  1857.                                 break
  1858.                             end
  1859.                         end
  1860.                     end
  1861.                 end
  1862.                 if not result and Menu.qset.clearm.lcenabled:Value() and ORB.Modes[ORBWALKER_MODE_LANECLEAR] and not self.QFarm:ShouldWait() and manaPercent > Menu.qset.clearm.lcmana:Value() then
  1863.                     -- [ enemy heroes ]
  1864.                     local enemyHeroes = OB:GetEnemyHeroes(self.Range, false, "spell")
  1865.                     for i = 1, #enemyHeroes do
  1866.                         result = CastSpell(HK_Q, enemyHeroes[i], self.QData, Menu.qset.hitchance:Value() + 1)
  1867.                         if result then break end
  1868.                     end if result then return end
  1869.                     -- [ lane clear ]
  1870.                     local lctargets = self.QFarm:GetLaneClearTargets()
  1871.                     for i = 1, #lctargets do
  1872.                         local unit = lctargets[i]
  1873.                         if unit.alive and unit:GetCollision(self.QData.Radius + 35, self.QData.Speed, self.QData.Delay) == 1 then
  1874.                             result = Control.CastSpell(HK_Q, unit:GetPrediction(self.QData.Speed, self.QData.Delay))
  1875.                             if result then break end
  1876.                         end
  1877.                     end
  1878.                 end
  1879.             end
  1880.            
  1881.             -- [ use w ]
  1882.             if not result and SPELLS:IsReady(_W, {q = 0.33, w = 0.5, e = 0.33, r = 1.13}) then
  1883.                 if (ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.wset.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.wset.harass:Value()) then
  1884.                     local WTarget
  1885.                     if AATarget then
  1886.                         WTarget = AATarget
  1887.                     else
  1888.                         WTarget = TS:GetTarget(OB:GetEnemyHeroes(1000, false, 0), 0)
  1889.                     end
  1890.                     CastSpell(HK_W, WTarget, self.WData, Menu.wset.hitchance:Value() + 1)
  1891.                 end
  1892.             end
  1893.         end
  1894.         function CHAMPION:Draw()
  1895.             if Menu.draws.autoq.enabled:Value() then
  1896.                 local mePos = myHero.pos:To2D()
  1897.                 local isCustom = Menu.draws.autoq.custom:Value()
  1898.                 local posX, posY
  1899.                 if isCustom then
  1900.                     posX = Menu.draws.autoq.posX:Value()
  1901.                     posY = Menu.draws.autoq.posY:Value()
  1902.                 else
  1903.                     posX = mePos.x - 50
  1904.                     posY = mePos.y
  1905.                 end
  1906.                 if Menu.autoq.enable:Value() then
  1907.                     LocalDrawText("Auto Q Enabled", Menu.draws.autoq.size:Value(), posX, posY, LocalDrawColor(255, 000, 255, 000))
  1908.                 else
  1909.                     LocalDrawText("Auto Q Disabled", Menu.draws.autoq.size:Value(), posX, posY, LocalDrawColor(255, 255, 000, 000))
  1910.                 end
  1911.             end
  1912.             -- [ q farm ]
  1913.             local lhmenu = Menu.draws.qfarm.lasthit
  1914.             local lcmenu = Menu.draws.qfarm.almostlasthit
  1915.             if lhmenu.enabled:Value() or lcmenu.enabled:Value() then
  1916.                 local fm = self.QFarm.FarmMinions
  1917.                 for i = 1, #fm do
  1918.                     local minion = fm[i]
  1919.                     if minion.LastHitable and lhmenu.enabled:Value() then
  1920.                         LocalDrawCircle(minion.Minion.pos, lhmenu.radius:Value(), lhmenu.width:Value(), lhmenu.color:Value())
  1921.                     elseif minion.AlmostLastHitable and lcmenu.enabled:Value() then
  1922.                         LocalDrawCircle(minion.Minion.pos, lcmenu.radius:Value(), lcmenu.width:Value(), lcmenu.color:Value())
  1923.                     end
  1924.                 end
  1925.             end
  1926.         end
  1927.         function CHAMPION:QClear()
  1928.             self.QFarm = SPELLS:SpellClear(_Q, self.QData, function() return ((25 * myHero:GetSpellData(_Q).level) - 10) + (1.1 * myHero.totalDamage) + (0.4 * myHero.ap) end)
  1929.         end
  1930.         function CHAMPION:CanAttack()
  1931.             if not SPELLS:CheckSpellDelays({q = 0.33, w = 0.33, e = 0.33, r = 1.13}) then
  1932.                 return false
  1933.             end
  1934.             return true
  1935.         end
  1936.         function CHAMPION:CanMove()
  1937.             if not SPELLS:CheckSpellDelays({q = 0.2, w = 0.2, e = 0.2, r = 1}) then
  1938.                 return false
  1939.             end
  1940.             return true
  1941.         end
  1942.     end,
  1943.     Varus = function()
  1944.         local VarusVersion = "0.02 - fixed Q, added dist check to predPos"
  1945.         Menu = MenuElement({name = "Gamsteron Varus", id = "Gamsteron_Varus", type = _G.MENU, leftIcon = "https://raw.githubusercontent.com/gamsteron/GOS-External/master/Icons/gsovarussf3f.png"})
  1946.         -- Q
  1947.         Menu:MenuElement({name = "Q settings", id = "qset", type = _G.MENU})
  1948.         Menu.qset:MenuElement({id = "combo", name = "Combo", value = true})
  1949.         Menu.qset:MenuElement({id = "harass", name = "Harass", value = false})
  1950.         Menu.qset:MenuElement({id = "stacks", name = "If enemy has 3 W stacks [ W passive ]", value = true})
  1951.         Menu.qset:MenuElement({id = "active", name = "If varus has W buff [ W active ]", value = true})
  1952.         Menu.qset:MenuElement({id = "range", name = "No enemies in AA range", value = true})
  1953.         Menu.qset:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  1954.         -- W
  1955.         Menu:MenuElement({name = "W settings", id = "wset", type = _G.MENU})
  1956.         Menu.wset:MenuElement({id = "combo", name = "Combo", value = true})
  1957.         Menu.wset:MenuElement({id = "harass", name = "Harass", value = false})
  1958.         Menu.wset:MenuElement({id = "whp", name = "min. hp %", value = 50, min = 1, max = 100, step = 1})
  1959.         -- E
  1960.         Menu:MenuElement({name = "E settings", id = "eset", type = _G.MENU})
  1961.         Menu.eset:MenuElement({id = "combo", name = "Combo", value = true})
  1962.         Menu.eset:MenuElement({id = "harass", name = "Harass", value = false})
  1963.         Menu.eset:MenuElement({id = "range", name = "No enemies in AA range", value = true})
  1964.         Menu.eset:MenuElement({id = "stacks", name = "If enemy has 3 W stacks [ W passive ]", value = false})
  1965.         Menu.eset:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  1966.         -- R
  1967.         Menu:MenuElement({name = "R settings", id = "rset", type = _G.MENU})
  1968.         Menu.rset:MenuElement({id = "combo", name = "Use R Combo", value = true})
  1969.         Menu.rset:MenuElement({id = "harass", name = "Use R Harass", value = false})
  1970.         Menu.rset:MenuElement({id = "rci", name = "Use R if enemy isImmobile", value = true})
  1971.         Menu.rset:MenuElement({id = "rcd", name = "Use R if enemy distance < X", value = true})
  1972.         Menu.rset:MenuElement({id = "rdist", name = "use R if enemy distance < X", value = 500, min = 250, max = 1000, step = 50})
  1973.         Menu.rset:MenuElement({id = "hitchance", name = "Hitchance", value = 2, drop = {"normal", "high"}})
  1974.         -- Version
  1975.         Menu:MenuElement({name = "Version " .. tostring(VarusVersion), type = _G.SPACE, id = "verspace"})
  1976.         CHAMPION = LocalCore:Class()
  1977.         function CHAMPION:__init()
  1978.             self.HasQBuff = false;
  1979.             self.QStartTime = 0;
  1980.             self.QData = {Delay = 0.1, Radius = 70, Range = 1650, Speed = 1900, Collision = false, Type = _G.SPELLTYPE_LINE};
  1981.             self.EData = {Delay = 0.5, Radius = 235, Range = 925, Speed = 1500, Collision = false, Type = _G.SPELLTYPE_CIRCLE};
  1982.             self.RData = {Delay = 0.25, Radius = 120, Range = 1075, Speed = 1950, Collision = false, Type = _G.SPELLTYPE_LINE};
  1983.         end
  1984.         function CHAMPION:WndMsg(msg, wParam)
  1985.             if wParam == HK_Q then
  1986.                 self.QStartTime = os.clock()
  1987.             end
  1988.         end
  1989.         function CHAMPION:Tick()
  1990.             -- Check Q Buff
  1991.             self.HasQBuff = LocalCore:HasBuff(myHero, "varusq")
  1992.             -- Is Attacking
  1993.             if not self.HasQBuff and ORB:IsAutoAttacking() then
  1994.                 return
  1995.             end
  1996.             -- Can Attack
  1997.             local AATarget = TS:GetComboTarget()
  1998.             if not self.HasQBuff and AATarget and not ORB.IsNone and ORB:CanAttack() then
  1999.                 return
  2000.             end
  2001.             local result = false
  2002.             -- Get Enemies
  2003.             local enemyList = OB:GetEnemyHeroes(math.huge, false, 0)
  2004.             --R
  2005.             if ((ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.rset.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.rset.harass:Value())) and SPELLS:IsReady(_R, {q = 0.33, w = 0, e = 0.63, r = 0.5}) then
  2006.                 if Menu.rset.rcd:Value() then
  2007.                     result = CastSpell(HK_R, LocalCore:GetClosestEnemy(enemyList, Menu.rset.rdist:Value()), self.RData, Menu.rset.hitchance:Value() + 1)
  2008.                 end
  2009.                 if not result and Menu.rset.rci:Value() then
  2010.                     local t = LocalCore:GetImmobileEnemy(enemyList, 900)
  2011.                     if t and myHero.pos:DistanceTo(t.pos) < self.RData.Range then
  2012.                         result = Control.CastSpell(HK_R, t)
  2013.                     end
  2014.                 end
  2015.             end if result then return end
  2016.             --E
  2017.             if ((ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.eset.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.eset.harass:Value())) and SPELLS:IsReady(_E, {q = 0.33, w = 0, e = 0.63, r = 0.33}) then
  2018.                 local aaRange = Menu.eset.range:Value() and not AATarget
  2019.                 local onlyStacksE = Menu.eset.stacks:Value()
  2020.                 local eTargets = {}
  2021.                 for i = 1, #enemyList do
  2022.                     local hero = enemyList[i]
  2023.                     if myHero.pos:DistanceTo(hero.pos) < 925 and (LocalCore:GetBuffCount(hero, "varuswdebuff") == 3 or not onlyStacksE or myHero:GetSpellData(_W).level == 0 or aaRange) then
  2024.                         eTargets[#eTargets + 1] = hero
  2025.                     end
  2026.                 end
  2027.                 result = CastSpell(HK_E, TS:GetTarget(eTargets, 0), self.EData, Menu.eset.hitchance:Value() + 1)
  2028.             end if result then return end
  2029.             -- Q
  2030.             if (ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.qset.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.qset.harass:Value()) then
  2031.                 local aaRange = Menu.qset.range:Value() and not AATarget
  2032.                 local wActive = Menu.qset.active:Value() and LocalGameTimer() < SPELLS.LastWk + 3
  2033.                 -- Q1
  2034.                 if not self.HasQBuff and SPELLS:IsReady(_Q, {q = 0.5, w = 0.1, e = 1, r = 0.33}) then
  2035.                     if LocalControlIsKeyDown(HK_Q) then
  2036.                         LocalControlKeyUp(HK_Q)
  2037.                     end
  2038.                     -- W
  2039.                     if ((ORB.Modes[ORBWALKER_MODE_COMBO] and Menu.wset.combo:Value()) or (ORB.Modes[ORBWALKER_MODE_HARASS] and Menu.wset.harass:Value())) and SPELLS:IsReady(_W, {q = 0.33, w = 0.5, e = 0.63, r = 0.33}) then
  2040.                         local whp = Menu.wset.whp:Value()
  2041.                         for i = 1, #enemyList do
  2042.                             local hero = enemyList[i]
  2043.                             local hp = 100 * (hero.health / hero.maxHealth)
  2044.                             if hp < whp and myHero.pos:DistanceTo(hero.pos) < 1500 then
  2045.                                 result = Control.CastSpell(HK_W)
  2046.                                 if result then break end
  2047.                             end
  2048.                         end
  2049.                     end if result then return end
  2050.                     local onlyStacksQ = Menu.qset.stacks:Value()
  2051.                     for i = 1, #enemyList do
  2052.                         local hero = enemyList[i]
  2053.                         if myHero.pos:DistanceTo(hero.pos) < 1500 and (LocalCore:GetBuffCount(hero, "varuswdebuff") == 3 or not onlyStacksQ or myHero:GetSpellData(_W).level == 0 or wActive or aaRange) then
  2054.                             LocalControlKeyDown(HK_Q)
  2055.                             SPELLS.LastQ = LocalGameTimer()
  2056.                             result = true
  2057.                             break
  2058.                         end
  2059.                     end
  2060.                     -- Q2
  2061.                 elseif self.HasQBuff and SPELLS:IsReady(_Q, {q = 0.2, w = 0, e = 0.63, r = 0.33}) then
  2062.                     local qTargets = {}
  2063.                     local onlyStacksQ = Menu.qset.stacks:Value()
  2064.                     local qTimer = os.clock() - self.QStartTime
  2065.                     local qExtraRange
  2066.                     if qTimer < 2 then
  2067.                         qExtraRange = qTimer * 0.5 * 700
  2068.                     else
  2069.                         qExtraRange = 700
  2070.                     end
  2071.                     for i = 1, #enemyList do
  2072.                         local hero = enemyList[i]
  2073.                         if myHero.pos:DistanceTo(hero.pos) < 925 + qExtraRange and (LocalCore:GetBuffCount(hero, "varuswdebuff") == 3 or not onlyStacksQ or myHero:GetSpellData(_W).level == 0 or wActive or aaRange) then
  2074.                             table.insert(qTargets, hero)
  2075.                         end
  2076.                     end
  2077.                     local qt = TS:GetTarget(qTargets, 0)
  2078.                     if LocalCore:IsValidTarget(qt) then
  2079.                         local Pred = GetGamsteronPrediction(qt, self.QData, myHero)
  2080.                         if Pred.Hitchance >= Menu.qset.hitchance:Value() + 1 and LocalCore:IsInRange(Pred.CastPosition, myHero.pos, 925 + qExtraRange) and LocalCore:IsInRange(Pred.UnitPosition, myHero.pos, 925 + qExtraRange) then
  2081.                             LocalCore:CastSpell(HK_Q, nil, Pred.CastPosition)
  2082.                         end
  2083.                     end
  2084.                 end
  2085.             end
  2086.         end
  2087.         function CHAMPION:CanAttack()
  2088.             self.HasQBuff = LocalCore:HasBuff(myHero, "varusq")
  2089.             if not SPELLS:CheckSpellDelays({q = 0.33, w = 0, e = 0.33, r = 0.33}) then
  2090.                 return false
  2091.             end
  2092.             if self.HasQBuff == true then
  2093.                 return false
  2094.             end
  2095.             return true
  2096.         end
  2097.         function CHAMPION:CanMove()
  2098.             if not SPELLS:CheckSpellDelays({q = 0.2, w = 0, e = 0.2, r = 0.2}) then
  2099.                 return false
  2100.             end
  2101.             return true
  2102.         end
  2103.     end,
  2104.     Katarina = function()
  2105.         Menu = MenuElement({type = _G.MENU, id = "bulkKata", name = "bulkKata", leftIcon = "http://ddragon.leagueoflegends.com/cdn/6.24.1/img/champion/Katarina.png"})
  2106.         Menu:MenuElement({type = _G.MENU, id = "Combo", name = "[Combo Manager]"})
  2107.         Menu.Combo:MenuElement({id = "Q", name = "Use Q", value = true, leftIcon = "http://ddragon.leagueoflegends.com/cdn/6.24.1/img/spell/KatarinaQ.png"})
  2108.         Menu.Combo:MenuElement({id = "W", name = "Use W", value = true, leftIcon = "http://ddragon.leagueoflegends.com/cdn/6.24.1/img/spell/KatarinaW.png"})
  2109.         Menu.Combo:MenuElement({id = "E", name = "Use E", value = true, leftIcon = "http://ddragon.leagueoflegends.com/cdn/6.24.1/img/spell/KatarinaEWrapper.png"})
  2110.         Menu.Combo:MenuElement({id = "R", name = "Use R", value = true, leftIcon = "http://ddragon.leagueoflegends.com/cdn/6.24.1/img/spell/KatarinaR.png"})
  2111.         Menu.Combo:MenuElement({id = "Hex", name = "Use Hextech", value = true, leftIcon = "http://ddragon.leagueoflegends.com/cdn/6.24.1/img/spell/KatarinaR.png"})
  2112.         Menu:MenuElement({type = _G.MENU, id = "RManager", name = "[R Manager]"})
  2113.         Menu.RManager:MenuElement({id = "Info", name = "Score For Each Champions :", type = SPACE})
  2114.         Menu.RManager:MenuElement({id = "ComboMode", name = "Combo Mode [?]", drop = {"Normal", "Soon", "Soon"}, tooltip = "Watch development Thread for Infos!"})
  2115.         local count = 0
  2116.         for i = 1, Game.HeroCount() do
  2117.             local Hero = Game.Hero(i)
  2118.             if Hero.isEnemy then
  2119.                 Menu.RManager:MenuElement({id = Hero.charName, name = Hero.charName, value = 1, min = 1, max = 3})
  2120.                 count = count + 1
  2121.             end
  2122.         end
  2123.         Menu.RManager:MenuElement({id = "MinR", name = "Min Score to Cast R", value = 1, min = 1, max = count * 3})
  2124.         Menu:MenuElement({type = _G.MENU, id = "Harass", name = "[Harass Manager]"})
  2125.         Menu.Harass:MenuElement({id = "Q", name = "Use Q", value = true})
  2126.         Menu.Harass:MenuElement({id = "W", name = "Use W", value = true})
  2127.         Menu.Harass:MenuElement({id = "E", name = "Use E", value = false})
  2128.         Menu.Harass:MenuElement({id = "Disabled", name = "Disable All", value = false})
  2129.         Menu:MenuElement({type = _G.MENU, id = "Ks", name = "[KS Manager]"})
  2130.         Menu.Ks:MenuElement({id = "Q", name = "Use Q", value = true, leftIcon = "http://ddragon.leagueoflegends.com/cdn/6.24.1/img/spell/KatarinaQ.png"})
  2131.         Menu.Ks:MenuElement({id = "W", name = "Use W", value = true, leftIcon = "http://ddragon.leagueoflegends.com/cdn/6.24.1/img/spell/KatarinaW.png"})
  2132.         Menu.Ks:MenuElement({id = "E", name = "Use E", value = true, leftIcon = "http://ddragon.leagueoflegends.com/cdn/6.24.1/img/spell/KatarinaEWrapper.png"})
  2133.         Menu.Ks:MenuElement({id = "R", name = "Use R", value = false, leftIcon = "http://ddragon.leagueoflegends.com/cdn/6.24.1/img/spell/KatarinaR.png"})
  2134.         if myHero:GetSpellData(4).name == "SummonerDot" or myHero:GetSpellData(5).name == "SummonerDot" then
  2135.             Menu.Ks:MenuElement({id = "UseIgn", name = "Use Ignite", value = false, leftIcon = "http://pm1.narvii.com/5792/0ce6cda7883a814a1a1e93efa05184543982a1e4_hq.jpg"})
  2136.         end
  2137.         Menu.Ks:MenuElement({id = "Recall", name = "Disable During Recall", value = true})
  2138.         Menu.Ks:MenuElement({id = "Disabled", name = "Disable All", value = false})
  2139.         Menu:MenuElement({type = _G.MENU, id = "Misc", name = "[Misc Settings]"})
  2140.         Menu.Misc:MenuElement({id = "R", name = "R Max range", value = 450, min = 0, max = 550})
  2141.        
  2142.         local Spin = false
  2143.         local daggerPos = {}
  2144.         local Spells = {
  2145.             Q = {Range = 625},
  2146.             W = {},
  2147.             E = {Range = 725},
  2148.             R = {Range = 550},
  2149.             P = {Range = 340},
  2150.         };
  2151.         local DAMAGE_TYPE_PHYSICAL = 0
  2152.         local DAMAGE_TYPE_MAGICAL = 1
  2153.         local DAMAGE_TYPE_TRUE = 2
  2154.         local dmg =
  2155.         {
  2156.             [_Q] = {Type = DAMAGE_TYPE_MAGICAL, RawDamage = function(source, target, level) return ({75, 105, 135, 165, 195})[level] + 0.3 * source.ap end},
  2157.             [_E] = {Type = DAMAGE_TYPE_MAGICAL, RawDamage = function(source, target, level) return ({30, 45, 60, 75, 90})[level] + 0.25 * source.ap + 0.5 * source.totalDamage end},
  2158.             [_R] = {Type = DAMAGE_TYPE_MAGICAL, RawDamage = function(source, target, level) return ({25, 37.5, 50})[level] + 0.22 * source.bonusDamage + 0.19 * source.ap end},
  2159.         };
  2160.        
  2161.         local function getdmg(slot, target, source)
  2162.             if slot == "Q" then slot = _Q elseif slot == "W" then slot = _W elseif slot == "E" then slot = _E elseif slot == "R" then slot = _R end
  2163.             return _G.SDK.Damage:CalculateDamage(source, target, dmg[slot].Type, dmg[slot].RawDamage(source, target, source:GetSpellData(slot).level))
  2164.         end
  2165.        
  2166.         local function GetClosestAllyHero(pos, range)
  2167.             local closest
  2168.             for i = 1, Game.HeroCount() do
  2169.                 local hero = Game.Hero(i)
  2170.                 if hero.isAlly and not hero.dead and not hero.isImmortal and not hero.isMe then
  2171.                     if pos:DistanceTo(Vector(hero.pos)) <= range then
  2172.                         if closest then
  2173.                             if pos:DistanceTo(Vector(hero.pos)) < pos:DistanceTo(Vector(closest.pos)) then
  2174.                                 closest = hero
  2175.                             end
  2176.                         else closest = hero end
  2177.                     end
  2178.                 end
  2179.             end
  2180.             return closest
  2181.         end
  2182.        
  2183.         local function GetClosestAllyMinion(pos, range)
  2184.             local closest
  2185.             for i = 1, Game.MinionCount() do
  2186.                 local minion = Game.Minion(i)
  2187.                 if minion.isAlly and not minion.dead and not minion.isImmortal then
  2188.                     if pos:DistanceTo(Vector(minion.pos)) <= range then
  2189.                         if closest then
  2190.                             if pos:DistanceTo(Vector(minion.pos)) < pos:DistanceTo(Vector(closest.pos)) then
  2191.                                 closest = minion
  2192.                             end
  2193.                         else closest = minion end
  2194.                     end
  2195.                 end
  2196.             end
  2197.             return closest
  2198.         end
  2199.        
  2200.         local function RemoveItems(array, items)
  2201.             local result = {}
  2202.             for i, Value in pairs(array) do
  2203.                 if items[i] == nil then
  2204.                     table.insert(result, Value)
  2205.                 end
  2206.             end
  2207.             return result
  2208.         end
  2209.        
  2210.         CHAMPION = LocalCore:Class()
  2211.        
  2212.         function CHAMPION:__init()
  2213.             PrintChat("bulkKata : Loaded")
  2214.         end
  2215.        
  2216.         function CHAMPION:Tick()
  2217.             if myHero.dead or self:CheckR() or spin == true then return end
  2218.             self:CheckR()
  2219.             self:KillSteal()
  2220.             local target = _G.SDK.TargetSelector:GetTarget(800)
  2221.             if target and _G.SDK.Orbwalker.Modes[_G.SDK.ORBWALKER_MODE_COMBO] then
  2222.                 self:Combo(target)
  2223.             elseif target and _G.SDK.Orbwalker.Modes[_G.SDK.ORBWALKER_MODE_HARASS] then
  2224.                 self:Harass()
  2225.             end
  2226.         end
  2227.        
  2228.         function CHAMPION:Draw()
  2229.             local daggerPosCurrent = {}
  2230.             for i = 1, Game.ParticleCount() do
  2231.                 local particle = Game.Particle(i)
  2232.                 if particle ~= nil then
  2233.                     local name = particle.name
  2234.                     if name ~= nil and name == "Katarina_Base_W_Indicator_Ally" then
  2235.                         local pos = particle.pos
  2236.                         if pos ~= nil and pos.x ~= nil and pos.y ~= nil and pos.z ~= nil then
  2237.                             _G.table.insert(daggerPosCurrent, pos)
  2238.                         end
  2239.                     end
  2240.                 end
  2241.             end
  2242.             -- add
  2243.             for i, ParticlePos in pairs(daggerPosCurrent) do
  2244.                 local found = false
  2245.                 for j, OldParticlePos in pairs(daggerPos) do
  2246.                     if OldParticlePos == ParticlePos then
  2247.                         found = true
  2248.                     end
  2249.                 end
  2250.                 if found == false then
  2251.                     _G.table.insert(daggerPos, ParticlePos)
  2252.                 end
  2253.             end
  2254.             -- remove
  2255.             local itemsToRemove = {}
  2256.             for i, OldParticlePos in pairs(daggerPos) do
  2257.                 local found = false
  2258.                 for j, ParticlePos in pairs(daggerPosCurrent) do
  2259.                     if OldParticlePos == ParticlePos then
  2260.                         found = true
  2261.                     end
  2262.                 end
  2263.                 if found == false then
  2264.                     itemsToRemove[i] = true
  2265.                 end
  2266.             end
  2267.             daggerPos = RemoveItems(daggerPos, itemsToRemove)
  2268.         end
  2269.        
  2270.         local spinStartTime = os.clock()
  2271.         function CHAMPION:CheckR()
  2272.             local found = false
  2273.             if Spin == true then
  2274.                 for K, Enemy in pairs(self:GetEnemyHeroes()) do
  2275.                     if self:IsValidTarget(Enemy, Spells.R.Range, false, myHero.pos) then
  2276.                         found = true
  2277.                     end
  2278.                 end
  2279.                 if found == false or (os.clock() > spinStartTime + 0.5 and not LocalCore:HasBuff(myHero, "katarinarsound")) then
  2280.                     self:EnableEOW()
  2281.                     Spin = false
  2282.                 end
  2283.             end
  2284.         end
  2285.        
  2286.         function CHAMPION:KillSteal()
  2287.             if Menu.Ks.Disabled:Value() or (self:IsRecalling() and Menu.Ks.Recall:Value()) or Spin then return end
  2288.             for K, Enemy in pairs(self:GetEnemyHeroes()) do
  2289.                 if Menu.Ks.Q:Value() and self:IsReady(_Q) and self:IsValidTarget(Enemy, Spells.Q.Range, false, myHero.pos) then
  2290.                     if getdmg("Q", Enemy, myHero) > Enemy.health then
  2291.                         self:CastQ(Enemy)
  2292.                     end
  2293.                 end
  2294.                 if Menu.Ks.Q:Value() and Menu.Ks.E:Value() and self:IsReady(_Q) and self:IsReady(_E) and self:IsValidTarget(Enemy, Spells.Q.Range + Spells.E.Range, false, myHero.pos) then
  2295.                     if getdmg("Q", Enemy, myHero) > Enemy.health then
  2296.                         self:EKS(Enemy)
  2297.                     end
  2298.                 end
  2299.                 if Menu.Ks.E:Value() and self:IsReady(_E) and self:IsValidTarget(Enemy, Spells.E.Range, false, myHero.pos) then
  2300.                     if getdmg("E", Enemy, myHero) > Enemy.health then
  2301.                         self:CastE(Enemy)
  2302.                     end
  2303.                 end
  2304.                 if Menu.Ks.R:Value() and self:IsReady(_R) and self:IsValidTarget(Enemy, Spells.R.Range, false, myHero.pos) then
  2305.                     if getdmg("R", Enemy, myHero) > Enemy.health then
  2306.                         self:CastR()
  2307.                     end
  2308.                 end
  2309.                 if myHero:GetSpellData(5).name == "SummonerDot" and Menu.Ks.UseIgn:Value() and self:IsReady(SUMMONER_2) then
  2310.                     if self:IsValidTarget(Enemy, 600, false, myHero.pos) and Enemy.health + Enemy.hpRegen * 2.5 + Enemy.shieldAD < 50 + 20 * myHero.levelData.lvl then
  2311.                         Control.CastSpell(HK_SUMMONER_2, Enemy)
  2312.                     end
  2313.                 end
  2314.                 if myHero:GetSpellData(4).name == "SummonerDot" and Menu.Ks.UseIgn:Value() and self:IsReady(SUMMONER_1) then
  2315.                     if self:IsValidTarget(Enemy, 600, false, myHero.pos) and Enemy.health + Enemy.hpRegen * 2.5 + Enemy.shieldAD < 50 + 20 * myHero.levelData.lvl then
  2316.                         Control.CastSpell(HK_SUMMONER_1, Enemy)
  2317.                     end
  2318.                 end
  2319.             end
  2320.         end
  2321.        
  2322.         function CHAMPION:EKS(target)
  2323.             for K, Enemy in pairs(self:GetEnemyHeroes()) do
  2324.                 if self:IsValidTarget(Enemy, Spells.E.Range, false, myHero.pos) and Enemy.pos:DistanceTo(target.pos) < Spells.Q.Range then
  2325.                     self:CastE(Enemy) return
  2326.                 end
  2327.             end
  2328.             for K, Ally in pairs(self:GetAllyHeroes()) do
  2329.                 if self:IsValidTarget(Ally, Spells.E.Range, false, myHero.pos) and Ally.pos:DistanceTo(target.pos) < Spells.Q.Range then
  2330.                     self:CastE(Ally) return
  2331.                 end
  2332.             end
  2333.             for K, Minion in pairs(self:GetMinions(Spells.E.Range)) do
  2334.                 if self:IsValidTarget(Minion, Spells.E.Range, false, myHero.pos) and Minion.pos:DistanceTo(target.pos) < Spells.Q.Range then
  2335.                     self:CastE(Minion) return
  2336.                 end
  2337.             end
  2338.         end
  2339.        
  2340.         function CHAMPION:DisableEOW()
  2341.             _G.SDK.Orbwalker:SetAttack(false)
  2342.             _G.SDK.Orbwalker:SetMovement(false)
  2343.         end
  2344.        
  2345.         function CHAMPION:EnableEOW()
  2346.             _G.SDK.Orbwalker:SetMovement(true)
  2347.             _G.SDK.Orbwalker:SetAttack(true)
  2348.         end
  2349.        
  2350.         function CHAMPION:CastQ(target)
  2351.             Control.CastSpell(HK_Q, target)
  2352.         end
  2353.        
  2354.         function CHAMPION:CastW()
  2355.             Control.CastSpell(HK_W)
  2356.         end
  2357.        
  2358.         function CHAMPION:CastE(target)
  2359.             Control.CastSpell(HK_E, target)
  2360.         end
  2361.        
  2362.         function CHAMPION:CastR()
  2363.             Spin = true
  2364.             spinStartTime = os.clock()
  2365.             self:DisableEOW()
  2366.             Control.CastSpell(HK_R)
  2367.         end
  2368.        
  2369.         function CHAMPION:Combo()
  2370.             local comboMode = Menu.RManager.ComboMode:Value()
  2371.             if comboMode == 1 then
  2372.                 self:NormalCombo(target)
  2373.             elseif comboMode == 2 then
  2374.                 self:LineCombo(target)
  2375.             elseif comboMode == 3 then
  2376.                 self:IlluminatiCombo(target)
  2377.             end
  2378.         end
  2379.        
  2380.         function CHAMPION:NormalCombo(target)
  2381.             if Menu.Combo.E:Value() and self:IsReady(_E) then
  2382.                 local target = self:GetTarget(Spells.E.Range)
  2383.                 if self:IsValidTarget(target, Spells.E.Range, false, myHero.pos)then
  2384.                     Control.CastSpell(HK_E, target)
  2385.                 end
  2386.             elseif Menu.Combo.W:Value() and self:IsReady(_W) then
  2387.                 local target = self:GetTarget(Spells.P.Range)
  2388.                 if target ~= nil and self:IsValidTarget(target, Spells.P.Range, false, myHero.pos) then
  2389.                     self:CastW()
  2390.                 end
  2391.             elseif Menu.Combo.Q:Value() and self:IsReady(_Q) then
  2392.                 local target = self:GetTarget(Spells.Q.Range)
  2393.                 if target ~= nil and self:IsValidTarget(target, Spells.Q.Range, false, myHero.pos) then
  2394.                     self:CastQ(target)
  2395.                 end
  2396.             elseif Menu.Combo.R:Value() and self:IsReady(_R) then
  2397.                 local target = self:GetTarget(Menu.Misc.R:Value())
  2398.                 if target ~= nil and self:IsEnough() then
  2399.                     _G.SDK.Orbwalker:SetAttack(false)
  2400.                     _G.SDK.Orbwalker:SetMovement(false)
  2401.                     self:CastR()
  2402.                 end
  2403.             elseif Menu.Combo.E:Value() and self:IsReady(_E) then
  2404.                 for i = 1, #daggerPos do
  2405.                     for i, Enemy in pairs(self:GetEnemyHeroes()) do
  2406.                         if self:IsValidTarget(Enemy, Spells.E.Range + Spells.P.Range, false, myHero.pos) and self:IsValidTarget(Enemy, Spells.P.Range, false, daggerPos[i]) then
  2407.                             self:CastE(daggerPos[i])
  2408.                         end
  2409.                     end
  2410.                 end
  2411.             elseif Menu.Combo.E:Value() and self:IsReady(_E) then
  2412.                 local target = self:GetTarget(Spells.E.Range)
  2413.                 if self:IsValidTarget(target, Spells.E.Range, false, myHero.pos)then
  2414.                     Control.CastSpell(HK_E, target)
  2415.                 end
  2416.             end
  2417.         end
  2418.        
  2419.         function CHAMPION:Harass()
  2420.             if Menu.Harass.Disabled:Value() then return end
  2421.             if Menu.Harass.E:Value() and self:IsReady(_E) and not Spin then
  2422.                 for i = 1, #daggerPos do
  2423.                     for i, Enemy in pairs(self:GetEnemyHeroes()) do
  2424.                         if self:IsValidTarget(Enemy, Spells.E.Range + Spells.P.Range, false, myHero.pos) and self:IsValidTarget(Enemy, Spells.P.Range, false, daggerPos[i]) then
  2425.                             self:CastE(daggerPos[i])
  2426.                         end
  2427.                     end
  2428.                 end
  2429.             end
  2430.             if Menu.Harass.E:Value() and self:IsReady(_E) then
  2431.                 local target = self:GetTarget(Spells.E.Range)
  2432.                 if target ~= nil and self:IsValidTarget(target, Spells.E.Range, false, myHero.pos)then
  2433.                     self:CastE(target)
  2434.                 end
  2435.             end
  2436.             if Menu.Harass.W:Value() and self:IsReady(_W) then
  2437.                 local target = self:GetTarget(Spells.P.Range)
  2438.                 if target ~= nil and self:IsValidTarget(target, Spells.P.Range, false, myHero.pos) then
  2439.                     self:CastW()
  2440.                 end
  2441.             end
  2442.             if Menu.Harass.Q:Value() and self:IsReady(_Q) then
  2443.                 local target = self:GetTarget(Spells.Q.Range)
  2444.                 if target ~= nil and self:IsValidTarget(target, Spells.Q.Range, false, myHero.pos) then
  2445.                     self:CastQ(target)
  2446.                 end
  2447.             end
  2448.         end
  2449.        
  2450.         function CHAMPION:IsEnough()
  2451.             local count = 0
  2452.             for K, Enemy in pairs(self:GetEnemyHeroes()) do
  2453.                 if self:IsValidTarget(Enemy, Menu.Misc.R:Value(), false, myHero.pos) then
  2454.                     count = count + Menu.RManager[Enemy.charName]:Value()
  2455.                 end
  2456.             end
  2457.             if count >= Menu.RManager.MinR:Value() then
  2458.                 return true
  2459.             end
  2460.             return false
  2461.         end
  2462.        
  2463.         function CHAMPION:GetTarget(range)
  2464.             local target = nil
  2465.             local lessCast = 0
  2466.             local GetEnemyHeroes = self:GetEnemyHeroes()
  2467.             for i = 1, #GetEnemyHeroes do
  2468.                 local Enemy = GetEnemyHeroes[i]
  2469.                 if self:IsValidTarget(Enemy, range, false, myHero.pos) then
  2470.                     local Armor = (100 + Enemy.magicResist) / 100
  2471.                     local Killable = Armor * Enemy.health
  2472.                     if Killable <= lessCast or lessCast == 0 then
  2473.                         target = Enemy
  2474.                         lessCast = Killable
  2475.                     end
  2476.                 end
  2477.             end
  2478.             return target
  2479.         end
  2480.        
  2481.         function CHAMPION:IsRecalling()
  2482.             for K, Buff in pairs(self:GetBuffs(myHero)) do
  2483.                 if Buff.name == "recall" and Buff.duration > 0 then
  2484.                     return true
  2485.                 end
  2486.             end
  2487.             return false
  2488.         end
  2489.        
  2490.         function CHAMPION:IsBuffed(target, BuffName)
  2491.             for K, Buff in pairs(GetBuffs(target)) do
  2492.                 if Buff.name == BuffName then
  2493.                     return true
  2494.                 end
  2495.             end
  2496.             return false
  2497.         end
  2498.        
  2499.         function CHAMPION:GetAllyHeroes()
  2500.             local AllyHeroes = {}
  2501.             for i = 1, Game.HeroCount() do
  2502.                 local Hero = Game.Hero(i)
  2503.                 if Hero.isAlly then
  2504.                     table.insert(AllyHeroes, Hero)
  2505.                 end
  2506.             end
  2507.             return AllyHeroes
  2508.         end
  2509.        
  2510.         function CHAMPION:GetEnemyHeroes()
  2511.             local EnemyHeroes = {}
  2512.             for i = 1, Game.HeroCount() do
  2513.                 local Hero = Game.Hero(i)
  2514.                 if Hero.isEnemy then
  2515.                     table.insert(EnemyHeroes, Hero)
  2516.                 end
  2517.             end
  2518.             return EnemyHeroes
  2519.         end
  2520.        
  2521.         function CHAMPION:GetMinions(range)
  2522.             local EnemyMinions = {}
  2523.             for i = 1, Game.MinionCount() do
  2524.                 local Minion = Game.Minion(i)
  2525.                 if self:IsValidTarget(Minion, range, false, myHero) then
  2526.                     table.insert(EnemyMinions, Minion)
  2527.                 end
  2528.             end
  2529.             return EnemyMinions
  2530.         end
  2531.        
  2532.         function CHAMPION:GetPercentMP(unit)
  2533.             return 100 * unit.mana / unit.maxMana
  2534.         end
  2535.        
  2536.         function CHAMPION:GetPercentHP(unit)
  2537.             return 100 * unit.health / unit.maxHealth
  2538.         end
  2539.        
  2540.         function CHAMPION:GetBuffs(unit)
  2541.             local T = {}
  2542.             for i = 0, unit.buffCount do
  2543.                 local Buff = unit:GetBuff(i)
  2544.                 if Buff.count > 0 then
  2545.                     table.insert(T, Buff)
  2546.                 end
  2547.             end
  2548.             return T
  2549.         end
  2550.        
  2551.         function CHAMPION:IsImmune(unit)
  2552.             for K, Buff in pairs(self:GetBuffs(unit)) do
  2553.                 if (Buff.name == "kindredrnodeathbuff" or Buff.name == "undyingrage") and GetPercentHP(unit) <= 10 then
  2554.                     return true
  2555.                 end
  2556.                 if Buff.name == "vladimirsanguinepool" or Buff.name == "judicatorintervention" or Buff.name == "zhonyasringshield" then
  2557.                     return true
  2558.                 end
  2559.             end
  2560.             return false
  2561.         end
  2562.        
  2563.         function CHAMPION:IsValidTarget(unit, range, checkTeam, from)
  2564.             local range = range == nil and math.huge or range
  2565.             if unit == nil or not unit.valid or not unit.visible or unit.dead or not unit.isTargetable or self:IsImmune(unit) or (checkTeam and unit.isAlly) then
  2566.                 return false
  2567.             end
  2568.             return unit.pos:DistanceTo(from) < range
  2569.         end
  2570.        
  2571.         function CHAMPION:IsReady(slot)
  2572.             if myHero:GetSpellData(slot).currentCd == 0 and myHero:GetSpellData(slot).level > 0 then
  2573.                 if slot ~= _R and os.clock() < spinStartTime + 0.5 then return false end
  2574.                 return true
  2575.             end
  2576.             return false
  2577.         end
  2578.     end
  2579. }
  2580.  
  2581. AIO[LocalCharName]()
  2582.  
  2583. AddLoadCallback(function()
  2584.     ORB, TS, OB, DMG, SPELLS = _G.SDK.Orbwalker, _G.SDK.TargetSelector, _G.SDK.ObjectManager, _G.SDK.Damage, _G.SDK.Spells
  2585.     CHAMPION = CHAMPION()
  2586.     if CHAMPION.Interrupter then
  2587.         CHAMPION:Interrupter()
  2588.     end
  2589.     if CHAMPION.CanAttack then
  2590.         ORB:CanAttackEvent(function() return CHAMPION:CanAttack() end)
  2591.     end
  2592.     if CHAMPION.CanMove then
  2593.         ORB:CanMoveEvent(function() return CHAMPION:CanMove() end)
  2594.     end
  2595.     if CHAMPION.PreAttack then
  2596.         ORB:OnPreAttack(function(args) CHAMPION:PreAttack(args) end)
  2597.     end
  2598.     if CHAMPION.QClear then
  2599.         CHAMPION:QClear()
  2600.     end
  2601.     if CHAMPION.WClear then
  2602.         CHAMPION:WClear()
  2603.     end
  2604.     if CHAMPION.EClear then
  2605.         CHAMPION:EClear()
  2606.     end
  2607.     if CHAMPION.RClear then
  2608.         CHAMPION:RClear()
  2609.     end
  2610.     if CHAMPION.Farm then
  2611.         Callback.Add("Tick", function()
  2612.             if _G.GamsteronDebug then
  2613.                 local status, err = pcall(function () CHAMPION:Farm() end) if not status then print("CHAMPION.Farm " .. tostring(err)) end
  2614.             else
  2615.                 CHAMPION:Farm()
  2616.             end
  2617.         end)
  2618.     end
  2619.     if CHAMPION.Tick then
  2620.         Callback.Add("Draw", function()
  2621.             if _G.GamsteronDebug then
  2622.                 local status, err = pcall(function () CHAMPION:Tick() end) if not status then print("CHAMPION.Tick " .. tostring(err)) end
  2623.             else
  2624.                 CHAMPION:Tick()
  2625.             end
  2626.         end)
  2627.     end
  2628.     local set = 0;
  2629.     if CHAMPION.Draw then
  2630.         Callback.Add('Draw', function()
  2631.             --[===============[
  2632.             local str = "";
  2633.             local sd = myHero:GetSpellData(_Q);
  2634.             for i, k in pairs(sd) do
  2635.                 str = str .. i .. ": " .. k .. "\n";
  2636.             end
  2637.             str = str .. tostring(sd.ammoTime - Game.Timer());
  2638.             Draw.Text(str, myHero.pos:To2D())
  2639.             local s = myHero.activeSpell;
  2640.             if s and s.valid then
  2641.                 set = s.startTime;
  2642.             end
  2643.             local et = Game.Timer() - set - 0.067;
  2644.             if et > 0.8 and et < 0.9 then
  2645.                 print(et);
  2646.             end
  2647.             --]===============]
  2648.             if _G.GamsteronDebug then
  2649.                 local status, err = pcall(function () CHAMPION:Draw() end) if not status then print("CHAMPION.Draw " .. tostring(err)) end
  2650.             else
  2651.                 CHAMPION:Draw()
  2652.             end
  2653.         end)
  2654.     end
  2655.     if CHAMPION.WndMsg then
  2656.         Callback.Add('WndMsg', function(msg, wParam)
  2657.             if _G.GamsteronDebug then
  2658.                 local status, err = pcall(function() CHAMPION:WndMsg(msg, wParam) end) if not status then print("CHAMPION.WndMsg " .. tostring(err)) end
  2659.             else
  2660.                 CHAMPION:WndMsg(msg, wParam)
  2661.             end
  2662.         end)
  2663.     end
  2664. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement