LookPlays

Teste

Jan 15th, 2022 (edited)
908
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 20.37 KB | Gaming | 0 0
  1. -- Configurações
  2. local Config = {
  3.     ESP = {
  4.         Enabled = true,
  5.         BoxColor = Color3.fromRGB(255, 0, 0),
  6.         TracerColor = Color3.fromRGB(255, 0, 0),
  7.         TextColor = Color3.fromRGB(255, 255, 255),
  8.         TextSize = 14,
  9.         BoxThickness = 1,
  10.         TracerThickness = 1,
  11.         ShowDistance = true -- Nova opção para mostrar distância
  12.     },
  13.     Aimbot = {
  14.         Enabled = true,
  15.         TeamCheck = false,
  16.         VisibilityCheck = true,
  17.         Smoothness = 0.5,
  18.         FOV = 400,
  19.         ShowFOV = true, -- Nova opção para mostrar/ocultar círculo FOV
  20.         TargetPart = "Head" -- Parte do corpo para mirar
  21.     },
  22.     Triggerbot = {
  23.         Enabled = false,
  24.         Delay = 0.1 -- Delay em segundos antes de atirar
  25.     }
  26. }
  27.  
  28. -- Serviços
  29. local Players = game:GetService("Players")
  30. local RunService = game:GetService("RunService")
  31. local UserInputService = game:GetService("UserInputService")
  32. local Camera = workspace.CurrentCamera
  33. local LocalPlayer = Players.LocalPlayer
  34.  
  35. -- Interface do Usuário
  36. local ScreenGui = Instance.new("ScreenGui")
  37. ScreenGui.Parent = game.CoreGui
  38.  
  39. local MainFrame = Instance.new("Frame")
  40. MainFrame.Name = "ConfigUI"
  41. MainFrame.Size = UDim2.new(0, 300, 0, 400)
  42. MainFrame.Position = UDim2.new(0.8, 0, 0.5, -200)
  43. MainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  44. MainFrame.BorderSizePixel = 0
  45. MainFrame.Parent = ScreenGui
  46.  
  47. local Title = Instance.new("TextLabel")
  48. Title.Size = UDim2.new(1, 0, 0, 30)
  49. Title.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  50. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  51. Title.Text = "Configurações"
  52. Title.TextSize = 18
  53. Title.Font = Enum.Font.SourceSansBold
  54. Title.Parent = MainFrame
  55.  
  56. local ScrollingFrame = Instance.new("ScrollingFrame")
  57. ScrollingFrame.Size = UDim2.new(1, -20, 1, -40)
  58. ScrollingFrame.Position = UDim2.new(0, 10, 0, 35)
  59. ScrollingFrame.BackgroundTransparency = 1
  60. ScrollingFrame.ScrollBarThickness = 6
  61. ScrollingFrame.Parent = MainFrame
  62.  
  63. -- Pool de objetos de interface
  64. local UIPool = {
  65.     frames = {},
  66.     buttons = {},
  67.     labels = {},
  68.     sliders = {}
  69. }
  70.  
  71. -- Funções do Pool de UI
  72. local function getOrCreateUIElement(poolType, className, parent)
  73.     local pool = UIPool[poolType]
  74.    
  75.     -- Procura por um elemento não utilizado no pool
  76.     for _, obj in ipairs(pool) do
  77.         if not obj.InUse then
  78.             obj.InUse = true
  79.             obj.Instance.Parent = parent
  80.             return obj.Instance
  81.         end
  82.     end
  83.    
  84.     -- Cria novo elemento se não encontrar nenhum disponível
  85.     local newElement = Instance.new(className)
  86.     table.insert(pool, {Instance = newElement, InUse = true})
  87.     newElement.Parent = parent
  88.     return newElement
  89. end
  90.  
  91. local function releaseUIElement(element, poolType)
  92.     local pool = UIPool[poolType]
  93.     for _, obj in ipairs(pool) do
  94.         if obj.Instance == element then
  95.             obj.InUse = false
  96.             element.Parent = nil
  97.             return
  98.         end
  99.     end
  100. end
  101.  
  102. -- Função atualizada para criar toggles usando pool
  103. local function CreateToggle(name, configTable, configKey, y)
  104.     local Toggle = getOrCreateUIElement("frames", "Frame", ScrollingFrame)
  105.     Toggle.Size = UDim2.new(1, 0, 0, 30)
  106.     Toggle.Position = UDim2.new(0, 0, 0, y)
  107.     Toggle.BackgroundTransparency = 1
  108.    
  109.     local Label = getOrCreateUIElement("labels", "TextLabel", Toggle)
  110.     Label.Size = UDim2.new(0.7, 0, 1, 0)
  111.     Label.BackgroundTransparency = 1
  112.     Label.Text = name
  113.     Label.TextColor3 = Color3.fromRGB(255, 255, 255)
  114.     Label.TextXAlignment = Enum.TextXAlignment.Left
  115.    
  116.     local Button = getOrCreateUIElement("buttons", "TextButton", Toggle)
  117.     Button.Size = UDim2.new(0.3, -10, 1, -10)
  118.     Button.Position = UDim2.new(0.7, 5, 0, 5)
  119.     Button.BackgroundColor3 = configTable[configKey] and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(255, 0, 0)
  120.     Button.Text = configTable[configKey] and "ON" or "OFF"
  121.     Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  122.    
  123.     Button.MouseButton1Click:Connect(function()
  124.         configTable[configKey] = not configTable[configKey]
  125.         Button.BackgroundColor3 = configTable[configKey] and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(255, 0, 0)
  126.         Button.Text = configTable[configKey] and "ON" or "OFF"
  127.     end)
  128.    
  129.     return Toggle
  130. end
  131.  
  132. -- Função atualizada para criar sliders usando pool
  133. local function CreateSlider(name, configTable, configKey, min, max, y)
  134.     local Slider = getOrCreateUIElement("frames", "Frame", ScrollingFrame)
  135.     Slider.Size = UDim2.new(1, 0, 0, 50)
  136.     Slider.Position = UDim2.new(0, 0, 0, y)
  137.     Slider.BackgroundTransparency = 1
  138.    
  139.     local Label = getOrCreateUIElement("labels", "TextLabel", Slider)
  140.     Label.Size = UDim2.new(1, 0, 0, 20)
  141.     Label.BackgroundTransparency = 1
  142.     Label.Text = name
  143.     Label.TextColor3 = Color3.fromRGB(255, 255, 255)
  144.     Label.TextXAlignment = Enum.TextXAlignment.Left
  145.    
  146.     local SliderBar = getOrCreateUIElement("frames", "Frame", Slider)
  147.     SliderBar.Size = UDim2.new(1, 0, 0, 5)
  148.     SliderBar.Position = UDim2.new(0, 0, 0.7, 0)
  149.     SliderBar.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  150.    
  151.     local SliderButton = getOrCreateUIElement("buttons", "TextButton", SliderBar)
  152.     SliderButton.Size = UDim2.new(0.1, 0, 0, 20)
  153.     local initialValue = configTable[configKey]
  154.     local initialPosition = (initialValue - min)/(max - min)
  155.     SliderButton.Position = UDim2.new(initialPosition, -10, 0.5, -10)
  156.     SliderButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  157.     SliderButton.Text = ""
  158.    
  159.     local ValueLabel = getOrCreateUIElement("labels", "TextLabel", SliderBar)
  160.     ValueLabel.Size = UDim2.new(0, 50, 0, 20)
  161.     ValueLabel.Position = UDim2.new(1, 10, 0.5, -10)
  162.     ValueLabel.BackgroundTransparency = 1
  163.     ValueLabel.Text = tostring(initialValue)
  164.     ValueLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  165.    
  166.     local dragging = false
  167.    
  168.     SliderButton.MouseButton1Down:Connect(function()
  169.         dragging = true
  170.     end)
  171.    
  172.     UserInputService.InputEnded:Connect(function(input)
  173.         if input.UserInputType == Enum.UserInputType.MouseButton1 then
  174.             dragging = false
  175.         end
  176.     end)
  177.    
  178.     UserInputService.InputChanged:Connect(function(input)
  179.         if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  180.             local mousePos = UserInputService:GetMouseLocation()
  181.             local relativePos = (mousePos.X - SliderBar.AbsolutePosition.X) / SliderBar.AbsoluteSize.X
  182.             relativePos = math.clamp(relativePos, 0, 1)
  183.            
  184.             local value = min + (max - min) * relativePos
  185.             configTable[configKey] = math.floor(value)
  186.             ValueLabel.Text = tostring(math.floor(value))
  187.             SliderButton.Position = UDim2.new(relativePos, -10, 0.5, -10)
  188.            
  189.             -- Atualiza o raio do círculo FOV quando o valor é alterado
  190.             if name == "FOV" then
  191.                 FOVCircle.Radius = value
  192.             end
  193.         end
  194.     end)
  195.    
  196.     return Slider
  197. end
  198.  
  199. -- Criando elementos da interface
  200. local y = 0
  201.  
  202. -- ESP Settings
  203. CreateToggle("ESP Enabled", Config.ESP, "Enabled", y)
  204. y = y + 40
  205. CreateToggle("Show Distance", Config.ESP, "ShowDistance", y)
  206. y = y + 40
  207.  
  208. -- Aimbot Settings
  209. CreateToggle("Aimbot Enabled", Config.Aimbot, "Enabled", y)
  210. y = y + 40
  211. CreateToggle("Show FOV", Config.Aimbot, "ShowFOV", y)
  212. y = y + 40
  213. CreateToggle("Team Check", Config.Aimbot, "TeamCheck", y)
  214. y = y + 40
  215. CreateToggle("Visibility Check", Config.Aimbot, "VisibilityCheck", y)
  216. y = y + 40
  217. CreateSlider("Smoothness", Config.Aimbot, "Smoothness", 0, 1, y)
  218. y = y + 60
  219. CreateSlider("FOV", Config.Aimbot, "FOV", 50, 800, y)
  220. y = y + 60
  221.  
  222. -- Triggerbot Settings
  223. CreateToggle("Triggerbot Enabled", Config.Triggerbot, "Enabled", y)
  224. y = y + 40
  225. CreateSlider("Trigger Delay", Config.Triggerbot, "Delay", 0, 1, y)
  226.  
  227. -- Pool de objetos de desenho
  228. local DrawingPool = {
  229.     squares = {},
  230.     lines = {},
  231.     texts = {}
  232. }
  233.  
  234. -- Funções do Pool
  235. local function getOrCreateDrawing(poolType, drawingType)
  236.     local pool = DrawingPool[poolType]
  237.    
  238.     for i, obj in ipairs(pool) do
  239.         if not obj.InUse then
  240.             obj.InUse = true
  241.             return obj.Drawing
  242.         end
  243.     end
  244.    
  245.     local newDrawing = Drawing.new(drawingType)
  246.     table.insert(pool, {Drawing = newDrawing, InUse = true})
  247.     return newDrawing
  248. end
  249.  
  250. local function releaseDrawing(drawing, poolType)
  251.     local pool = DrawingPool[poolType]
  252.     for _, obj in ipairs(pool) do
  253.         if obj.Drawing == drawing then
  254.             obj.InUse = false
  255.             drawing.Visible = false
  256.             break
  257.         end
  258.     end
  259. end
  260.  
  261. -- Interface
  262. local FOVCircle = Drawing.new("Circle")
  263. FOVCircle.Thickness = 1
  264. FOVCircle.NumSides = 100
  265. FOVCircle.Radius = Config.Aimbot.FOV
  266. FOVCircle.Filled = false
  267. FOVCircle.Visible = Config.Aimbot.ShowFOV
  268. FOVCircle.ZIndex = 999
  269. FOVCircle.Transparency = 0.7
  270. FOVCircle.Color = Color3.fromRGB(255, 255, 255)
  271.  
  272. -- Funções Utilitárias
  273. local function IsAlive(player)
  274.     local character = player.Character
  275.     local humanoid = character and character:FindFirstChild("Humanoid")
  276.     return character and humanoid and humanoid.Health > 0
  277. end
  278.  
  279. local function IsTeammate(player)
  280.     if not Config.Aimbot.TeamCheck then return false end
  281.    
  282.     -- Verificar se o jogador tem uma equipe
  283.     if not player.Team or not LocalPlayer.Team then return false end
  284.    
  285.     -- Retornar true se for da mesma equipe
  286.     return player.Team == LocalPlayer.Team
  287. end
  288.  
  289. local function IsVisible(position)
  290.     if not Config.Aimbot.VisibilityCheck then return true end
  291.     local ray = Ray.new(Camera.CFrame.Position, position - Camera.CFrame.Position)
  292.     local hit = workspace:FindPartOnRayWithIgnoreList(ray, {LocalPlayer.Character, Camera})
  293.     return not hit
  294. end
  295.  
  296. local function GetDistance(position)
  297.     return (Camera.CFrame.Position - position).Magnitude
  298. end
  299.  
  300. -- ESP
  301. local function CreateESP(player)
  302.     local espObjects = {
  303.         box = getOrCreateDrawing("squares", "Square"),
  304.         tracer = getOrCreateDrawing("lines", "Line"),
  305.         name = getOrCreateDrawing("texts", "Text"),
  306.         distance = getOrCreateDrawing("texts", "Text")
  307.     }
  308.    
  309.     local connection = RunService.RenderStepped:Connect(function()
  310.         if not Config.ESP.Enabled or not IsAlive(player) or IsTeammate(player) then
  311.             for _, obj in pairs(espObjects) do
  312.                 obj.Visible = false
  313.             end
  314.             return
  315.         end
  316.        
  317.         local character = player.Character
  318.         local cframe = character:GetPivot()
  319.         local position, visible = Camera:WorldToViewportPoint(cframe.Position)
  320.        
  321.         if visible then
  322.             local distance = GetDistance(cframe.Position)
  323.             local scaleFactor = 1 / (distance * 0.2)
  324.             local size = Vector2.new(2000 * scaleFactor, 2500 * scaleFactor)
  325.            
  326.             -- Box ESP
  327.             espObjects.box.Size = size
  328.             espObjects.box.Position = Vector2.new(position.X - size.X / 2, position.Y - size.Y / 2)
  329.             espObjects.box.Color = Config.ESP.BoxColor
  330.             espObjects.box.Visible = true
  331.             espObjects.box.Thickness = Config.ESP.BoxThickness
  332.             espObjects.box.Filled = false
  333.            
  334.             -- Tracer
  335.             espObjects.tracer.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y)
  336.             espObjects.tracer.To = Vector2.new(position.X, position.Y)
  337.             espObjects.tracer.Color = Config.ESP.TracerColor
  338.             espObjects.tracer.Visible = true
  339.             espObjects.tracer.Thickness = Config.ESP.TracerThickness
  340.            
  341.             -- Name ESP
  342.             espObjects.name.Text = player.Name
  343.             espObjects.name.Position = Vector2.new(position.X, position.Y - size.Y / 2 - 15)
  344.             espObjects.name.Color = Config.ESP.TextColor
  345.             espObjects.name.Size = Config.ESP.TextSize
  346.             espObjects.name.Center = true
  347.             espObjects.name.Visible = true
  348.            
  349.             -- Distance ESP
  350.             if Config.ESP.ShowDistance then
  351.                 espObjects.distance.Text = string.format("%.0fm", distance)
  352.                 espObjects.distance.Position = Vector2.new(position.X, position.Y + size.Y / 2 + 5)
  353.                 espObjects.distance.Color = Config.ESP.TextColor
  354.                 espObjects.distance.Size = Config.ESP.TextSize
  355.                 espObjects.distance.Center = true
  356.                 espObjects.distance.Visible = true
  357.             else
  358.                 espObjects.distance.Visible = false
  359.             end
  360.         else
  361.             for _, obj in pairs(espObjects) do
  362.                 obj.Visible = false
  363.             end
  364.         end
  365.     end)
  366.    
  367.     player.AncestryChanged:Connect(function()
  368.         connection:Disconnect()
  369.         for _, obj in pairs(espObjects) do
  370.             releaseDrawing(obj, "squares")
  371.         end
  372.     end)
  373. end
  374.  
  375. -- Função para calcular o FOV ajustado para a resolução
  376. local function GetAdjustedFOV()
  377.     local aspectRatio = Camera.ViewportSize.X / Camera.ViewportSize.Y
  378.     local baseAspectRatio = 16/9 -- Aspecto padrão
  379.    
  380.     -- Ajusta o FOV baseado na proporção da tela
  381.     if aspectRatio > baseAspectRatio then
  382.         return Config.Aimbot.FOV * (baseAspectRatio / aspectRatio)
  383.     end
  384.     return Config.Aimbot.FOV
  385. end
  386.  
  387. -- Função atualizada para obter o jogador mais próximo
  388. local function GetClosestPlayer()
  389.     local closestPlayer = nil
  390.     local shortestDistance = math.huge
  391.     local mousePos = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)
  392.     local adjustedFOV = GetAdjustedFOV()
  393.    
  394.     for _, player in pairs(Players:GetPlayers()) do
  395.         if player ~= LocalPlayer and IsAlive(player) and not IsTeammate(player) then
  396.             local character = player.Character
  397.             local targetPart = character:FindFirstChild(Config.Aimbot.TargetPart)
  398.            
  399.             if targetPart then
  400.                 local pos, onScreen = Camera:WorldToViewportPoint(targetPart.Position)
  401.                 if onScreen then
  402.                     local targetPos = Vector2.new(pos.X, pos.Y)
  403.                    
  404.                     -- Calcula a distância ajustada para a proporção da tela
  405.                     local deltaX = (targetPos.X - mousePos.X) / (Camera.ViewportSize.X / 1920)
  406.                     local deltaY = (targetPos.Y - mousePos.Y) / (Camera.ViewportSize.Y / 1080)
  407.                     local distance = math.sqrt(deltaX * deltaX + deltaY * deltaY)
  408.                    
  409.                     -- Verifica se o alvo está dentro do FOV ajustado
  410.                     if distance <= adjustedFOV then
  411.                         if IsVisible(targetPart.Position) then
  412.                             if distance < shortestDistance then
  413.                                 closestPlayer = player
  414.                                 shortestDistance = distance
  415.                             end
  416.                         end
  417.                     end
  418.                 end
  419.             end
  420.         end
  421.     end
  422.    
  423.     return closestPlayer, shortestDistance
  424. end
  425.  
  426. -- Inicialização
  427. for _, player in pairs(Players:GetPlayers()) do
  428.     if player ~= LocalPlayer then
  429.         CreateESP(player)
  430.     end
  431. end
  432.  
  433. Players.PlayerAdded:Connect(function(player)
  434.     CreateESP(player)
  435. end)
  436.  
  437. -- Função para limpar a interface
  438. local function CleanupUI()
  439.     for poolType, pool in pairs(UIPool) do
  440.         for _, obj in ipairs(pool) do
  441.             if obj.InUse then
  442.                 releaseUIElement(obj.Instance, poolType)
  443.             end
  444.         end
  445.     end
  446. end
  447.  
  448. -- Tecla para mostrar/esconder a interface
  449. UserInputService.InputBegan:Connect(function(input)
  450.     if input.KeyCode == Enum.KeyCode.RightShift then
  451.         if not MainFrame.Visible then
  452.             CleanupUI()
  453.         end
  454.         MainFrame.Visible = not MainFrame.Visible
  455.     end
  456. end)
  457.  
  458. -- Cache de valores calculados frequentemente
  459. local cachedValues = {
  460.     adjustedFOV = 0,
  461.     screenCenter = Vector2.new(),
  462.     lastTargetCheck = 0,
  463.     lastAimbotUpdate = 0,
  464.     lastTriggerCheck = 0
  465. }
  466.  
  467. -- Constantes para otimização
  468. local UPDATE_INTERVAL = 1/60  -- 60Hz
  469. local TRIGGER_CHECK_INTERVAL = 1/30  -- 30Hz
  470. local TARGET_CHECK_INTERVAL = 1/20   -- 20Hz
  471.  
  472. -- Função otimizada para atualizar valores em cache
  473. local function updateCachedValues()
  474.     local currentTime = tick()
  475.    
  476.     -- Atualiza valores apenas se necessário
  477.     if currentTime - cachedValues.lastTargetCheck >= TARGET_CHECK_INTERVAL then
  478.         cachedValues.adjustedFOV = GetAdjustedFOV()
  479.         cachedValues.screenCenter = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)
  480.         cachedValues.lastTargetCheck = currentTime
  481.     end
  482. end
  483.  
  484. -- Função otimizada para verificar condições do Triggerbot
  485. local function shouldTriggerFire(target, targetPos)
  486.     if not Config.Triggerbot.Enabled then return false end
  487.     if not target or not target.Character then return false end
  488.    
  489.     local currentTime = tick()
  490.     if currentTime - lastTriggerTime < Config.Triggerbot.Delay then return false end
  491.    
  492.     -- Verifica se o mouse está realmente sobre o alvo
  493.     local mousePos = UserInputService:GetMouseLocation()
  494.     local targetScreenPos = Vector2.new(targetPos.X, targetPos.Y)
  495.     local distance = (mousePos - targetScreenPos).Magnitude
  496.    
  497.     -- Adiciona verificações adicionais
  498.     return distance < 5 and
  499.            IsVisible(target.Character[Config.Aimbot.TargetPart].Position) and
  500.            not IsTeammate(target) and
  501.            IsAlive(target)
  502. end
  503.  
  504. -- Loop Principal otimizado
  505. RunService.RenderStepped:Connect(function()
  506.     local currentTime = tick()
  507.     updateCachedValues()
  508.    
  509.     -- Atualiza o círculo FOV apenas quando necessário
  510.     if Config.Aimbot.ShowFOV and Config.Aimbot.Enabled then
  511.         FOVCircle.Position = cachedValues.screenCenter
  512.         FOVCircle.Radius = cachedValues.adjustedFOV
  513.         FOVCircle.Visible = true
  514.     else
  515.         FOVCircle.Visible = false
  516.     end
  517.    
  518.     -- Aimbot
  519.     if Config.Aimbot.Enabled and
  520.        UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton2) and
  521.        currentTime - cachedValues.lastAimbotUpdate >= UPDATE_INTERVAL then
  522.        
  523.         local target, distance = GetClosestPlayer()
  524.        
  525.         if target and target.Character then
  526.             local targetPart = target.Character:FindFirstChild(Config.Aimbot.TargetPart)
  527.            
  528.             if targetPart then
  529.                 local pos = Camera:WorldToViewportPoint(targetPart.Position)
  530.                 local targetPos = Vector2.new(pos.X, pos.Y)
  531.                
  532.                 -- Cálculos otimizados do movimento
  533.                 local deltaX = (targetPos.X - cachedValues.screenCenter.X) / (Camera.ViewportSize.X / 1920)
  534.                 local deltaY = (targetPos.Y - cachedValues.screenCenter.Y) / (Camera.ViewportSize.Y / 1080)
  535.                 local delta = Vector2.new(deltaX, deltaY)
  536.                
  537.                 local smoothness = math.clamp(1 - Config.Aimbot.Smoothness, 0.1, 1)
  538.                 local strength = math.min(1, cachedValues.adjustedFOV / distance)
  539.                 local finalDelta = delta * smoothness * strength
  540.                
  541.                 -- Movimento otimizado
  542.                 if finalDelta.Magnitude > 0.1 then  -- Evita micromovimentos
  543.                     mousemoverel(
  544.                         finalDelta.X * (Camera.ViewportSize.X / 1920),
  545.                         finalDelta.Y * (Camera.ViewportSize.Y / 1080)
  546.                     )
  547.                 end
  548.                
  549.                 cachedValues.lastAimbotUpdate = currentTime
  550.             end
  551.         end
  552.     end
  553.    
  554.     -- Triggerbot otimizado
  555.     if currentTime - cachedValues.lastTriggerCheck >= TRIGGER_CHECK_INTERVAL then
  556.         local target = GetClosestPlayer()
  557.         if target then
  558.             local targetPart = target.Character and target.Character:FindFirstChild(Config.Aimbot.TargetPart)
  559.             if targetPart then
  560.                 local pos = Camera:WorldToViewportPoint(targetPart.Position)
  561.                
  562.                 if shouldTriggerFire(target, pos) then
  563.                     mouse1press()
  564.                     wait(0.05)  -- Pequeno delay para simular clique real
  565.                     mouse1release()
  566.                     lastTriggerTime = currentTime
  567.                 end
  568.             end
  569.         end
  570.         cachedValues.lastTriggerCheck = currentTime
  571.     end
  572. end)
  573.  
Advertisement
Add Comment
Please, Sign In to add comment