WannaFarm_YouTube

ROBLOX Arsenal GUI (WORKING 2020)

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