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