Elhack123

hack de arsenal

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