Advertisement
dusturafid

Arsenal AIM LOCK BRO

Nov 15th, 2019
18,650
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.82 KB | None | 0 0
  1. local plrs = game:GetService("Players")
  2. local TeamBased = true ; local teambasedswitch = "o"
  3. local presskeytoaim = true; local aimkey = "e"
  4. local raycast = false
  5.  
  6. local espupdatetime = 5; autoesp = false
  7.  
  8. local lockaim = true; local lockangle = 5
  9.  
  10. local Gui = Instance.new("ScreenGui")
  11. local Move = Instance.new("Frame")
  12. local Main = Instance.new("Frame")
  13. local EspStatus = Instance.new("TextLabel")
  14. local st1 = Instance.new("TextLabel")
  15. local st1_2 = Instance.new("TextLabel")
  16. local st1_3 = Instance.new("TextLabel")
  17. local Name = Instance.new("TextLabel")
  18. Gui.Name = "Gui"
  19. Gui.Parent = plrs.LocalPlayer:WaitForChild("PlayerGui")
  20.  
  21. Move.Name = "Move"
  22. Move.Parent = Gui
  23. Move.BackgroundColor3 = Color3.new(0.545098, 0, 0)
  24. Move.BackgroundTransparency = 1
  25. Move.BorderSizePixel = 0
  26. Move.Draggable = true
  27. Move.Position = UDim2.new(0.005, 0, -0.15, 0)
  28. Move.Size = UDim2.new(0.28141585, 0, 0.0320388414, 0)
  29.  
  30. Main.Name = "Main"
  31. Main.Parent = Move
  32. Main.BackgroundColor3 = Color3.new(1, 1, 1)
  33. Main.Position = UDim2.new(0, -7, 20.9960003, 0)
  34. Main.Size = UDim2.new(1, 0, 5.79699993, 0)
  35. Main.Style = Enum.FrameStyle.RobloxSquare
  36.  
  37. EspStatus.Name = "EspStatus"
  38. EspStatus.Parent = Main
  39. EspStatus.BackgroundColor3 = Color3.new(1, 1, 1)
  40. EspStatus.BackgroundTransparency = 1
  41. EspStatus.Position = UDim2.new(0, 0, 0.300000012, 0)
  42. EspStatus.Size = UDim2.new(1, 0, 0.162, 0)
  43. EspStatus.Font = Enum.Font.ArialBold
  44. EspStatus.Text = "Press O to change team based mode"
  45. EspStatus.TextColor3 = Color3.new(0.6, 0.196078, 0.8)
  46. EspStatus.TextScaled = true
  47. EspStatus.TextWrapped = true
  48.  
  49. st1.Name = "st1"
  50. st1.Parent = Main
  51. st1.BackgroundColor3 = Color3.new(1, 1, 1)
  52. st1.BackgroundTransparency = 1
  53. st1.Position = UDim2.new(0.271787882, 0, 0, 0)
  54. st1.Size = UDim2.new(0.728211343, 0, 0.161862016, 0)
  55. st1.Font = Enum.Font.ArialBold
  56. st1.Text = ""
  57. st1.TextColor3 = Color3.new(0.0784314, 0.541176, 0)
  58. st1.TextScaled = true
  59. st1.TextSize = 14
  60. st1.TextWrapped = true
  61.  
  62. st1_2.Name = "st1"
  63. st1_2.Parent = Main
  64. st1_2.BackgroundColor3 = Color3.new(1, 1, 1)
  65. st1_2.BackgroundTransparency = 1
  66. st1_2.Position = UDim2.new(0, 0, 0.875999987, 0)
  67. st1_2.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
  68. st1_2.Font = Enum.Font.ArialBold
  69. st1_2.Text = "Press E to lock on a person inside ur view"
  70. st1_2.TextColor3 = Color3.new(0.6, 0.196078, 0.8)
  71. st1_2.TextScaled = true
  72. st1_2.TextWrapped = true
  73.  
  74. st1_3.Name = "st1"
  75. st1_3.Parent = Main
  76. st1_3.BackgroundColor3 = Color3.new(1, 1, 1)
  77. st1_3.BackgroundTransparency = 1
  78. st1_3.Position = UDim2.new(0, 0, 0.54, 0)
  79. st1_3.Size = UDim2.new(1, 0, 0.261999995, 0)
  80. st1_3.Font = Enum.Font.ArialBold
  81. st1_3.Text = "Press L to enable esp loop and press T to update esp"
  82. st1_3.TextColor3 = Color3.new(0.6, 0.196078, 0.8)
  83. st1_3.TextScaled = true
  84. st1_3.TextWrapped = true
  85.  
  86.  
  87. Name.Name = "Name"
  88. Name.Parent = Move
  89. Name.BackgroundColor3 = Color3.new(0.545098, 0, 0)
  90. Name.BackgroundTransparency = 1
  91. Name.Position = UDim2.new(0, 25, 20.9860001, 0)
  92. Name.Size = UDim2.new(0.838, 0, 1.27999997, 0)
  93. Name.Font = Enum.Font.Arcade
  94. Name.Text = "ARSENAL GUI"
  95. Name.TextColor3 = Color3.new(0.541176, 0.168627, 0.886275)
  96. Name.TextScaled = true
  97. Name.TextSize = 12
  98. Name.TextWrapped = true
  99. -- Scripts:
  100.  
  101.  
  102. local plrsforaim = {}
  103.  
  104. local lplr = game:GetService("Players").LocalPlayer
  105. Move.Draggable = true
  106. Gui.ResetOnSpawn = false
  107. Gui.Name = "Chat"
  108. Gui.DisplayOrder = 999
  109.  
  110.     Gui.Parent = plrs.LocalPlayer.PlayerGui
  111.  
  112.  
  113. f = {}
  114. local espforlder
  115.  
  116. f.addesp = function()
  117.     if espforlder then
  118.     else
  119.         espforlder = Instance.new("Folder")
  120.         espforlder.Parent = game.Workspace.CurrentCamera
  121.     end
  122.     for i, v in pairs(espforlder:GetChildren()) do
  123.         v:Destroy()
  124.     end
  125.     for _, plr in pairs(plrs:GetChildren()) do
  126.         if plr.Character and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name then
  127.             if TeamBased == true then
  128.                 if plr.Team.Name ~= plrs.LocalPlayer.Team.Name  then
  129.                     local e = espforlder:FindFirstChild(plr.Name)
  130.                     if not e then
  131.                         local bill = Instance.new("BillboardGui", espforlder)
  132.                         bill.Name = plr.Name
  133.                         bill.AlwaysOnTop = true
  134.                         bill.Size = UDim2.new(1,0,1,0)
  135.                         bill.Adornee = plr.Character.Head
  136.                         local Frame = Instance.new('Frame',bill)
  137.                         Frame.Active = true
  138.                         Frame.BackgroundColor3 = Color3.new(0.541176, 0.168627, 0.886275)
  139.                         Frame.BackgroundTransparency = 0
  140.                         Frame.BorderSizePixel = 0
  141.                         Frame.AnchorPoint = Vector2.new(.5, .5)
  142.                         Frame.Position = UDim2.new (0.5,0,0.5,0)
  143.                         Frame.Size = UDim2.new (1,0,1,0)
  144.                         Frame.Rotation = 0
  145.                         plr.Character.Humanoid.Died:Connect(function()
  146.                             bill:Destroy()
  147.                         end)
  148.                     end
  149.                 end
  150.             else
  151.                 local e = espforlder:FindFirstChild(plr.Name)
  152.                 if not e then
  153.                     --print("Added esp")
  154.                     local bill = Instance.new("BillboardGui", espforlder)
  155.                     bill.Name = plr.Name
  156.                     bill.AlwaysOnTop = true
  157.                     bill.Size = UDim2.new(1,0,1,0)
  158.                     bill.Adornee = plr.Character.Head
  159.                     local Frame = Instance.new('Frame',bill)
  160.                     Frame.Active = true
  161.                     Frame.BackgroundColor3 = Color3.new(0.541176, 0.168627, 0.886275)
  162.                     Frame.BackgroundTransparency = 0
  163.                     Frame.BorderSizePixel = 0
  164.                     Frame.AnchorPoint = Vector2.new(.5, .5)
  165.                     Frame.Position = UDim2.new (0.5,0,0.5,0)
  166.                     Frame.Size = UDim2.new (1,0,1,0)
  167.                     Frame.Rotation = 0
  168.                     plr.Character.Humanoid.Died:Connect(function()
  169.                         bill:Destroy()
  170.                     end)
  171.                 end
  172.             end
  173.            
  174.            
  175.         end
  176.     end
  177. end
  178. local cam = game.Workspace.CurrentCamera
  179.  
  180. local mouse = lplr:GetMouse()
  181. local switch = false
  182. local key = "k"
  183. local aimatpart = nil
  184. mouse.KeyDown:Connect(function(a)
  185.     if a == "t" then
  186.         print("worked1")
  187.         f.addesp()
  188.     elseif a == "u" then
  189.         if raycast == true then
  190.             raycast = false
  191.         else
  192.             raycast = true
  193.         end
  194.     elseif a == "l" then
  195.         if autoesp == false then
  196.             autoesp = true
  197.         else
  198.             autoesp = false
  199.         end
  200.     end
  201.     if a == "j" then
  202.         if mouse.Target then
  203.             mouse.Target:Destroy()
  204.         end
  205.     end
  206.     if a == key then
  207.         if switch == false then
  208.             switch = true
  209.         else
  210.             switch = false
  211.             if aimatpart ~= nil then
  212.                 aimatpart = nil
  213.             end
  214.         end
  215.     elseif a == teambasedswitch then
  216.         if TeamBased == true then
  217.             TeamBased = false
  218.             teambasedstatus.Text = tostring(TeamBased)
  219.         else
  220.             TeamBased = true
  221.             teambasedstatus.Text = tostring(TeamBased)
  222.         end
  223.     elseif a == aimkey then
  224.         if not aimatpart then
  225.             local maxangle = math.rad(20)
  226.             for i, plr in pairs(plrs:GetChildren()) do
  227.                 if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
  228.                     if TeamBased == true then
  229.                         if plr.Team.Name ~= lplr.Team.Name then
  230.                             local an = checkfov(plr.Character.Head)
  231.                             if an < maxangle then
  232.                                 maxangle = an
  233.                                 aimatpart = plr.Character.Head
  234.                             end
  235.                         end
  236.                     else
  237.                         local an = checkfov(plr.Character.Head)
  238.                             if an < maxangle then
  239.                                 maxangle = an
  240.                                 aimatpart = plr.Character.Head
  241.                             end
  242.                             print(plr)
  243.                     end
  244.                     plr.Character.Humanoid.Died:Connect(function()
  245.                         if aimatpart.Parent == plr.Character or aimatpart == nil then
  246.                             aimatpart = nil
  247.                         end
  248.                     end)
  249.                 end
  250.             end
  251.         else
  252.             aimatpart = nil
  253.         end
  254.     end
  255. end)
  256.  
  257. function getfovxyz (p0, p1, deg)
  258.     local x1, y1, z1 = p0:ToOrientation()
  259.     local cf = CFrame.new(p0.p, p1.p)
  260.     local x2, y2, z2 = cf:ToOrientation()
  261.     if deg then
  262.     else
  263.         return Vector3.new((x1-x2), (y1-y2), (z1-z2))
  264.     end
  265. end
  266.  
  267. function getaimbotplrs()
  268.     plrsforaim = {}
  269.     for i, plr in pairs(plrs:GetChildren()) do
  270.         if plr.Character and plr.Character.Humanoid and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name and plr.Character.Head then
  271.            
  272.             if TeamBased == true then
  273.                 if plr.Team.Name ~= lplr.Team.Name then
  274.                     local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
  275.                     local r = Ray.new(cf, cf.LookVector * 10000)
  276.                     local ign = {}
  277.                     for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
  278.                         if v:IsA("BasePart") then
  279.                             table.insert(ign , v)
  280.                         end
  281.                     end
  282.                     local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
  283.                     if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
  284.                         table.insert(plrsforaim, obj)
  285.                     end
  286.                 end
  287.             else
  288.                 local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
  289.                 local r = Ray.new(cf, cf.LookVector * 10000)
  290.                 local ign = {}
  291.                 for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
  292.                     if v:IsA("BasePart") then
  293.                         table.insert(ign , v)
  294.                     end
  295.                 end
  296.                 local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
  297.                 if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
  298.                     table.insert(plrsforaim, obj)
  299.                 end
  300.             end
  301.            
  302.            
  303.         end
  304.     end
  305. end
  306.  
  307. function aimat(part)
  308.     cam.CFrame = CFrame.new(cam.CFrame.p, part.CFrame.p)
  309. end
  310. function checkfov (part)
  311.     local fov = getfovxyz(game.Workspace.CurrentCamera.CFrame, part.CFrame)
  312.     local angle = math.abs(fov.X) + math.abs(fov.Y)
  313.     return angle
  314. end
  315.  
  316. game:GetService("RunService").RenderStepped:Connect(function()
  317.     if aimatpart then
  318.         aimat(aimatpart)
  319.         if aimatpart.Parent == plrs.LocalPlayer.Character then
  320.             aimatpart = nil
  321.         end
  322.     end
  323.    
  324.    
  325.  
  326.         if raycast == true and switch == false and not aimatpart then
  327.             getaimbotplrs()
  328.             aimatpart = nil
  329.             local maxangle = 999
  330.             for i, v in ipairs(plrsforaim) do
  331.                 if v.Parent ~= lplr.Character then
  332.                     local an = checkfov(v)
  333.                     if an < maxangle and v ~= lplr.Character.Head then
  334.                         maxangle = an
  335.                         aimatpart = v
  336.                         print(v:GetFullName())
  337.                         v.Parent.Humanoid.Died:connect(function()
  338.                             aimatpart = nil
  339.                         end)
  340.                     end
  341.                 end
  342.             end
  343.        
  344.     end
  345. end)
  346. delay(0, function()
  347.     while wait(espupdatetime) do
  348.         if autoesp == true then
  349.             pcall(function()
  350.             f.addesp()
  351.             end)
  352.         end
  353.     end
  354. end)
  355. warn("loaded")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement