SirSaber

CB Kill All & Aimbot

Mar 2nd, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.92 KB | None | 0 0
  1. -- Farewell Infortality.
  2. -- Version: 2.82
  3. -- Instances:
  4. local ScreenGui = Instance.new("ScreenGui")
  5. local OpenGUI = Instance.new("Frame")
  6. local Open = Instance.new("TextButton")
  7. local MainGUI = Instance.new("Frame")
  8. local TextLabel = Instance.new("TextLabel")
  9. local KillAll = Instance.new("TextButton")
  10. local Close = Instance.new("TextButton")
  11. --Properties:
  12. ScreenGui.Parent = game.CoreGui
  13. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  14.  
  15. OpenGUI.Name = "OpenGUI"
  16. OpenGUI.Parent = ScreenGui
  17. OpenGUI.BackgroundColor3 = Color3.new(1, 1, 1)
  18. OpenGUI.Position = UDim2.new(0, 0, 0.492024541, 0)
  19. OpenGUI.Size = UDim2.new(0, 100, 0, 28)
  20.  
  21. Open.Name = "Open"
  22. Open.Parent = OpenGUI
  23. Open.BackgroundColor3 = Color3.new(0.333333, 1, 1)
  24. Open.Size = UDim2.new(0, 100, 0, 28)
  25. Open.Font = Enum.Font.SourceSans
  26. Open.Text = "Open"
  27. Open.TextColor3 = Color3.new(0, 0, 0)
  28. Open.TextSize = 14
  29. Open.MouseButton1Down:connect(function()
  30. MainGUI.Visible = true
  31. end)
  32.  
  33. MainGUI.Name = "MainGUI"
  34. MainGUI.Parent = ScreenGui
  35. MainGUI.BackgroundColor3 = Color3.new(0, 1, 1)
  36. MainGUI.Position = UDim2.new(0.100769229, 0, 0.163992867, 0)
  37. MainGUI.Size = UDim2.new(0, 112, 0, 85)
  38. MainGUI.Draggable = true
  39.  
  40. TextLabel.Parent = MainGUI
  41. TextLabel.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  42. TextLabel.Position = UDim2.new(0, 0, 0.0941176564, 0)
  43. TextLabel.Size = UDim2.new(0, 112, 0, 28)
  44. TextLabel.Font = Enum.Font.SourceSans
  45. TextLabel.Text = "CBRO Kill all"
  46. TextLabel.TextColor3 = Color3.new(0, 0, 0)
  47. TextLabel.TextSize = 14
  48.  
  49. KillAll.Name = "Kill All"
  50. KillAll.Parent = MainGUI
  51. KillAll.BackgroundColor3 = Color3.new(0.666667, 1, 1)
  52. KillAll.Position = UDim2.new(0, 0, 0.505882382, 0)
  53. KillAll.Size = UDim2.new(0, 112, 0, 35)
  54. KillAll.Font = Enum.Font.SourceSans
  55. KillAll.Text = "Kill All"
  56. KillAll.TextColor3 = Color3.new(0, 0, 0)
  57. KillAll.TextSize = 14
  58. KillAll.MouseButton1Down:connect(function()
  59. local Remote = game.ReplicatedStorage.Events['HitPart']
  60.  
  61. for _,v in pairs(game:GetService"Players":GetChildren()) do
  62. if v.Team ~= game.Players.LocalPlayer.Team then
  63. if v.Character and v.Character.Head then
  64. local Arguments = {
  65. [1] = workspace[v.Name].Head,
  66. [2] = workspace[v.Name].Head.Position,
  67. [3] = workspace[game.Players.LocalPlayer.Name].EquippedTool.Value,
  68. [4] = math.rad(1,100000),
  69. [5] = workspace[game.Players.LocalPlayer.Name].Gun,
  70. [8] = 8, --damage multiplier
  71. [9] = false,
  72. [10] = false,
  73. [11] = Vector3.new(),
  74. [12] = math.rad(1,100000),
  75. [13] = Vector3.new()
  76. }
  77.  
  78. Remote:FireServer(unpack(Arguments))
  79. end
  80. end
  81. end
  82. end)
  83.  
  84. Close.Name = "Close"
  85. Close.Parent = MainGUI
  86. Close.BackgroundColor3 = Color3.new(0.333333, 1, 1)
  87. Close.Position = UDim2.new(-1.16964281, 0, 1.78145063, 0)
  88. Close.Size = UDim2.new(0, 100, 0, 23)
  89. Close.Font = Enum.Font.SourceSans
  90. Close.Text = "Close"
  91. Close.TextColor3 = Color3.new(0, 0, 0)
  92. Close.TextSize = 14
  93. Close.MouseButton1Down:connect(function()
  94. MainGUI.Visible = false
  95.  
  96. pcall(function()
  97. local espcolor = Color3.fromRGB(140, 69, 102)
  98. local wallhack_esp_transparency = .4
  99. local gui_hide_button = {Enum.KeyCode.LeftControl, "h"}
  100. local plrs = game:GetService("Players")
  101. local lplr = game:GetService("Players").LocalPlayer
  102. local TeamBased = true ; local teambasedswitch = "o"
  103. local presskeytoaim = true; local aimkey = "e"
  104. aimbothider = false; aimbothiderspeed = .5
  105. local Aim_Assist = false ; Aim_Assist_Key = {Enum.KeyCode.LeftControl, "z"}
  106. local espupdatetime = 5; autoesp = false
  107. local abs = math.abs
  108. local mouselock = false
  109. local canaimat = true
  110. local lockaim = true; local lockangle = 5
  111. local ver = "2"
  112. local cam = game.Workspace.CurrentCamera
  113. local BetterDeathCount = true
  114.  
  115.  
  116. local mouse = lplr:GetMouse()
  117. local switch = false
  118. local key = "k"
  119. local aimatpart = nil
  120.  
  121.  
  122.  
  123.  
  124. local Gui = Instance.new("ScreenGui")
  125. local Move = Instance.new("Frame")
  126. local Main = Instance.new("Frame")
  127. local EspStatus = Instance.new("TextLabel")
  128. local st1 = Instance.new("TextLabel")
  129. local st1_2 = Instance.new("TextLabel")
  130. local st1_3 = Instance.new("TextLabel")
  131. local Name = Instance.new("TextLabel")
  132. --Properties:
  133.  
  134. Gui.Parent = plrs.LocalPlayer:WaitForChild("PlayerGui")
  135.  
  136.  
  137.  
  138. local gotstring = 0
  139. local function getrandomstring()
  140. gotstring = gotstring+666
  141. local str = ""
  142. local randomstring = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "g", "k", "l", "m", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
  143. "а","б","в","г","д","е","ё","ж","з","и","й","к","л","м","о","п","р","с","т","у","ф","х","ч","щ","ъ","ы","ъ","э","ю","я", "`", "$",
  144. "0","1","2","3","4","5","6","7","8","9", }
  145. local counting123 = 0
  146. for i, v in ipairs(randomstring) do
  147. counting123 = i
  148. end
  149. do
  150. math.randomseed(tick()+gotstring)
  151. for i = 3, math.random(1,100) do
  152. math.randomseed(i+tick()+gotstring)
  153.  
  154. local oneortwo = math.random(1,2)
  155. if oneortwo == 2 then
  156. math.randomseed(i+tick()+gotstring)
  157. str = str..""..randomstring[math.random(1, counting123)]
  158. else
  159. math.randomseed(i+tick()+gotstring)
  160. str = str..""..string.upper(randomstring[math.random(1, counting123)])
  161. end
  162.  
  163. end
  164. end
  165. return str
  166. end
  167. local mousedown = false
  168. local isonmovething = false
  169. local mouseoffset = Vector2.new()
  170. local mousedown = false
  171.  
  172.  
  173.  
  174.  
  175. Gui.Name = getrandomstring()
  176.  
  177. Move.Name = getrandomstring()
  178. Move.Draggable = true
  179. Move.Parent = Gui
  180. Move.BackgroundColor3 = Color3.new(0.0431373, 1, 0.0745098)
  181. Move.BackgroundTransparency = 0.40000000596046
  182. Move.BorderSizePixel = 0
  183. Move.Position = UDim2.new(0.5, 0,0.018, 0)
  184. Move.Size = UDim2.new(0.2, 0, 0.0320388414, 0)
  185.  
  186. Move.MouseEnter:Connect(function()
  187.  
  188. isonmovething = true
  189.  
  190. end)
  191. Move.MouseLeave:Connect(function()
  192.  
  193. isonmovething = mousedown and true or false
  194. end)
  195. mouse.Button1Down:connect(function()
  196. mousedown = true
  197. mouseoffset = Move.AbsolutePosition - Vector2.new(mouse.X, mouse.Y)
  198. end)
  199. mouse.Button1Up:connect(function()
  200. mousedown = false
  201. end)
  202.  
  203. mouse.Move:Connect(function()
  204. if isonmovething == true and mousedown then
  205. Move.Position = UDim2.new(0, mouseoffset.X + mouse.X, 0, mouseoffset.Y + mouse.Y)
  206. end
  207. end)
  208.  
  209. Main.Name = getrandomstring()
  210. Main.Parent = Move
  211. Main.BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471)
  212. Main.BackgroundTransparency = 0.69999998807907
  213. Main.Position = UDim2.new(0, 0, 0.995670795, 0)
  214. Main.Size = UDim2.new(1.0000006, 0, 11.2, 0)
  215.  
  216. EspStatus.Name = getrandomstring()
  217. EspStatus.Parent = Main
  218. EspStatus.BackgroundColor3 = Color3.new(1, 1, 1)
  219. EspStatus.BackgroundTransparency = 1
  220. EspStatus.Size = UDim2.new(0.272955924, 0, 0.161862016, 0)
  221. EspStatus.Font = Enum.Font.ArialBold
  222. EspStatus.Text = "Press T to update Esp"
  223. EspStatus.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  224. EspStatus.TextScaled = true
  225. EspStatus.TextSize = 14
  226. EspStatus.TextWrapped = true
  227.  
  228. st1.Name = getrandomstring()
  229. st1.Parent = Main
  230. st1.BackgroundColor3 = Color3.new(1, 1, 1)
  231. st1.BackgroundTransparency = 1
  232. st1.Position = UDim2.new(0.271787882, 0, 0, 0)
  233. st1.Size = UDim2.new(0.728211343, 0, 0.161862016, 0)
  234. st1.Font = Enum.Font.ArialBold
  235. st1.Text = "Press "..aimkey.." to lock on a person inside ur view"
  236. st1.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  237. st1.TextScaled = true
  238. st1.TextSize = 14
  239. st1.TextWrapped = true
  240.  
  241. st1_2.Name = getrandomstring()
  242. st1_2.Parent = Main
  243. st1_2.BackgroundColor3 = Color3.new(1, 1, 1)
  244. st1_2.BackgroundTransparency = 1
  245. st1_2.Position = UDim2.new(0, 0, 0.375590861, 0)
  246. st1_2.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
  247. st1_2.Font = Enum.Font.ArialBold
  248. st1_2.Text = "Press L to enable esp loop. Press Y to disable/enable aimbot hider"
  249. st1_2.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  250. st1_2.TextScaled = true
  251. st1_2.TextSize = 14
  252. st1_2.TextWrapped = true
  253.  
  254. local aimbothiderbox = Instance.new("TextBox")
  255. aimbothiderbox.Name = getrandomstring()
  256. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." off"
  257. aimbothiderbox.Size = UDim2.new(1, 0,0.162, 0)
  258. aimbothiderbox.TextScaled = true
  259. aimbothiderbox.TextColor3 =Color3.fromRGB(255, 0, 0)
  260. aimbothiderbox.Position = UDim2.new(0, 0,0.853, 0)
  261. aimbothiderbox.BackgroundTransparency = 1
  262. aimbothiderbox.Parent = Main
  263.  
  264. st1_3.Name = getrandomstring()
  265. st1_3.Parent = Main
  266. st1_3.BackgroundColor3 = Color3.new(1, 1, 1)
  267. st1_3.BackgroundTransparency = 1
  268. st1_3.Position = UDim2.new(0, 0, 0.18558608, 0)
  269. st1_3.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
  270. st1_3.Font = Enum.Font.ArialBold
  271. st1_3.Text = "Press O to change team based mode"
  272. st1_3.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  273. st1_3.TextScaled = true
  274. st1_3.TextSize = 14
  275. st1_3.TextWrapped = true
  276. local teambasedstatus = st1_3:Clone()
  277. teambasedstatus.Parent = Main
  278. teambasedstatus.TextScaled = true
  279. teambasedstatus.Position = UDim2.new(0, 0,.7, 0)
  280. teambasedstatus.Size = UDim2.new(1, 0,.1, 0)
  281. teambasedstatus.Name = getrandomstring()
  282. teambasedstatus.Text = "Team Based: "..tostring(TeamBased)
  283. local espstatustext = teambasedstatus:Clone()
  284. espstatustext.Name = getrandomstring()
  285. espstatustext.Position = UDim2.new(0, 0,0.58, 0)
  286. espstatustext.Text = "Esp loop :"..tostring(autoesp)
  287. espstatustext.Parent = Main
  288. local hide = Instance.new("TextButton")
  289. hide.Text = "_"
  290. hide.BackgroundTransparency = 1
  291. hide.TextScaled = true
  292. hide.TextWrapped = true
  293. hide.Size = UDim2.new(0.1, 0,1, 0)
  294. hide.Position = UDim2.new(0.9, 0,-0.15, 0)
  295. hide.Name = getrandomstring()
  296. hide.Parent = Move
  297. Name.Name = getrandomstring()
  298. Name.Parent = Move
  299. Name.BackgroundColor3 = Color3.new(1, 1, 1)
  300. Name.BackgroundTransparency = 1
  301. Name.Size = UDim2.new(0.838, 0, 1, 0)
  302. Name.Font = Enum.Font.Arial
  303. Name.Text = "FPS gui v"..ver
  304. Name.TextColor3 = Color3.new(0, 0, 0)
  305. Name.TextScaled = true
  306. Name.TextSize = 14
  307. Name.TextWrapped = true
  308. Name.TextXAlignment = Enum.TextXAlignment.Left
  309. local scr = Instance.new("ScrollingFrame")
  310. scr.Size = Main.Size
  311. scr.Position = Main.Position
  312. scr.ScrollBarThickness = 0
  313. scr.BackgroundTransparency = 1
  314. scr.Name = getrandomstring()
  315. Main.Size = UDim2.new(1, 0, 1, 0)
  316. Main.Position = UDim2.new(0,0,0,0)
  317. Main.Parent = scr
  318. scr.Parent = Move
  319. startpos = Main.Position
  320. Move.Active = true
  321.  
  322. -- Scripts:
  323. hided = false
  324. hide.MouseButton1Click:Connect(function()
  325. if hided == false then
  326. hided = true
  327. Main:TweenPosition(UDim2.new(0, 0, -1.5, 0))
  328. else
  329. hided = false
  330. Main:TweenPosition(startpos)
  331. end
  332. end)
  333.  
  334.  
  335. aimbothiderbox.FocusLost:Connect(function()
  336. local numb = tonumber(aimbothiderbox.Text)
  337. if aimbothider == true then
  338. aimbothiderbox.TextColor3 =Color3.fromRGB(11, 255, 19)
  339. else
  340. aimbothiderbox.TextColor3 =Color3.fromRGB(255, 0, 0)
  341. end
  342. if numb ~= nil then
  343. aimbothiderspeed = numb
  344. if aimbothider == true then
  345. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." on"
  346. else
  347. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." off"
  348. end
  349. else
  350. if aimbothider == true then
  351. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." on"
  352. else
  353. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." off"
  354. end
  355. end
  356. end)
  357.  
  358.  
  359. local plrsforaim = {}
  360.  
  361.  
  362. Move.Draggable = true
  363. Gui.ResetOnSpawn = false
  364. --Gui.Name = "Chat"
  365. Gui.DisplayOrder = 999
  366. if not game:GetService("CoreGui") then
  367. Gui.Parent = plrs.LocalPlayer.PlayerGui
  368. else
  369. Gui.Parent = game:GetService("CoreGui")
  370. end
  371.  
  372.  
  373.  
  374.  
  375.  
  376. f = {}
  377. local espforlder
  378.  
  379. f.addesp = function()
  380. --print("ESP ran")
  381. if espforlder then
  382. else
  383. espforlder = Instance.new("Folder")
  384. espforlder.Parent = game.Workspace.CurrentCamera
  385. end
  386. for i, v in pairs(espforlder:GetChildren()) do
  387. v:Destroy()
  388. end
  389. for _, plr in pairs(plrs:GetChildren()) do
  390. if plr.Character and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name then
  391. if TeamBased == true then
  392. if plr.Team.Name ~= plrs.LocalPlayer.Team.Name then
  393. local e = espforlder:FindFirstChild(plr.Name)
  394. if not e then
  395. --print("Added esp for team based")
  396. local bill = Instance.new("BillboardGui", espforlder)
  397. bill.Name = plr.Name
  398. bill.AlwaysOnTop = true
  399. bill.Size = UDim2.new(1,0,1,0)
  400. bill.Adornee = plr.Character.Head
  401. local Frame = Instance.new('Frame',bill)
  402. Frame.Active = true
  403. Frame.BackgroundColor3 = Color3.new(0.541176, 0.168627, 0.886275)
  404. Frame.BackgroundTransparency = 0
  405. Frame.BorderSizePixel = 0
  406. Frame.AnchorPoint = Vector2.new(.5, .5)
  407. Frame.Position = UDim2.new (0.5,0,0.5,0)
  408. Frame.Size = UDim2.new (1,0,1,0)
  409. Frame.Rotation = 0
  410. plr.Character.Humanoid.Died:Connect(function()
  411. bill:Destroy()
  412. end)
  413. end
  414. end
  415. else
  416. local e = espforlder:FindFirstChild(plr.Name)
  417. if not e then
  418. --print("Added esp")
  419. local bill = Instance.new("BillboardGui", espforlder)
  420. bill.Name = plr.Name
  421. bill.AlwaysOnTop = true
  422. bill.Size = UDim2.new(1,0,1,0)
  423. bill.Adornee = plr.Character.Head
  424. local Frame = Instance.new('Frame',bill)
  425. Frame.Active = true
  426. Frame.BackgroundColor3 = Color3.new(0.541176, 0.168627, 0.886275)
  427. Frame.BackgroundTransparency = 0
  428. Frame.BorderSizePixel = 0
  429. Frame.AnchorPoint = Vector2.new(.5, .5)
  430. Frame.Position = UDim2.new (0.5,0,0.5,0)
  431. Frame.Size = UDim2.new (1,0,1,0)
  432. Frame.Rotation = 0
  433. plr.Character.Humanoid.Died:Connect(function()
  434. bill:Destroy()
  435. end)
  436. end
  437. end
  438.  
  439.  
  440. end
  441. end
  442. end
  443. local uis = game:GetService("UserInputService")
  444. local bringall = false
  445. local hided2 = false
  446. mouse.KeyDown:Connect(function(a)
  447. if a == "t" then
  448. --print("worked1")
  449. f.addesp()
  450. elseif a == gui_hide_button[2] and uis:IsKeyDown(gui_hide_button[1]) then
  451. if hided2 == false then
  452. hided2 = true
  453. autoesp =false
  454. if espforlder then
  455. espforlder:Destroy()
  456. end
  457. Gui.Enabled = false
  458. else
  459. Gui.Enabled = true
  460. hided2 = false
  461. end
  462. elseif a == "u" then
  463. if mouselock == false then
  464. mouselock = true
  465. else
  466. mouselock = false
  467. end
  468. elseif a == "y" then
  469. if aimbothider == false then
  470. aimbothider = true
  471. if aimbothider == true then
  472. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." on"
  473. else
  474. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." off"
  475. end
  476. else
  477.  
  478. aimbothider = false
  479. if aimbothider == true then
  480. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." on"
  481. else
  482. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." off"
  483. end
  484. end
  485. if aimbothider == true then
  486. aimbothiderbox.TextColor3 =Color3.fromRGB(11, 255, 19)
  487. else
  488. aimbothiderbox.TextColor3 =Color3.fromRGB(255, 0, 0)
  489. end
  490. elseif a == "l" then
  491. if autoesp == false then
  492. autoesp = true
  493. else
  494. autoesp = false
  495. end
  496. elseif a == Aim_Assist_Key[2] and uis:IsKeyDown(Aim_Assist_Key[1]) then
  497. if Aim_Assist == true then
  498. Aim_Assist = false
  499. --print("disabled")
  500. else
  501. Aim_Assist = true
  502. end
  503. end
  504. if a == "j" then
  505. if mouse.Target then
  506. mouse.Target:Destroy()
  507. end
  508. end
  509. if a == key then
  510. if switch == false then
  511. switch = true
  512. else
  513. switch = false
  514. if aimatpart ~= nil then
  515. aimatpart = nil
  516. end
  517. end
  518. elseif a == teambasedswitch then
  519. if TeamBased == true then
  520. TeamBased = false
  521. teambasedstatus.Text = "Team Based: "..tostring(TeamBased)
  522. else
  523. TeamBased = true
  524. teambasedstatus.Text = "Team Based: "..tostring(TeamBased)
  525. end
  526. elseif a == aimkey then
  527. if not aimatpart then
  528. local maxangle = math.rad(20)
  529. for i, plr in pairs(plrs:GetChildren()) do
  530. if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
  531. if TeamBased == true then
  532. if plr.Team.Name ~= lplr.Team.Name then
  533. local an = checkfov(plr.Character.Head)
  534. if an < maxangle then
  535. maxangle = an
  536. aimatpart = plr.Character.Head
  537. end
  538. end
  539. else
  540. local an = checkfov(plr.Character.Head)
  541. if an < maxangle then
  542. maxangle = an
  543. aimatpart = plr.Character.Head
  544. end
  545. --print(plr)
  546. end
  547. local old = aimatpart
  548. plr.Character.Humanoid.Died:Connect(function()
  549. --print("died")
  550. if aimatpart and aimatpart == old then
  551. aimatpart = nil
  552. end
  553. end)
  554.  
  555. end
  556. end
  557. else
  558. aimatpart = nil
  559. canaimat = false
  560. delay(1.1, function()
  561. canaimat = true
  562. end)
  563. end
  564. end
  565. end)
  566.  
  567. function getfovxyz (p0, p1, deg)
  568. local x1, y1, z1 = p0:ToOrientation()
  569. local cf = CFrame.new(p0.p, p1.p)
  570. local x2, y2, z2 = cf:ToOrientation()
  571. local d = math.deg
  572. if deg then
  573. return Vector3.new(d(x1-x2), d(y1-y2), d(z1-z2))
  574. else
  575. return Vector3.new((x1-x2), (y1-y2), (z1-z2))
  576. end
  577. end
  578.  
  579.  
  580. function aimat(part)
  581. if part then
  582. if aimbothider == true or Aim_Assist == true then
  583. cam.CFrame = cam.CFrame:Lerp(CFrame.new(cam.CFrame.p, part.CFrame.p), aimbothiderspeed)
  584. else
  585.  
  586. cam.CFrame = CFrame.new(cam.CFrame.p, part.CFrame.p)
  587. end
  588. end
  589. end
  590. function checkfov (part)
  591. local fov = getfovxyz(game.Workspace.CurrentCamera.CFrame, part.CFrame)
  592. local angle = math.abs(fov.X) + math.abs(fov.Y)
  593. return angle
  594. end
  595. pcall(function()
  596. delay(0, function()
  597. while wait(.4) do
  598. if Aim_Assist and not aimatpart and canaimat and lplr.Character and lplr.Character.Humanoid and lplr.Character.Humanoid.Health > 0 then
  599. for i, plr in pairs(plrs:GetChildren()) do
  600.  
  601.  
  602. local minangle = math.rad(5.5)
  603. local lastpart = nil
  604. local function gg(plr)
  605. pcall(function()
  606. if plr.Name ~= lplr.Name and plr.Character and plr.Character.Humanoid and plr.Character.Humanoid.Health > 0 and plr.Character.Head then
  607. local raycasted = false
  608. local cf1 = CFrame.new(cam.CFrame.p, plr.Character.Head.CFrame.p) * CFrame.new(0, 0, -4)
  609. local r1 = Ray.new(cf1.p, cf1.LookVector * 9000)
  610. local obj, pos = game.Workspace:FindPartOnRayWithIgnoreList(r1, {lplr.Character.Head})
  611. local dist = (plr.Character.Head.CFrame.p- pos).magnitude
  612. if dist < 4 then
  613. raycasted = true
  614. end
  615. if raycasted == true then
  616. local an1 = getfovxyz(cam.CFrame, plr.Character.Head.CFrame)
  617. local an = abs(an1.X) + abs(an1.Y)
  618. if an < minangle then
  619. minangle = an
  620. lastpart = plr.Character.Head
  621. end
  622. end
  623. end
  624. end)
  625. end
  626. if TeamBased then
  627. if plr.Team.Name ~= lplr.Team.Name then
  628. gg(plr)
  629. end
  630. else
  631. gg(plr)
  632. end
  633. --print(math.deg(minangle))
  634. if lastpart then
  635. aimatpart = lastpart
  636. aimatpart.Parent.Humanoid.Died:Connect(function()
  637. if aimatpart == lastpart then
  638. aimatpart = nil
  639. end
  640. end)
  641.  
  642. end
  643. end
  644. end
  645. end
  646. end)
  647. end)
  648. local oldheadpos
  649. local lastaimapart
  650. game:GetService("RunService").RenderStepped:Connect(function()
  651. espstatustext.Text = "Esp loop :"..tostring(autoesp)
  652. if aimatpart and lplr.Character and lplr.Character.Head then
  653. if BetterDeathCount and lastaimapart and lastaimapart == aimatpart then
  654. local dist = (oldheadpos - aimatpart.CFrame.p).magnitude
  655. if dist > 40 then
  656. aimatpart = nil
  657. end
  658. end
  659. lastaimapart = aimatpart
  660. oldheadpos = lastaimapart.CFrame.p
  661. do
  662. if aimatpart.Parent == plrs.LocalPlayer.Character then
  663. aimatpart = nil
  664. end
  665. aimat(aimatpart)
  666. pcall(function()
  667. if Aim_Assist == true then
  668. local cf1 = CFrame.new(cam.CFrame.p, aimatpart.CFrame.p) * CFrame.new(0, 0, -4)
  669. local r1 = Ray.new(cf1.p, cf1.LookVector * 1000)
  670. local obj, pos = game.Workspace:FindPartOnRayWithIgnoreList(r1, {lplr.Character.Head})
  671. local dist = (aimatpart.CFrame.p- pos).magnitude
  672. if obj then
  673. --print(obj:GetFullName())
  674. end
  675. if not obj or dist > 6 then
  676. aimatpart = nil
  677. --print("ooof")
  678. end
  679. canaimat = false
  680. delay(.5, function()
  681. canaimat = true
  682. end)
  683. end
  684. end)
  685. end
  686.  
  687.  
  688.  
  689. end
  690. end)
  691. delay(0, function()
  692. while wait(espupdatetime) do
  693. if autoesp == true then
  694. pcall(function()
  695. f.addesp()
  696. end)
  697. end
  698. end
  699. end)
  700. --warn("loaded")
  701. end)
Add Comment
Please, Sign In to add comment