ToolBLX

Arsenal Hack - ToolBLX

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