· 5 years ago · Aug 24, 2020, 11:36 AM
1
2local plrs = game:GetService("Players")
3local TeamBased = true ; local teambasedswitch = "o"
4local presskeytoaim = true; local aimkey = "e"
5local raycast = false
6
7local espupdatetime = 5; autoesp = false
8
9
10
11local lockaim = true; local lockangle = 5
12
13
14
15--function findwat(folder, what)
16-- for i, smth in pairs(folder:GetChildren()) do
17-- if string.find(string.lower(tostring(smth)), string.lower(what)) then
18-- return smth
19-- end
20-- end
21--end
22--
23--local plrs = findwat(game, "Players")
24
25
26
27
28local Gui = Instance.new("ScreenGui")
29local Move = Instance.new("Frame")
30local Main = Instance.new("Frame")
31local EspStatus = Instance.new("TextLabel")
32local st1 = Instance.new("TextLabel")
33local st1_2 = Instance.new("TextLabel")
34local st1_3 = Instance.new("TextLabel")
35local Name = Instance.new("TextLabel")
36--Properties:
37Gui.Name = "Gui"
38Gui.Parent = plrs.LocalPlayer:WaitForChild("PlayerGui")
39
40Move.Name = "Move"
41Move.Parent = Gui
42Move.BackgroundColor3 = Color3.new(0.631373, 0.631373, 0.631373)
43Move.BackgroundTransparency = 0.40000000596046
44Move.BorderSizePixel = 0
45Move.Position = UDim2.new(0.005, 0,0.018, 0)
46Move.Size = UDim2.new(0.28141585, 0, 0.0320388414, 0)
47
48Main.Name = "Main"
49Main.Parent = Move
50Main.BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471)
51Main.BackgroundTransparency = 0.69999998807907
52Main.Position = UDim2.new(0, 0, 0.995670795, 0)
53Main.Size = UDim2.new(1.0000006, 0, 9.79697132, 0)
54
55EspStatus.Name = "EspStatus"
56EspStatus.Parent = Main
57EspStatus.BackgroundColor3 = Color3.new(1, 1, 1)
58EspStatus.BackgroundTransparency = 1
59EspStatus.Size = UDim2.new(0.272955924, 0, 0.161862016, 0)
60EspStatus.Font = Enum.Font.SourceSansBold
61EspStatus.Text = "Press T to update ESP"
62EspStatus.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
63EspStatus.TextScaled = true
64EspStatus.TextSize = 14
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.SourceSansBold
74st1.Text = "Press "..aimkey.." to lock on a person inside ur view"
75st1.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
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.375590861, 0)
85st1_2.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
86st1_2.Font = Enum.Font.SourceSansBold
87st1_2.Text = "Press L to enable ESP loop"
88st1_2.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
89st1_2.TextScaled = true
90st1_2.TextSize = 14
91st1_2.TextWrapped = true
92
93st1_3.Name = "st1"
94st1_3.Parent = Main
95st1_3.BackgroundColor3 = Color3.new(1, 1, 1)
96st1_3.BackgroundTransparency = 1
97st1_3.Position = UDim2.new(0, 0, 0.18558608, 0)
98st1_3.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
99st1_3.Font = Enum.Font.SourceSansBold
100st1_3.Text = "Press O to change team based mode"
101st1_3.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
102st1_3.TextScaled = true
103st1_3.TextSize = 14
104st1_3.TextWrapped = true
105local teambasedstatus = st1_3:Clone()
106teambasedstatus.Parent = st1_3
107teambasedstatus.TextScaled = true
108teambasedstatus.Position = UDim2.new(0, 0,0.694, 0)
109teambasedstatus.Text = tostring(TeamBased)
110
111Name.Name = "Name"
112Name.Parent = Move
113Name.BackgroundColor3 = Color3.new(1, 1, 1)
114Name.BackgroundTransparency = 1
115Name.Size = UDim2.new(0.838, 0, 0.980000019, 0)
116Name.Font = Enum.Font.Cartoon
117Name.Text = "Arsenal Aimbot + ESP by Frigid Exploits"
118Name.TextColor3 = Color3.new(0, 0, 0)
119Name.TextScaled = true
120Name.TextSize = 14
121Name.TextWrapped = true
122Name.TextXAlignment = Enum.TextXAlignment.Left
123-- Scripts:
124
125
126local plrsforaim = {}
127
128local lplr = game:GetService("Players").LocalPlayer
129Move.Draggable = true
130Gui.ResetOnSpawn = false
131Gui.Name = "Chat"
132Gui.DisplayOrder = 999
133
134 Gui.Parent = plrs.LocalPlayer.PlayerGui
135
136
137f = {}
138local espforlder
139
140f.addesp = function()
141 --print("ESP ran")
142 if espforlder then
143 else
144 espforlder = Instance.new("Folder")
145 espforlder.Parent = game.Workspace.CurrentCamera
146 end
147 for i, v in pairs(espforlder:GetChildren()) do
148 v:Destroy()
149 end
150 for _, plr in pairs(plrs:GetChildren()) do
151 if plr.Character and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name then
152 if TeamBased == true then
153 if plr.Team.Name ~= plrs.LocalPlayer.Team.Name then
154 local e = espforlder:FindFirstChild(plr.Name)
155 if not e then
156 --print("Added ESP for team based")
157 local bill = Instance.new("BillboardGui", espforlder)
158 bill.Name = plr.Name
159 bill.AlwaysOnTop = true
160 bill.Size = UDim2.new(1,0,1,0)
161 bill.Adornee = plr.Character.Head
162 local Frame = Instance.new('Frame',bill)
163 Frame.Active = true
164 Frame.BackgroundColor3 = Color3.new(0/255,255/255,0/255)
165 Frame.BackgroundTransparency = 0
166 Frame.BorderSizePixel = 0
167 Frame.AnchorPoint = Vector2.new(.5, .5)
168 Frame.Position = UDim2.new (0.5,0,0.5,0)
169 Frame.Size = UDim2.new (1,0,1,0)
170 Frame.Rotation = 0
171 plr.Character.Humanoid.Died:Connect(function()
172 bill:Destroy()
173 end)
174 end
175 end
176 else
177 local e = espforlder:FindFirstChild(plr.Name)
178 if not e then
179 --print("Added esp")
180 local bill = Instance.new("BillboardGui", espforlder)
181 bill.Name = plr.Name
182 bill.AlwaysOnTop = true
183 bill.Size = UDim2.new(1,0,1,0)
184 bill.Adornee = plr.Character.Head
185 local Frame = Instance.new('Frame',bill)
186 Frame.Active = true
187 Frame.BackgroundColor3 = Color3.new(0/255,255/255,0/255)
188 Frame.BackgroundTransparency = 0
189 Frame.BorderSizePixel = 0
190 Frame.AnchorPoint = Vector2.new(.5, .5)
191 Frame.Position = UDim2.new (0.5,0,0.5,0)
192 Frame.Size = UDim2.new (1,0,1,0)
193 Frame.Rotation = 0
194 plr.Character.Humanoid.Died:Connect(function()
195 bill:Destroy()
196 end)
197 end
198 end
199
200
201 end
202 end
203end
204local cam = game.Workspace.CurrentCamera
205
206local mouse = lplr:GetMouse()
207local switch = false
208local key = "k"
209local aimatpart = nil
210mouse.KeyDown:Connect(function(a)
211 if a == "t" then
212 print("worked1")
213 f.addesp()
214 elseif a == "u" then
215 if raycast == true then
216 raycast = false
217 else
218 raycast = true
219 end
220 elseif a == "l" then
221 if autoesp == false then
222 autoesp = true
223 else
224 autoesp = false
225 end
226 end
227 if a == "j" then
228 if mouse.Target then
229 mouse.Target:Destroy()
230 end
231 end
232 if a == key then
233 if switch == false then
234 switch = true
235 else
236 switch = false
237 if aimatpart ~= nil then
238 aimatpart = nil
239 end
240 end
241 elseif a == teambasedswitch then
242 if TeamBased == true then
243 TeamBased = false
244 teambasedstatus.Text = tostring(TeamBased)
245 else
246 TeamBased = true
247 teambasedstatus.Text = tostring(TeamBased)
248 end
249 elseif a == aimkey then
250 if not aimatpart then
251 local maxangle = math.rad(20)
252 for i, plr in pairs(plrs:GetChildren()) do
253 if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
254 if TeamBased == true then
255 if plr.Team.Name ~= lplr.Team.Name then
256 local an = checkfov(plr.Character.Head)
257 if an < maxangle then
258 maxangle = an
259 aimatpart = plr.Character.Head
260 end
261 end
262 else
263 local an = checkfov(plr.Character.Head)
264 if an < maxangle then
265 maxangle = an
266 aimatpart = plr.Character.Head
267 end
268 print(plr)
269 end
270 plr.Character.Humanoid.Died:Connect(function()
271 if aimatpart.Parent == plr.Character or aimatpart == nil then
272 aimatpart = nil
273 end
274 end)
275 end
276 end
277 else
278 aimatpart = nil
279 end
280 end
281end)
282
283function getfovxyz (p0, p1, deg)
284 local x1, y1, z1 = p0:ToOrientation()
285 local cf = CFrame.new(p0.p, p1.p)
286 local x2, y2, z2 = cf:ToOrientation()
287 --local d = math.deg
288 if deg then
289 --return Vector3.new(d(x1-x2), d(y1-y2), d(z1-z2))
290 else
291 return Vector3.new((x1-x2), (y1-y2), (z1-z2))
292 end
293end
294
295function getaimbotplrs()
296 plrsforaim = {}
297 for i, plr in pairs(plrs:GetChildren()) do
298 if plr.Character and plr.Character.Humanoid and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name and plr.Character.Head then
299
300 if TeamBased == true then
301 if plr.Team.Name ~= lplr.Team.Name then
302 local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
303 local r = Ray.new(cf, cf.LookVector * 10000)
304 local ign = {}
305 for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
306 if v:IsA("BasePart") then
307 table.insert(ign , v)
308 end
309 end
310 local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
311 if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
312 table.insert(plrsforaim, obj)
313 end
314 end
315 else
316 local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
317 local r = Ray.new(cf, cf.LookVector * 10000)
318 local ign = {}
319 for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
320 if v:IsA("BasePart") then
321 table.insert(ign , v)
322 end
323 end
324 local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
325 if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
326 table.insert(plrsforaim, obj)
327 end
328 end
329
330
331 end
332 end
333end
334
335function aimat(part)
336 cam.CFrame = CFrame.new(cam.CFrame.p, part.CFrame.p)
337end
338function checkfov (part)
339 local fov = getfovxyz(game.Workspace.CurrentCamera.CFrame, part.CFrame)
340 local angle = math.abs(fov.X) + math.abs(fov.Y)
341 return angle
342end
343
344game:GetService("RunService").RenderStepped:Connect(function()
345 if aimatpart then
346 aimat(aimatpart)
347 if aimatpart.Parent == plrs.LocalPlayer.Character then
348 aimatpart = nil
349 end
350 end
351
352
353-- if switch == true then
354-- local maxangle = 99999
355--
356-- --print("Loop")
357-- if true and raycast == false then
358-- for i, plr in pairs(plrs:GetChildren()) do
359-- if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
360-- if TeamBased then
361-- if plr.Team.Name ~= lplr.Team.Name or plr.Team.TeamColor ~= lplr.Team.TeamColor then
362-- local an = checkfov(plr.Character.Head)
363-- if an < maxangle then
364-- maxangle = an
365-- aimatpart = plr.Character.Head
366-- if an < lockangle then
367-- break
368-- end
369-- end
370-- end
371-- else
372-- local an = checkfov(plr.Character.Head)
373-- if an < maxangle then
374-- maxangle = an
375-- aimatpart = plr.Character.Head
376-- if an < lockangle then
377-- break
378-- end
379-- end
380-- end
381--
382--
383--
384--
385-- end
386-- end
387-- elseif raycast == true then
388--
389-- end
390
391 if raycast == true and switch == false and not aimatpart then
392 getaimbotplrs()
393 aimatpart = nil
394 local maxangle = 999
395 for i, v in ipairs(plrsforaim) do
396 if v.Parent ~= lplr.Character then
397 local an = checkfov(v)
398 if an < maxangle and v ~= lplr.Character.Head then
399 maxangle = an
400 aimatpart = v
401 print(v:GetFullName())
402 v.Parent.Humanoid.Died:connect(function()
403 aimatpart = nil
404 end)
405 end
406 end
407 end
408
409 end
410end)
411delay(0, function()
412 while wait(espupdatetime) do
413 if autoesp == true then
414 pcall(function()
415 f.addesp()
416 end)
417 end
418 end
419end)
420warn("loaded")
421RAW Paste Data
422local plrs = game:GetService("Players")
423local TeamBased = true ; local teambasedswitch = "o"
424local presskeytoaim = true; local aimkey = "e"
425local raycast = false
426
427local espupdatetime = 5; autoesp = false
428
429
430
431local lockaim = true; local lockangle = 5
432
433
434
435--function findwat(folder, what)
436-- for i, smth in pairs(folder:GetChildren()) do
437-- if string.find(string.lower(tostring(smth)), string.lower(what)) then
438-- return smth
439-- end
440-- end
441--end
442--
443--local plrs = findwat(game, "Players")
444
445
446
447
448local Gui = Instance.new("ScreenGui")
449local Move = Instance.new("Frame")
450local Main = Instance.new("Frame")
451local EspStatus = Instance.new("TextLabel")
452local st1 = Instance.new("TextLabel")
453local st1_2 = Instance.new("TextLabel")
454local st1_3 = Instance.new("TextLabel")
455local Name = Instance.new("TextLabel")
456--Properties:
457Gui.Name = "Gui"
458Gui.Parent = plrs.LocalPlayer:WaitForChild("PlayerGui")
459
460Move.Name = "Move"
461Move.Parent = Gui
462Move.BackgroundColor3 = Color3.new(0.631373, 0.631373, 0.631373)
463Move.BackgroundTransparency = 0.40000000596046
464Move.BorderSizePixel = 0
465Move.Position = UDim2.new(0.005, 0,0.018, 0)
466Move.Size = UDim2.new(0.28141585, 0, 0.0320388414, 0)
467
468Main.Name = "Main"
469Main.Parent = Move
470Main.BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471)
471Main.BackgroundTransparency = 0.69999998807907
472Main.Position = UDim2.new(0, 0, 0.995670795, 0)
473Main.Size = UDim2.new(1.0000006, 0, 9.79697132, 0)
474
475EspStatus.Name = "EspStatus"
476EspStatus.Parent = Main
477EspStatus.BackgroundColor3 = Color3.new(1, 1, 1)
478EspStatus.BackgroundTransparency = 1
479EspStatus.Size = UDim2.new(0.272955924, 0, 0.161862016, 0)
480EspStatus.Font = Enum.Font.SourceSansBold
481EspStatus.Text = "Press T to update ESP"
482EspStatus.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
483EspStatus.TextScaled = true
484EspStatus.TextSize = 14
485EspStatus.TextWrapped = true
486
487st1.Name = "st1"
488st1.Parent = Main
489st1.BackgroundColor3 = Color3.new(1, 1, 1)
490st1.BackgroundTransparency = 1
491st1.Position = UDim2.new(0.271787882, 0, 0, 0)
492st1.Size = UDim2.new(0.728211343, 0, 0.161862016, 0)
493st1.Font = Enum.Font.SourceSansBold
494st1.Text = "Press "..aimkey.." to lock on a person inside ur view"
495st1.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
496st1.TextScaled = true
497st1.TextSize = 14
498st1.TextWrapped = true
499
500st1_2.Name = "st1"
501st1_2.Parent = Main
502st1_2.BackgroundColor3 = Color3.new(1, 1, 1)
503st1_2.BackgroundTransparency = 1
504st1_2.Position = UDim2.new(0, 0, 0.375590861, 0)
505st1_2.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
506st1_2.Font = Enum.Font.SourceSansBold
507st1_2.Text = "Press L to enable ESP loop"
508st1_2.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
509st1_2.TextScaled = true
510st1_2.TextSize = 14
511st1_2.TextWrapped = true
512
513st1_3.Name = "st1"
514st1_3.Parent = Main
515st1_3.BackgroundColor3 = Color3.new(1, 1, 1)
516st1_3.BackgroundTransparency = 1
517st1_3.Position = UDim2.new(0, 0, 0.18558608, 0)
518st1_3.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
519st1_3.Font = Enum.Font.SourceSansBold
520st1_3.Text = "Press O to change team based mode"
521st1_3.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
522st1_3.TextScaled = true
523st1_3.TextSize = 14
524st1_3.TextWrapped = true
525local teambasedstatus = st1_3:Clone()
526teambasedstatus.Parent = st1_3
527teambasedstatus.TextScaled = true
528teambasedstatus.Position = UDim2.new(0, 0,0.694, 0)
529teambasedstatus.Text = tostring(TeamBased)
530
531Name.Name = "Name"
532Name.Parent = Move
533Name.BackgroundColor3 = Color3.new(1, 1, 1)
534Name.BackgroundTransparency = 1
535Name.Size = UDim2.new(0.838, 0, 0.980000019, 0)
536Name.Font = Enum.Font.Cartoon
537Name.Text = "Arsenal Aimbot + ESP by Frigid Exploits"
538Name.TextColor3 = Color3.new(0, 0, 0)
539Name.TextScaled = true
540Name.TextSize = 14
541Name.TextWrapped = true
542Name.TextXAlignment = Enum.TextXAlignment.Left
543-- Scripts:
544
545
546local plrsforaim = {}
547
548local lplr = game:GetService("Players").LocalPlayer
549Move.Draggable = true
550Gui.ResetOnSpawn = false
551Gui.Name = "Chat"
552Gui.DisplayOrder = 999
553
554 Gui.Parent = plrs.LocalPlayer.PlayerGui
555
556
557f = {}
558local espforlder
559
560f.addesp = function()
561 --print("ESP ran")
562 if espforlder then
563 else
564 espforlder = Instance.new("Folder")
565 espforlder.Parent = game.Workspace.CurrentCamera
566 end
567 for i, v in pairs(espforlder:GetChildren()) do
568 v:Destroy()
569 end
570 for _, plr in pairs(plrs:GetChildren()) do
571 if plr.Character and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name then
572 if TeamBased == true then
573 if plr.Team.Name ~= plrs.LocalPlayer.Team.Name then
574 local e = espforlder:FindFirstChild(plr.Name)
575 if not e then
576 --print("Added ESP for team based")
577 local bill = Instance.new("BillboardGui", espforlder)
578 bill.Name = plr.Name
579 bill.AlwaysOnTop = true
580 bill.Size = UDim2.new(1,0,1,0)
581 bill.Adornee = plr.Character.Head
582 local Frame = Instance.new('Frame',bill)
583 Frame.Active = true
584 Frame.BackgroundColor3 = Color3.new(0/255,255/255,0/255)
585 Frame.BackgroundTransparency = 0
586 Frame.BorderSizePixel = 0
587 Frame.AnchorPoint = Vector2.new(.5, .5)
588 Frame.Position = UDim2.new (0.5,0,0.5,0)
589 Frame.Size = UDim2.new (1,0,1,0)
590 Frame.Rotation = 0
591 plr.Character.Humanoid.Died:Connect(function()
592 bill:Destroy()
593 end)
594 end
595 end
596 else
597 local e = espforlder:FindFirstChild(plr.Name)
598 if not e then
599 --print("Added esp")
600 local bill = Instance.new("BillboardGui", espforlder)
601 bill.Name = plr.Name
602 bill.AlwaysOnTop = true
603 bill.Size = UDim2.new(1,0,1,0)
604 bill.Adornee = plr.Character.Head
605 local Frame = Instance.new('Frame',bill)
606 Frame.Active = true
607 Frame.BackgroundColor3 = Color3.new(0/255,255/255,0/255)
608 Frame.BackgroundTransparency = 0
609 Frame.BorderSizePixel = 0
610 Frame.AnchorPoint = Vector2.new(.5, .5)
611 Frame.Position = UDim2.new (0.5,0,0.5,0)
612 Frame.Size = UDim2.new (1,0,1,0)
613 Frame.Rotation = 0
614 plr.Character.Humanoid.Died:Connect(function()
615 bill:Destroy()
616 end)
617 end
618 end
619
620
621 end
622 end
623end
624local cam = game.Workspace.CurrentCamera
625
626local mouse = lplr:GetMouse()
627local switch = false
628local key = "k"
629local aimatpart = nil
630mouse.KeyDown:Connect(function(a)
631 if a == "t" then
632 print("worked1")
633 f.addesp()
634 elseif a == "u" then
635 if raycast == true then
636 raycast = false
637 else
638 raycast = true
639 end
640 elseif a == "l" then
641 if autoesp == false then
642 autoesp = true
643 else
644 autoesp = false
645 end
646 end
647 if a == "j" then
648 if mouse.Target then
649 mouse.Target:Destroy()
650 end
651 end
652 if a == key then
653 if switch == false then
654 switch = true
655 else
656 switch = false
657 if aimatpart ~= nil then
658 aimatpart = nil
659 end
660 end
661 elseif a == teambasedswitch then
662 if TeamBased == true then
663 TeamBased = false
664 teambasedstatus.Text = tostring(TeamBased)
665 else
666 TeamBased = true
667 teambasedstatus.Text = tostring(TeamBased)
668 end
669 elseif a == aimkey then
670 if not aimatpart then
671 local maxangle = math.rad(20)
672 for i, plr in pairs(plrs:GetChildren()) do
673 if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
674 if TeamBased == true then
675 if plr.Team.Name ~= lplr.Team.Name then
676 local an = checkfov(plr.Character.Head)
677 if an < maxangle then
678 maxangle = an
679 aimatpart = plr.Character.Head
680 end
681 end
682 else
683 local an = checkfov(plr.Character.Head)
684 if an < maxangle then
685 maxangle = an
686 aimatpart = plr.Character.Head
687 end
688 print(plr)
689 end
690 plr.Character.Humanoid.Died:Connect(function()
691 if aimatpart.Parent == plr.Character or aimatpart == nil then
692 aimatpart = nil
693 end
694 end)
695 end
696 end
697 else
698 aimatpart = nil
699 end
700 end
701end)
702
703function getfovxyz (p0, p1, deg)
704 local x1, y1, z1 = p0:ToOrientation()
705 local cf = CFrame.new(p0.p, p1.p)
706 local x2, y2, z2 = cf:ToOrientation()
707 --local d = math.deg
708 if deg then
709 --return Vector3.new(d(x1-x2), d(y1-y2), d(z1-z2))
710 else
711 return Vector3.new((x1-x2), (y1-y2), (z1-z2))
712 end
713end
714
715function getaimbotplrs()
716 plrsforaim = {}
717 for i, plr in pairs(plrs:GetChildren()) do
718 if plr.Character and plr.Character.Humanoid and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name and plr.Character.Head then
719
720 if TeamBased == true then
721 if plr.Team.Name ~= lplr.Team.Name then
722 local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
723 local r = Ray.new(cf, cf.LookVector * 10000)
724 local ign = {}
725 for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
726 if v:IsA("BasePart") then
727 table.insert(ign , v)
728 end
729 end
730 local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
731 if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
732 table.insert(plrsforaim, obj)
733 end
734 end
735 else
736 local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
737 local r = Ray.new(cf, cf.LookVector * 10000)
738 local ign = {}
739 for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
740 if v:IsA("BasePart") then
741 table.insert(ign , v)
742 end
743 end
744 local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
745 if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
746 table.insert(plrsforaim, obj)
747 end
748 end
749
750
751 end
752 end
753end
754
755function aimat(part)
756 cam.CFrame = CFrame.new(cam.CFrame.p, part.CFrame.p)
757end
758function checkfov (part)
759 local fov = getfovxyz(game.Workspace.CurrentCamera.CFrame, part.CFrame)
760 local angle = math.abs(fov.X) + math.abs(fov.Y)
761 return angle
762end
763
764game:GetService("RunService").RenderStepped:Connect(function()
765 if aimatpart then
766 aimat(aimatpart)
767 if aimatpart.Parent == plrs.LocalPlayer.Character then
768 aimatpart = nil
769 end
770 end
771
772
773-- if switch == true then
774-- local maxangle = 99999
775--
776-- --print("Loop")
777-- if true and raycast == false then
778-- for i, plr in pairs(plrs:GetChildren()) do
779-- if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
780-- if TeamBased then
781-- if plr.Team.Name ~= lplr.Team.Name or plr.Team.TeamColor ~= lplr.Team.TeamColor then
782-- local an = checkfov(plr.Character.Head)
783-- if an < maxangle then
784-- maxangle = an
785-- aimatpart = plr.Character.Head
786-- if an < lockangle then
787-- break
788-- end
789-- end
790-- end
791-- else
792-- local an = checkfov(plr.Character.Head)
793-- if an < maxangle then
794-- maxangle = an
795-- aimatpart = plr.Character.Head
796-- if an < lockangle then
797-- break
798-- end
799-- end
800-- end
801--
802--
803--
804--
805-- end
806-- end
807-- elseif raycast == true then
808--
809-- end
810
811 if raycast == true and switch == false and not aimatpart then
812 getaimbotplrs()
813 aimatpart = nil
814 local maxangle = 999
815 for i, v in ipairs(plrsforaim) do
816 if v.Parent ~= lplr.Character then
817 local an = checkfov(v)
818 if an < maxangle and v ~= lplr.Character.Head then
819 maxangle = an
820 aimatpart = v
821 print(v:GetFullName())
822 v.Parent.Humanoid.Died:connect(function()
823 aimatpart = nil
824 end)
825 end
826 end
827 end
828
829 end
830end)
831delay(0, function()
832 while wait(espupdatetime) do
833 if autoesp == true then
834 pcall(function()
835 f.addesp()
836 end)
837 end
838 end
839end)
840warn("loaded")
841Public Pastes
842sonaMaga
843Python | 23 sec ago
844answer 3
845C | 19 min ago
846Angular Commands
847Bash | 34 min ago
848answer 2
849C | 1 hour ago
850Lab Final Problem 2
851C++ | 1 hour ago
852work in progress... doesn't work atm
853Bash | 1 hour ago
854detectDuplicateFiles.py
855Python | 1 hour ago
856Lab Final Problem 1
857C++ | 2 hours ago
858create new paste / syntax languages / archive / faq / tools / night mode / api / scraping api
859privacy statement / cookies policy / terms of service / security disclosure / dmca / report abuse / contact
860
861By using Pastebin.com you agree to our cookies policy to enhance your experience.
862Site design & logo © 2020 Pastebin; user contributions (pastes) licensed under cc by-sa 3.0
863