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