· 4 years ago · Mar 23, 2021, 12:14 PM
1local plrs = game:GetService("Players")
2local TeamBased = true ; local teambasedswitch = "o"
3local presskeytoaim = true; local aimkey = "e"
4local raycast = false
5
6local espupdatetime = 5; autoesp = false
7
8
9
10local 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
27local Gui = Instance.new("ScreenGui")
28local Move = Instance.new("Frame")
29local Main = Instance.new("Frame")
30local EspStatus = Instance.new("TextLabel")
31local st1 = Instance.new("TextLabel")
32local st1_2 = Instance.new("TextLabel")
33local st1_3 = Instance.new("TextLabel")
34local Name = Instance.new("TextLabel")
35--Properties:
36Gui.Name = "Gui"
37Gui.Parent = plrs.LocalPlayer:WaitForChild("PlayerGui")
38
39Move.Name = "Move"
40Move.Parent = Gui
41Move.BackgroundColor3 = Color3.new(0.545098, 0, 0)
42Move.BackgroundTransparency = 1
43Move.BorderSizePixel = 0
44Move.Draggable = true
45Move.Position = UDim2.new(0.005, 0, -0.15, 0)
46Move.Size = UDim2.new(0.28141585, 0, 0.0320388414, 0)
47
48Main.Name = "Main"
49Main.Parent = Move
50Main.BackgroundColor3 = Color3.new(1, 1, 1)
51Main.Position = UDim2.new(0, -7, 20.9960003, 0)
52Main.Size = UDim2.new(1, 0, 5.79699993, 0)
53Main.Style = Enum.FrameStyle.RobloxSquare
54
55EspStatus.Name = "EspStatus"
56EspStatus.Parent = Main
57EspStatus.BackgroundColor3 = Color3.new(1, 1, 1)
58EspStatus.BackgroundTransparency = 1
59EspStatus.Position = UDim2.new(0, 0, 0.300000012, 0)
60EspStatus.Size = UDim2.new(1, 0, 0.162, 0)
61EspStatus.Font = Enum.Font.ArialBold
62EspStatus.Text = "Press O to change team based mode"
63EspStatus.TextColor3 = Color3.new(0.6, 0.196078, 0.8)
64EspStatus.TextScaled = true
65EspStatus.TextWrapped = true
66
67st1.Name = "st1"
68st1.Parent = Main
69st1.BackgroundColor3 = Color3.new(1, 1, 1)
70st1.BackgroundTransparency = 1
71st1.Position = UDim2.new(0.271787882, 0, 0, 0)
72st1.Size = UDim2.new(0.728211343, 0, 0.161862016, 0)
73st1.Font = Enum.Font.ArialBold
74st1.Text = ""
75st1.TextColor3 = Color3.new(0.0784314, 0.541176, 0)
76st1.TextScaled = true
77st1.TextSize = 14
78st1.TextWrapped = true
79
80st1_2.Name = "st1"
81st1_2.Parent = Main
82st1_2.BackgroundColor3 = Color3.new(1, 1, 1)
83st1_2.BackgroundTransparency = 1
84st1_2.Position = UDim2.new(0, 0, 0.875999987, 0)
85st1_2.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
86st1_2.Font = Enum.Font.ArialBold
87st1_2.Text = "Press E to lock on a person inside ur view"
88st1_2.TextColor3 = Color3.new(0.6, 0.196078, 0.8)
89st1_2.TextScaled = true
90st1_2.TextWrapped = true
91
92st1_3.Name = "st1"
93st1_3.Parent = Main
94st1_3.BackgroundColor3 = Color3.new(1, 1, 1)
95st1_3.BackgroundTransparency = 1
96st1_3.Position = UDim2.new(0, 0, 0.54, 0)
97st1_3.Size = UDim2.new(1, 0, 0.261999995, 0)
98st1_3.Font = Enum.Font.ArialBold
99st1_3.Text = "Press L to enable esp loop and press T to update esp"
100st1_3.TextColor3 = Color3.new(0.6, 0.196078, 0.8)
101st1_3.TextScaled = true
102st1_3.TextWrapped = true
103
104
105Name.Name = "Name"
106Name.Parent = Move
107Name.BackgroundColor3 = Color3.new(0.545098, 0, 0)
108Name.BackgroundTransparency = 1
109Name.Position = UDim2.new(0, 25, 20.9860001, 0)
110Name.Size = UDim2.new(0.838, 0, 1.27999997, 0)
111Name.Font = Enum.Font.Arcade
112Name.Text = "ARSENAL GUI"
113Name.TextColor3 = Color3.new(0.541176, 0.168627, 0.886275)
114Name.TextScaled = true
115Name.TextSize = 12
116Name.TextWrapped = true
117-- Scripts:
118
119
120local plrsforaim = {}
121
122local lplr = game:GetService("Players").LocalPlayer
123Move.Draggable = true
124Gui.ResetOnSpawn = false
125Gui.Name = "Chat"
126Gui.DisplayOrder = 999
127
128 Gui.Parent = plrs.LocalPlayer.PlayerGui
129
130
131f = {}
132local espforlder
133
134f.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
197end
198local cam = game.Workspace.CurrentCamera
199
200local mouse = lplr:GetMouse()
201local switch = false
202local key = "k"
203local aimatpart = nil
204mouse.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
275end)
276
277function 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
287end
288
289function 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
327end
328
329function aimat(part)
330 cam.CFrame = CFrame.new(cam.CFrame.p, part.CFrame.p)
331end
332function 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
336end
337
338game: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
404end)
405delay(0, function()
406 while wait(espupdatetime) do
407 if autoesp == true then
408 pcall(function()
409 f.addesp()
410 end)
411 end
412 end
413end)
414warn("loaded")
415RAW Paste Data
416local plrs = game:GetService("Players")
417local TeamBased = true ; local teambasedswitch = "o"
418local presskeytoaim = true; local aimkey = "e"
419local raycast = false
420
421local espupdatetime = 5; autoesp = false
422
423
424
425local lockaim = true; local lockangle = 5
426
427
428
429--function findwat(folder, what)
430-- for i, smth in pairs(folder:GetChildren()) do
431-- if string.find(string.lower(tostring(smth)), string.lower(what)) then
432-- return smth
433-- end
434-- end
435--end
436--
437--local plrs = findwat(game, "Players")
438
439
440
441
442local Gui = Instance.new("ScreenGui")
443local Move = Instance.new("Frame")
444local Main = Instance.new("Frame")
445local EspStatus = Instance.new("TextLabel")
446local st1 = Instance.new("TextLabel")
447local st1_2 = Instance.new("TextLabel")
448local st1_3 = Instance.new("TextLabel")
449local Name = Instance.new("TextLabel")
450--Properties:
451Gui.Name = "Gui"
452Gui.Parent = plrs.LocalPlayer:WaitForChild("PlayerGui")
453
454Move.Name = "Move"
455Move.Parent = Gui
456Move.BackgroundColor3 = Color3.new(0.545098, 0, 0)
457Move.BackgroundTransparency = 1
458Move.BorderSizePixel = 0
459Move.Draggable = true
460Move.Position = UDim2.new(0.005, 0, -0.15, 0)
461Move.Size = UDim2.new(0.28141585, 0, 0.0320388414, 0)
462
463Main.Name = "Main"
464Main.Parent = Move
465Main.BackgroundColor3 = Color3.new(1, 1, 1)
466Main.Position = UDim2.new(0, -7, 20.9960003, 0)
467Main.Size = UDim2.new(1, 0, 5.79699993, 0)
468Main.Style = Enum.FrameStyle.RobloxSquare
469
470EspStatus.Name = "EspStatus"
471EspStatus.Parent = Main
472EspStatus.BackgroundColor3 = Color3.new(1, 1, 1)
473EspStatus.BackgroundTransparency = 1
474EspStatus.Position = UDim2.new(0, 0, 0.300000012, 0)
475EspStatus.Size = UDim2.new(1, 0, 0.162, 0)
476EspStatus.Font = Enum.Font.ArialBold
477EspStatus.Text = "Press O to change team based mode"
478EspStatus.TextColor3 = Color3.new(0.6, 0.196078, 0.8)
479EspStatus.TextScaled = true
480EspStatus.TextWrapped = true
481
482st1.Name = "st1"
483st1.Parent = Main
484st1.BackgroundColor3 = Color3.new(1, 1, 1)
485st1.BackgroundTransparency = 1
486st1.Position = UDim2.new(0.271787882, 0, 0, 0)
487st1.Size = UDim2.new(0.728211343, 0, 0.161862016, 0)
488st1.Font = Enum.Font.ArialBold
489st1.Text = ""
490st1.TextColor3 = Color3.new(0.0784314, 0.541176, 0)
491st1.TextScaled = true
492st1.TextSize = 14
493st1.TextWrapped = true
494
495st1_2.Name = "st1"
496st1_2.Parent = Main
497st1_2.BackgroundColor3 = Color3.new(1, 1, 1)
498st1_2.BackgroundTransparency = 1
499st1_2.Position = UDim2.new(0, 0, 0.875999987, 0)
500st1_2.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
501st1_2.Font = Enum.Font.ArialBold
502st1_2.Text = "Press E to lock on a person inside ur view"
503st1_2.TextColor3 = Color3.new(0.6, 0.196078, 0.8)
504st1_2.TextScaled = true
505st1_2.TextWrapped = true
506
507st1_3.Name = "st1"
508st1_3.Parent = Main
509st1_3.BackgroundColor3 = Color3.new(1, 1, 1)
510st1_3.BackgroundTransparency = 1
511st1_3.Position = UDim2.new(0, 0, 0.54, 0)
512st1_3.Size = UDim2.new(1, 0, 0.261999995, 0)
513st1_3.Font = Enum.Font.ArialBold
514st1_3.Text = "Press L to enable esp loop and press T to update esp"
515st1_3.TextColor3 = Color3.new(0.6, 0.196078, 0.8)
516st1_3.TextScaled = true
517st1_3.TextWrapped = true
518
519
520Name.Name = "Name"
521Name.Parent = Move
522Name.BackgroundColor3 = Color3.new(0.545098, 0, 0)
523Name.BackgroundTransparency = 1
524Name.Position = UDim2.new(0, 25, 20.9860001, 0)
525Name.Size = UDim2.new(0.838, 0, 1.27999997, 0)
526Name.Font = Enum.Font.Arcade
527Name.Text = "ARSENAL GUI"
528Name.TextColor3 = Color3.new(0.541176, 0.168627, 0.886275)
529Name.TextScaled = true
530Name.TextSize = 12
531Name.TextWrapped = true
532-- Scripts:
533
534
535local plrsforaim = {}
536
537local lplr = game:GetService("Players").LocalPlayer
538Move.Draggable = true
539Gui.ResetOnSpawn = false
540Gui.Name = "Chat"
541Gui.DisplayOrder = 999
542
543 Gui.Parent = plrs.LocalPlayer.PlayerGui
544
545
546f = {}
547local espforlder
548
549f.addesp = function()
550 --print("ESP ran")
551 if espforlder then
552 else
553 espforlder = Instance.new("Folder")
554 espforlder.Parent = game.Workspace.CurrentCamera
555 end
556 for i, v in pairs(espforlder:GetChildren()) do
557 v:Destroy()
558 end
559 for _, plr in pairs(plrs:GetChildren()) do
560 if plr.Character and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name then
561 if TeamBased == true then
562 if plr.Team.Name ~= plrs.LocalPlayer.Team.Name then
563 local e = espforlder:FindFirstChild(plr.Name)
564 if not e then
565 --print("Added esp for team based")
566 local bill = Instance.new("BillboardGui", espforlder)
567 bill.Name = plr.Name
568 bill.AlwaysOnTop = true
569 bill.Size = UDim2.new(1,0,1,0)
570 bill.Adornee = plr.Character.Head
571 local Frame = Instance.new('Frame',bill)
572 Frame.Active = true
573 Frame.BackgroundColor3 = Color3.new(0.541176, 0.168627, 0.886275)
574 Frame.BackgroundTransparency = 0
575 Frame.BorderSizePixel = 0
576 Frame.AnchorPoint = Vector2.new(.5, .5)
577 Frame.Position = UDim2.new (0.5,0,0.5,0)
578 Frame.Size = UDim2.new (1,0,1,0)
579 Frame.Rotation = 0
580 plr.Character.Humanoid.Died:Connect(function()
581 bill:Destroy()
582 end)
583 end
584 end
585 else
586 local e = espforlder:FindFirstChild(plr.Name)
587 if not e then
588 --print("Added esp")
589 local bill = Instance.new("BillboardGui", espforlder)
590 bill.Name = plr.Name
591 bill.AlwaysOnTop = true
592 bill.Size = UDim2.new(1,0,1,0)
593 bill.Adornee = plr.Character.Head
594 local Frame = Instance.new('Frame',bill)
595 Frame.Active = true
596 Frame.BackgroundColor3 = Color3.new(0.541176, 0.168627, 0.886275)
597 Frame.BackgroundTransparency = 0
598 Frame.BorderSizePixel = 0
599 Frame.AnchorPoint = Vector2.new(.5, .5)
600 Frame.Position = UDim2.new (0.5,0,0.5,0)
601 Frame.Size = UDim2.new (1,0,1,0)
602 Frame.Rotation = 0
603 plr.Character.Humanoid.Died:Connect(function()
604 bill:Destroy()
605 end)
606 end
607 end
608
609
610 end
611 end
612end
613local cam = game.Workspace.CurrentCamera
614
615local mouse = lplr:GetMouse()
616local switch = false
617local key = "k"
618local aimatpart = nil
619mouse.KeyDown:Connect(function(a)
620 if a == "t" then
621 print("worked1")
622 f.addesp()
623 elseif a == "u" then
624 if raycast == true then
625 raycast = false
626 else
627 raycast = true
628 end
629 elseif a == "l" then
630 if autoesp == false then
631 autoesp = true
632 else
633 autoesp = false
634 end
635 end
636 if a == "j" then
637 if mouse.Target then
638 mouse.Target:Destroy()
639 end
640 end
641 if a == key then
642 if switch == false then
643 switch = true
644 else
645 switch = false
646 if aimatpart ~= nil then
647 aimatpart = nil
648 end
649 end
650 elseif a == teambasedswitch then
651 if TeamBased == true then
652 TeamBased = false
653 teambasedstatus.Text = tostring(TeamBased)
654 else
655 TeamBased = true
656 teambasedstatus.Text = tostring(TeamBased)
657 end
658 elseif a == aimkey then
659 if not aimatpart then
660 local maxangle = math.rad(20)
661 for i, plr in pairs(plrs:GetChildren()) do
662 if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
663 if TeamBased == true then
664 if plr.Team.Name ~= lplr.Team.Name then
665 local an = checkfov(plr.Character.Head)
666 if an < maxangle then
667 maxangle = an
668 aimatpart = plr.Character.Head
669 end
670 end
671 else
672 local an = checkfov(plr.Character.Head)
673 if an < maxangle then
674 maxangle = an
675 aimatpart = plr.Character.Head
676 end
677 print(plr)
678 end
679 plr.Character.Humanoid.Died:Connect(function()
680 if aimatpart.Parent == plr.Character or aimatpart == nil then
681 aimatpart = nil
682 end
683 end)
684 end
685 end
686 else
687 aimatpart = nil
688 end
689 end
690end)
691
692function getfovxyz (p0, p1, deg)
693 local x1, y1, z1 = p0:ToOrientation()
694 local cf = CFrame.new(p0.p, p1.p)
695 local x2, y2, z2 = cf:ToOrientation()
696 --local d = math.deg
697 if deg then
698 --return Vector3.new(d(x1-x2), d(y1-y2), d(z1-z2))
699 else
700 return Vector3.new((x1-x2), (y1-y2), (z1-z2))
701 end
702end
703
704function getaimbotplrs()
705 plrsforaim = {}
706 for i, plr in pairs(plrs:GetChildren()) do
707 if plr.Character and plr.Character.Humanoid and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name and plr.Character.Head then
708
709 if TeamBased == true then
710 if plr.Team.Name ~= lplr.Team.Name then
711 local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
712 local r = Ray.new(cf, cf.LookVector * 10000)
713 local ign = {}
714 for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
715 if v:IsA("BasePart") then
716 table.insert(ign , v)
717 end
718 end
719 local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
720 if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
721 table.insert(plrsforaim, obj)
722 end
723 end
724 else
725 local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
726 local r = Ray.new(cf, cf.LookVector * 10000)
727 local ign = {}
728 for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
729 if v:IsA("BasePart") then
730 table.insert(ign , v)
731 end
732 end
733 local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
734 if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
735 table.insert(plrsforaim, obj)
736 end
737 end
738
739
740 end
741 end
742end
743
744function aimat(part)
745 cam.CFrame = CFrame.new(cam.CFrame.p, part.CFrame.p)
746end
747function checkfov (part)
748 local fov = getfovxyz(game.Workspace.CurrentCamera.CFrame, part.CFrame)
749 local angle = math.abs(fov.X) + math.abs(fov.Y)
750 return angle
751end
752
753game:GetService("RunService").RenderStepped:Connect(function()
754 if aimatpart then
755 aimat(aimatpart)
756 if aimatpart.Parent == plrs.LocalPlayer.Character then
757 aimatpart = nil
758 end
759 end
760
761
762-- if switch == true then
763-- local maxangle = 99999
764--
765-- --print("Loop")
766-- if true and raycast == false then
767-- for i, plr in pairs(plrs:GetChildren()) do
768-- if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
769-- if TeamBased then
770-- if plr.Team.Name ~= lplr.Team.Name or plr.Team.TeamColor ~= lplr.Team.TeamColor then
771-- local an = checkfov(plr.Character.Head)
772-- if an < maxangle then
773-- maxangle = an
774-- aimatpart = plr.Character.Head
775-- if an < lockangle then
776-- break
777-- end
778-- end
779-- end
780-- else
781-- local an = checkfov(plr.Character.Head)
782-- if an < maxangle then
783-- maxangle = an
784-- aimatpart = plr.Character.Head
785-- if an < lockangle then
786-- break
787-- end
788-- end
789-- end
790--
791--
792--
793--
794-- end
795-- end
796-- elseif raycast == true then
797--
798-- end
799
800 if raycast == true and switch == false and not aimatpart then
801 getaimbotplrs()
802 aimatpart = nil
803 local maxangle = 999
804 for i, v in ipairs(plrsforaim) do
805 if v.Parent ~= lplr.Character then
806 local an = checkfov(v)
807 if an < maxangle and v ~= lplr.Character.Head then
808 maxangle = an
809 aimatpart = v
810 print(v:GetFullName())
811 v.Parent.Humanoid.Died:connect(function()
812 aimatpart = nil
813 end)
814 end
815 end
816 end
817
818 end
819end)
820delay(0, function()
821 while wait(espupdatetime) do
822 if autoesp == true then
823 pcall(function()
824 f.addesp()
825 end)
826 end
827 end
828end)
829warn("loaded")
830Public Pastes
831Paste Ping
832C | 4 min ago
833SQL Exists Query
834T-SQL | 17 min ago
835Untitled
836JavaScript | 28 min ago
837Adfox in script fo...
838HTML | 28 min ago
839Untitled
840Python | 29 min ago
841results
842JavaScript | 35 min ago
843main2.cpp
844C++ | 36 min ago
845cane.cpp
846C++ | 37 min ago
847create new paste / syntax languages / archive / faq / tools / night mode / api / scraping api / pro
848privacy statement / cookies policy / terms of serviceupdated / security disclosure / dmca / report abuse / contact
849
850By using Pastebin.com you agree to our cookies policy to enhance your experience.
851Site design & logo © 2021 Pastebin
852