Your browser does not support JavaScript or its disabled!
Please turn it on, or be aware that some features on this website will not work correctly.
2.5K
TargetBot Toggle #41
564b | 15 lines.
 --[[
  Script made by Lee (Discord: l33_) - www.trainorcreations.com
  If you want to support my work, feel free to donate at https://trainorcreations.com/donate
  PS. Stop ripping off my work and selling it as your own.
 ]]--
macro(500, "target toggle", function()
    if isInPz() then return end
    local monsters = 0
    for i, mob in ipairs(getSpectators(posz())) do
        if mob:isMonster() and getDistanceBetween(player:getPosition(), mob:getPosition()) >= 1 and getDistanceBetween(player:getPosition(), mob:getPosition()) <= 5 then
            monsters = monsters + 1
        end
    end

    if monsters >= 5  then
      if TargetBot:isOff() then TargetBot:setOn() end
    elseif monsters == 0  then
      if TargetBot:isOn() then TargetBot:setOff() end
    end
end)

25 Jun 2021
Ads