Iligrdbjkilaryiknvcx

Aimbot gui

Jul 18th, 2025
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.80 KB | Gaming | 0 0
  1. local Players = game:GetService("Players")
  2. local RunService = game:GetService("RunService")
  3. local Workspace = game:GetService("Workspace")
  4. local Teams = game:GetService("Teams")
  5. local Camera = Workspace.CurrentCamera
  6. local LocalPlayer = Players.LocalPlayer
  7.  
  8. -- GUI Setup
  9. local gui = Instance.new("ScreenGui")
  10. gui.Name = "ExploitTestGUI"
  11. gui.ResetOnSpawn = false
  12. gui.Parent = game.CoreGui
  13.  
  14. local function createButton(name, posY)
  15.     local button = Instance.new("TextButton")
  16.     button.Size = UDim2.new(0, 160, 0, 35)
  17.     button.Position = UDim2.new(0, 20, 0, posY)
  18.     button.Text = name .. ": OFF"
  19.     button.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  20.     button.TextColor3 = Color3.new(1, 1, 1)
  21.     button.TextScaled = true
  22.     button.ZIndex = 9999
  23.     button.Active = true
  24.     button.Draggable = true
  25.     button.Parent = gui
  26.     return button
  27. end
  28.  
  29. -- Toggles
  30. local hacks = {
  31.     Aimbot = false,
  32.     Triggerbot = false,
  33.     ESP = false
  34. }
  35.  
  36. local buttons = {}
  37. buttons.Aimbot = createButton("Aimbot", 150)
  38. buttons.Triggerbot = createButton("Triggerbot", 190)
  39. buttons.ESP = createButton("ESP", 230)
  40.  
  41. for name, button in pairs(buttons) do
  42.     button.MouseButton1Click:Connect(function()
  43.         hacks[name] = not hacks[name]
  44.         button.Text = name .. ": " .. (hacks[name] and "ON" or "OFF")
  45.         button.BackgroundColor3 = hacks[name] and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(255, 0, 0)
  46.     end)
  47. end
  48.  
  49. -- Aimbot with wall check + team check
  50. local function getClosestTarget()
  51.     local closest = nil
  52.     local shortestDist = math.huge
  53.     local origin = Camera.CFrame.Position
  54.  
  55.     for _, plr in pairs(Players:GetPlayers()) do
  56.         if plr ~= LocalPlayer and plr.Team ~= LocalPlayer.Team and plr.Character and plr.Character:FindFirstChild("Head") then
  57.             local head = plr.Character.Head
  58.             local screenPos, onScreen = Camera:WorldToViewportPoint(head.Position)
  59.  
  60.             if onScreen then
  61.                 -- Wall check
  62.                 local rayParams = RaycastParams.new()
  63.                 rayParams.FilterDescendantsInstances = {LocalPlayer.Character}
  64.                 rayParams.FilterType = Enum.RaycastFilterType.Blacklist
  65.                 rayParams.IgnoreWater = true
  66.  
  67.                 local result = Workspace:Raycast(origin, (head.Position - origin).Unit * 500, rayParams)
  68.  
  69.                 if result and result.Instance:IsDescendantOf(plr.Character) then
  70.                     local dist = (Vector2.new(screenPos.X, screenPos.Y) - Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)).Magnitude
  71.                     if dist < shortestDist then
  72.                         shortestDist = dist
  73.                         closest = head
  74.                     end
  75.                 end
  76.             end
  77.         end
  78.     end
  79.  
  80.     return closest
  81. end
  82.  
  83. -- Triggerbot (mobile-friendly)
  84. local debounce = false
  85. local function getEnemyInCrosshair()
  86.     local origin = Camera.CFrame.Position
  87.     local direction = Camera.CFrame.LookVector * 500
  88.  
  89.     local rayParams = RaycastParams.new()
  90.     rayParams.FilterDescendantsInstances = {LocalPlayer.Character}
  91.     rayParams.FilterType = Enum.RaycastFilterType.Blacklist
  92.     rayParams.IgnoreWater = true
  93.  
  94.     local result = Workspace:Raycast(origin, direction, rayParams)
  95.     if result then
  96.         local part = result.Instance
  97.         local char = part:FindFirstAncestorOfClass("Model")
  98.         if char and char ~= LocalPlayer.Character and char:FindFirstChild("Humanoid") then
  99.             local plr = Players:GetPlayerFromCharacter(char)
  100.             if plr and plr.Team ~= LocalPlayer.Team then
  101.                 if part.Name == "Head" or part.Name == "HumanoidRootPart" then
  102.                     return char
  103.                 end
  104.             end
  105.         end
  106.     end
  107.     return nil
  108. end
  109.  
  110. local function simulateMobileFire()
  111.     if not debounce then
  112.         debounce = true
  113.         -- Replace this with your weapon's RemoteEvent if needed
  114.         print("[TRIGGERBOT] Firing at enemy in crosshair!")
  115.         wait(0.1)
  116.         debounce = false
  117.     end
  118. end
  119.  
  120. -- ESP (only for enemies)
  121. local espHighlights = {}
  122.  
  123. local function clearESP()
  124.     for _, h in pairs(espHighlights) do
  125.         if h and h.Parent then
  126.             h:Destroy()
  127.         end
  128.     end
  129.     espHighlights = {}
  130. end
  131.  
  132. local function updateESP()
  133.     clearESP()
  134.     for _, plr in pairs(Players:GetPlayers()) do
  135.         if plr ~= LocalPlayer and plr.Team ~= LocalPlayer.Team and plr.Character and plr.Character:FindFirstChild("Head") then
  136.             local highlight = Instance.new("Highlight")
  137.             highlight.Name = "ESP_Highlight"
  138.             highlight.Adornee = plr.Character
  139.             highlight.FillColor = Color3.fromRGB(255, 0, 0)
  140.             highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
  141.             highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  142.             highlight.Parent = plr.Character
  143.             table.insert(espHighlights, highlight)
  144.         end
  145.     end
  146. end
  147.  
  148. -- Main loop
  149. RunService.RenderStepped:Connect(function()
  150.     if hacks.Aimbot then
  151.         local target = getClosestTarget()
  152.         if target then
  153.             local camPos = Camera.CFrame.Position
  154.             Camera.CFrame = CFrame.new(camPos, target.Position)
  155.         end
  156.     end
  157.  
  158.     if hacks.Triggerbot then
  159.         local enemyChar = getEnemyInCrosshair()
  160.         if enemyChar then
  161.             simulateMobileFire()
  162.         end
  163.     end
  164.  
  165.     if hacks.ESP then
  166.         updateESP()
  167.     else
  168.         clearESP()
  169.     end
  170. end)
Advertisement
Add Comment
Please, Sign In to add comment