· 4 years ago · Jul 16, 2021, 12:06 AM
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(1, 0, 0)
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
416-- By NikitaPlays --
417
418--Script:
419local plrs = game:GetService("Players")
420local TeamBased = true ; local teambasedswitch = "o"
421local presskeytoaim = true; local aimkey = "e"
422local raycast = false
423
424local espupdatetime = 5; autoesp = false
425
426
427
428local lockaim = true; local lockangle = 5
429
430
431
432--function findwat(folder, what)
433-- for i, smth in pairs(folder:GetChildren()) do
434-- if string.find(string.lower(tostring(smth)), string.lower(what)) then
435-- return smth
436-- end
437-- end
438--end
439--
440--local plrs = findwat(game, "Players")
441
442
443
444
445local Gui = Instance.new("ScreenGui")
446local Move = Instance.new("Frame")
447local Main = Instance.new("Frame")
448local EspStatus = Instance.new("TextLabel")
449local st1 = Instance.new("TextLabel")
450local st1_2 = Instance.new("TextLabel")
451local st1_3 = Instance.new("TextLabel")
452local Name = Instance.new("TextLabel")
453--Properties:
454Gui.Name = "Gui"
455Gui.Parent = plrs.LocalPlayer:WaitForChild("PlayerGui")
456
457Move.Name = "Move"
458Move.Parent = Gui
459Move.BackgroundColor3 = Color3.new(0.545098, 0, 0)
460Move.BackgroundTransparency = 1
461Move.BorderSizePixel = 0
462Move.Draggable = true
463Move.Position = UDim2.new(0.005, 0, -0.15, 0)
464Move.Size = UDim2.new(0.28141585, 0, 0.0320388414, 0)
465
466Main.Name = "Main"
467Main.Parent = Move
468Main.BackgroundColor3 = Color3.new(1, 1, 1)
469Main.Position = UDim2.new(0, -7, 20.9960003, 0)
470Main.Size = UDim2.new(1, 0, 5.79699993, 0)
471Main.Style = Enum.FrameStyle.RobloxSquare
472
473EspStatus.Name = "EspStatus"
474EspStatus.Parent = Main
475EspStatus.BackgroundColor3 = Color3.new(1, 1, 1)
476EspStatus.BackgroundTransparency = 1
477EspStatus.Position = UDim2.new(0, 0, 0.300000012, 0)
478EspStatus.Size = UDim2.new(1, 0, 0.162, 0)
479EspStatus.Font = Enum.Font.ArialBold
480EspStatus.Text = "Press O to change team based mode"
481EspStatus.TextColor3 = Color3.new(0.6, 0.196078, 0.8)
482EspStatus.TextScaled = true
483EspStatus.TextWrapped = true
484
485st1.Name = "st1"
486st1.Parent = Main
487st1.BackgroundColor3 = Color3.new(1, 1, 1)
488st1.BackgroundTransparency = 1
489st1.Position = UDim2.new(0.271787882, 0, 0, 0)
490st1.Size = UDim2.new(0.728211343, 0, 0.161862016, 0)
491st1.Font = Enum.Font.ArialBold
492st1.Text = ""
493st1.TextColor3 = Color3.new(0.0784314, 0.541176, 0)
494st1.TextScaled = true
495st1.TextSize = 14
496st1.TextWrapped = true
497
498st1_2.Name = "st1"
499st1_2.Parent = Main
500st1_2.BackgroundColor3 = Color3.new(1, 1, 1)
501st1_2.BackgroundTransparency = 1
502st1_2.Position = UDim2.new(0, 0, 0.875999987, 0)
503st1_2.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
504st1_2.Font = Enum.Font.ArialBold
505st1_2.Text = "Press E to lock on a person inside ur view"
506st1_2.TextColor3 = Color3.new(0.6, 0.196078, 0.8)
507st1_2.TextScaled = true
508st1_2.TextWrapped = true
509
510st1_3.Name = "st1"
511st1_3.Parent = Main
512st1_3.BackgroundColor3 = Color3.new(1, 1, 1)
513st1_3.BackgroundTransparency = 1
514st1_3.Position = UDim2.new(0, 0, 0.54, 0)
515st1_3.Size = UDim2.new(1, 0, 0.261999995, 0)
516st1_3.Font = Enum.Font.ArialBold
517st1_3.Text = "Press L to enable esp loop and press T to update esp"
518st1_3.TextColor3 = Color3.new(0.6, 0.196078, 0.8)
519st1_3.TextScaled = true
520st1_3.TextWrapped = true
521
522
523Name.Name = "Name"
524Name.Parent = Move
525Name.BackgroundColor3 = Color3.new(0.545098, 0, 0)
526Name.BackgroundTransparency = 1
527Name.Position = UDim2.new(0, 25, 20.9860001, 0)
528Name.Size = UDim2.new(0.838, 0, 1.27999997, 0)
529Name.Font = Enum.Font.Arcade
530Name.Text = "ARSENAL GUI"
531Name.TextColor3 = Color3.new(0.541176, 0.168627, 0.886275)
532Name.TextScaled = true
533Name.TextSize = 12
534Name.TextWrapped = true
535-- Scripts:
536
537
538local plrsforaim = {}
539
540local lplr = game:GetService("Players").LocalPlayer
541Move.Draggable = true
542Gui.ResetOnSpawn = false
543Gui.Name = "Chat"
544Gui.DisplayOrder = 999
545
546 Gui.Parent = plrs.LocalPlayer.PlayerGui
547
548
549f = {}
550local espforlder
551
552f.addesp = function()
553 --print("ESP ran")
554 if espforlder then
555 else
556 espforlder = Instance.new("Folder")
557 espforlder.Parent = game.Workspace.CurrentCamera
558 end
559 for i, v in pairs(espforlder:GetChildren()) do
560 v:Destroy()
561 end
562 for _, plr in pairs(plrs:GetChildren()) do
563 if plr.Character and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name then
564 if TeamBased == true then
565 if plr.Team.Name ~= plrs.LocalPlayer.Team.Name then
566 local e = espforlder:FindFirstChild(plr.Name)
567 if not e then
568 --print("Added esp for team based")
569 local bill = Instance.new("BillboardGui", espforlder)
570 bill.Name = plr.Name
571 bill.AlwaysOnTop = true
572 bill.Size = UDim2.new(1,0,1,0)
573 bill.Adornee = plr.Character.Head
574 local Frame = Instance.new('Frame',bill)
575 Frame.Active = true
576 Frame.BackgroundColor3 = Color3.new(1, 0, 0)
577 Frame.BackgroundTransparency = 0
578 Frame.BorderSizePixel = 0
579 Frame.AnchorPoint = Vector2.new(.5, .5)
580 Frame.Position = UDim2.new (0.5,0,0.5,0)
581 Frame.Size = UDim2.new (1,0,1,0)
582 Frame.Rotation = 0
583 plr.Character.Humanoid.Died:Connect(function()
584 bill:Destroy()
585 end)
586 end
587 end
588 else
589 local e = espforlder:FindFirstChild(plr.Name)
590 if not e then
591 --print("Added esp")
592 local bill = Instance.new("BillboardGui", espforlder)
593 bill.Name = plr.Name
594 bill.AlwaysOnTop = true
595 bill.Size = UDim2.new(1,0,1,0)
596 bill.Adornee = plr.Character.Head
597 local Frame = Instance.new('Frame',bill)
598 Frame.Active = true
599 Frame.BackgroundColor3 = Color3.new(0.541176, 0.168627, 0.886275)
600 Frame.BackgroundTransparency = 0
601 Frame.BorderSizePixel = 0
602 Frame.AnchorPoint = Vector2.new(.5, .5)
603 Frame.Position = UDim2.new (0.5,0,0.5,0)
604 Frame.Size = UDim2.new (1,0,1,0)
605 Frame.Rotation = 0
606 plr.Character.Humanoid.Died:Connect(function()
607 bill:Destroy()
608 end)
609 end
610 end
611
612
613 end
614 end
615end
616local cam = game.Workspace.CurrentCamera
617
618local mouse = lplr:GetMouse()
619local switch = false
620local key = "k"
621local aimatpart = nil
622mouse.KeyDown:Connect(function(a)
623 if a == "t" then
624 print("worked1")
625 f.addesp()
626 elseif a == "u" then
627 if raycast == true then
628 raycast = false
629 else
630 raycast = true
631 end
632 elseif a == "l" then
633 if autoesp == false then
634 autoesp = true
635 else
636 autoesp = false
637 end
638 end
639 if a == "j" then
640 if mouse.Target then
641 mouse.Target:Destroy()
642 end
643 end
644 if a == key then
645 if switch == false then
646 switch = true
647 else
648 switch = false
649 if aimatpart ~= nil then
650 aimatpart = nil
651 end
652 end
653 elseif a == teambasedswitch then
654 if TeamBased == true then
655 TeamBased = false
656 teambasedstatus.Text = tostring(TeamBased)
657 else
658 TeamBased = true
659 teambasedstatus.Text = tostring(TeamBased)
660 end
661 elseif a == aimkey then
662 if not aimatpart then
663 local maxangle = math.rad(20)
664 for i, plr in pairs(plrs:GetChildren()) do
665 if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
666 if TeamBased == true then
667 if plr.Team.Name ~= lplr.Team.Name then
668 local an = checkfov(plr.Character.Head)
669 if an < maxangle then
670 maxangle = an
671 aimatpart = plr.Character.Head
672 end
673 end
674 else
675 local an = checkfov(plr.Character.Head)
676 if an < maxangle then
677 maxangle = an
678 aimatpart = plr.Character.Head
679 end
680 print(plr)
681 end
682 plr.Character.Humanoid.Died:Connect(function()
683 if aimatpart.Parent == plr.Character or aimatpart == nil then
684 aimatpart = nil
685 end
686 end)
687 end
688 end
689 else
690 aimatpart = nil
691 end
692 end
693end)
694
695function getfovxyz (p0, p1, deg)
696 local x1, y1, z1 = p0:ToOrientation()
697 local cf = CFrame.new(p0.p, p1.p)
698 local x2, y2, z2 = cf:ToOrientation()
699 --local d = math.deg
700 if deg then
701 --return Vector3.new(d(x1-x2), d(y1-y2), d(z1-z2))
702 else
703 return Vector3.new((x1-x2), (y1-y2), (z1-z2))
704 end
705end
706
707function getaimbotplrs()
708 plrsforaim = {}
709 for i, plr in pairs(plrs:GetChildren()) do
710 if plr.Character and plr.Character.Humanoid and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name and plr.Character.Head then
711
712 if TeamBased == true then
713 if plr.Team.Name ~= lplr.Team.Name then
714 local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
715 local r = Ray.new(cf, cf.LookVector * 10000)
716 local ign = {}
717 for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
718 if v:IsA("BasePart") then
719 table.insert(ign , v)
720 end
721 end
722 local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
723 if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
724 table.insert(plrsforaim, obj)
725 end
726 end
727 else
728 local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
729 local r = Ray.new(cf, cf.LookVector * 10000)
730 local ign = {}
731 for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
732 if v:IsA("BasePart") then
733 table.insert(ign , v)
734 end
735 end
736 local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
737 if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
738 table.insert(plrsforaim, obj)
739 end
740 end
741
742
743 end
744 end
745end
746
747function aimat(part)
748 cam.CFrame = CFrame.new(cam.CFrame.p, part.CFrame.p)
749end
750function checkfov (part)
751 local fov = getfovxyz(game.Workspace.CurrentCamera.CFrame, part.CFrame)
752 local angle = math.abs(fov.X) + math.abs(fov.Y)
753 return angle
754end
755
756game:GetService("RunService").RenderStepped:Connect(function()
757 if aimatpart then
758 aimat(aimatpart)
759 if aimatpart.Parent == plrs.LocalPlayer.Character then
760 aimatpart = nil
761 end
762 end
763
764
765-- if switch == true then
766-- local maxangle = 99999
767--
768-- --print("Loop")
769-- if true and raycast == false then
770-- for i, plr in pairs(plrs:GetChildren()) do
771-- if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
772-- if TeamBased then
773-- if plr.Team.Name ~= lplr.Team.Name or plr.Team.TeamColor ~= lplr.Team.TeamColor then
774-- local an = checkfov(plr.Character.Head)
775-- if an < maxangle then
776-- maxangle = an
777-- aimatpart = plr.Character.Head
778-- if an < lockangle then
779-- break
780-- end
781-- end
782-- end
783-- else
784-- local an = checkfov(plr.Character.Head)
785-- if an < maxangle then
786-- maxangle = an
787-- aimatpart = plr.Character.Head
788-- if an < lockangle then
789-- break
790-- end
791-- end
792-- end
793--
794--
795--
796--
797-- end
798-- end
799-- elseif raycast == true then
800--
801-- end
802
803 if raycast == true and switch == false and not aimatpart then
804 getaimbotplrs()
805 aimatpart = nil
806 local maxangle = 999
807 for i, v in ipairs(plrsforaim) do
808 if v.Parent ~= lplr.Character then
809 local an = checkfov(v)
810 if an < maxangle and v ~= lplr.Character.Head then
811 maxangle = an
812 aimatpart = v
813 print(v:GetFullName())
814 v.Parent.Humanoid.Died:connect(function()
815 aimatpart = nil
816 end)
817 end
818 end
819 end
820
821 end
822end)
823delay(0, function()
824 while wait(espupdatetime) do
825 if autoesp == true then
826 pcall(function()
827 f.addesp()
828 end)
829 end
830 end
831end)
832warn("loaded")
833Public Pastes
834one.com DDNS Python Script
835Python | 7 min ago | 2.92 KB
836Untitled
837PHP | 22 min ago | 0.86 KB
838My Log File
839HTML 5 | 24 min ago | 0.13 KB
840My Log File
841HTML 5 | 24 min ago | 0.13 KB
842My Log File
843HTML 5 | 35 min ago | 0.13 KB
844My Log File
845HTML 5 | 35 min ago | 0.13 KB
846My Log File
847HTML 5 | 1 hour ago | 12.70 KB
848Untitled
849JavaScript | 1 hour ago | 0.96 KB
850
851
852create new paste / syntax languages / archive / faq / tools / night mode / api / scraping api / news / pro
853privacy statement / cookies policy / terms of serviceupdated / security disclosure / dmca / report abuse / contact
854
855By using Pastebin.com you agree to our cookies policy to enhance your experience.
856Site design & logo © 2021 Pastebin
857We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
858Not a member of Pastebin yet?
859Sign Up, it unlocks many cool features!
860