Iligrdbjkilaryiknvcx

Aimbot gui

Jul 18th, 2025
72,688
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.16 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.     TeamCheck = true  -- Default to true for safety
  35. }
  36.  
  37. local buttons = {}
  38. buttons.Aimbot = createButton("Aimbot", 150)
  39. buttons.Triggerbot = createButton("Triggerbot", 190)
  40. buttons.ESP = createButton("ESP", 230)
  41. buttons.TeamCheck = createButton("Team Check", 270)
  42.  
  43. -- Initialize team check button state
  44. buttons.TeamCheck.Text = "Team Check: " .. (hacks.TeamCheck and "ON" or "OFF")
  45. buttons.TeamCheck.BackgroundColor3 = hacks.TeamCheck and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(255, 0, 0)
  46.  
  47. for name, button in pairs(buttons) do
  48.     button.MouseButton1Click:Connect(function()
  49.         hacks[name] = not hacks[name]
  50.         button.Text = name .. ": " .. (hacks[name] and "ON" or "OFF")
  51.         button.BackgroundColor3 = hacks[name] and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(255, 0, 0)
  52.     end)
  53. end
  54.  
  55. -- Aimbot with wall check + team check
  56. local function getClosestTarget()
  57.     local closest = nil
  58.     local shortestDist = math.huge
  59.     local origin = Camera.CFrame.Position
  60.  
  61.     for _, plr in pairs(Players:GetPlayers()) do
  62.         -- Team check condition
  63.         local teamCheckPassed = not hacks.TeamCheck or (plr.Team ~= LocalPlayer.Team)
  64.        
  65.         if plr ~= LocalPlayer and teamCheckPassed and plr.Character and plr.Character:FindFirstChild("Head") then
  66.             local head = plr.Character.Head
  67.             local screenPos, onScreen = Camera:WorldToViewportPoint(head.Position)
  68.  
  69.             if onScreen then
  70.                 -- Wall check
  71.                 local rayParams = RaycastParams.new()
  72.                 rayParams.FilterDescendantsInstances = {LocalPlayer.Character}
  73.                 rayParams.FilterType = Enum.RaycastFilterType.Blacklist
  74.                 rayParams.IgnoreWater = true
  75.  
  76.                 local result = Workspace:Raycast(origin, (head.Position - origin).Unit * 500, rayParams)
  77.  
  78.                 if result and result.Instance:IsDescendantOf(plr.Character) then
  79.                     local dist = (Vector2.new(screenPos.X, screenPos.Y) - Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)).Magnitude
  80.                     if dist < shortestDist then
  81.                         shortestDist = dist
  82.                         closest = head
  83.                     end
  84.                 end
  85.             end
  86.         end
  87.     end
  88.  
  89.     return closest
  90. end
  91.  
  92. -- Triggerbot (mobile-friendly)
  93. local debounce = false
  94. local function getEnemyInCrosshair()
  95.     local origin = Camera.CFrame.Position
  96.     local direction = Camera.CFrame.LookVector * 500
  97.  
  98.     local rayParams = RaycastParams.new()
  99.     rayParams.FilterDescendantsInstances = {LocalPlayer.Character}
  100.     rayParams.FilterType = Enum.RaycastFilterType.Blacklist
  101.     rayParams.IgnoreWater = true
  102.  
  103.     local result = Workspace:Raycast(origin, direction, rayParams)
  104.     if result then
  105.         local part = result.Instance
  106.         local char = part:FindFirstAncestorOfClass("Model")
  107.         if char and char ~= LocalPlayer.Character and char:FindFirstChild("Humanoid") then
  108.             local plr = Players:GetPlayerFromCharacter(char)
  109.             -- Team check condition
  110.             local teamCheckPassed = not hacks.TeamCheck or (plr and plr.Team ~= LocalPlayer.Team)
  111.             if plr and teamCheckPassed then
  112.                 if part.Name == "Head" or part.Name == "HumanoidRootPart" then
  113.                     return char
  114.                 end
  115.             end
  116.         end
  117.     end
  118.     return nil
  119. end
  120.  
  121. local function simulateMobileFire()
  122.     if not debounce then
  123.         debounce = true
  124.         -- Replace this with your weapon's RemoteEvent if needed
  125.         print("[TRIGGERBOT] Firing at enemy in crosshair!")
  126.         wait(0.1)
  127.         debounce = false
  128.     end
  129. end
  130.  
  131. -- ESP (only for enemies)
  132. local espHighlights = {}
  133.  
  134. local function clearESP()
  135.     for _, h in pairs(espHighlights) do
  136.         if h and h.Parent then
  137.             h:Destroy()
  138.         end
  139.     end
  140.     espHighlights = {}
  141. end
  142.  
  143. local function updateESP()
  144.     clearESP()
  145.     for _, plr in pairs(Players:GetPlayers()) do
  146.         -- Team check condition
  147.         local teamCheckPassed = not hacks.TeamCheck or (plr.Team ~= LocalPlayer.Team)
  148.        
  149.         if plr ~= LocalPlayer and teamCheckPassed and plr.Character and plr.Character:FindFirstChild("Head") then
  150.             local highlight = Instance.new("Highlight")
  151.             highlight.Name = "ESP_Highlight"
  152.             highlight.Adornee = plr.Character
  153.             highlight.FillColor = Color3.fromRGB(255, 0, 0)
  154.             highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
  155.             highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  156.             highlight.Parent = plr.Character
  157.             table.insert(espHighlights, highlight)
  158.         end
  159.     end
  160. end
  161.  
  162. -- Main loop
  163. RunService.RenderStepped:Connect(function()
  164.     if hacks.Aimbot then
  165.         local target = getClosestTarget()
  166.         if target then
  167.             local camPos = Camera.CFrame.Position
  168.             Camera.CFrame = CFrame.new(camPos, target.Position)
  169.         end
  170.     end
  171.  
  172.     if hacks.Triggerbot then
  173.         local enemyChar = getEnemyInCrosshair()
  174.         if enemyChar then
  175.             simulateMobileFire()
  176.         end
  177.     end
  178.  
  179.     if hacks.ESP then
  180.         updateESP()
  181.     else
  182.         clearESP()
  183.     end
  184. end)
Advertisement
Add Comment
Please, Sign In to add comment