Advertisement
NikitaPlaysYT

ROBLOX Arsenal GUI

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