Advertisement
Guest User

Untitled

a guest
Jan 19th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.57 KB | None | 0 0
  1. --[[ Name: Perfection Aimbot V.01
  2. Author: Sneik
  3. Description: My best script ever!
  4. It calculates the speed of the bullet fall!
  5. Made for attrition, idk if it works on other fps
  6. Keybinding: Check gui
  7. ]]
  8.  
  9.  
  10.  
  11.  
  12. pcall(function()
  13. local espcolor = Color3.fromRGB(140, 69, 102)
  14. local wallhack_esp_transparency = .4
  15. local gui_hide_button = {Enum.KeyCode.LeftControl, "h"}
  16. local plrs = game:GetService("Players")
  17. local lplr = game:GetService("Players").LocalPlayer
  18. local TeamBased = true ; local teambasedswitch = "o"
  19. local presskeytoaim = true; local aimkey = "e"
  20. aimbothider = false; aimbothiderspeed = .5
  21. local Aim_Assist = false ; Aim_Assist_Key = {Enum.KeyCode.LeftControl, "z"}
  22. local espupdatetime = 5; autoesp = false; local charmsesp = true
  23. local movementcounting = true
  24.  
  25.  
  26.  
  27.  
  28. local mouselock = false
  29. local canaimat = true
  30. local lockaim = true; local lockangle = 5
  31. local ver = "0.1"
  32. local cam = game.Workspace.CurrentCamera
  33. local BetterDeathCount = true
  34. local ballisticsboost = 0
  35.  
  36. local mouse = lplr:GetMouse()
  37. local switch = false
  38. local key = "k"
  39. local aimatpart = nil
  40. local lightesp = false
  41.  
  42. local abs = math.abs
  43.  
  44. local Gui = Instance.new("ScreenGui")
  45. local Move = Instance.new("Frame")
  46. local Main = Instance.new("Frame")
  47. local EspStatus = Instance.new("TextLabel")
  48. local st1 = Instance.new("TextLabel")
  49. local st1_2 = Instance.new("TextLabel")
  50. local st1_3 = Instance.new("TextBox")
  51. local Name = Instance.new("TextLabel")
  52. --Properties:
  53.  
  54. Gui.Parent = plrs.LocalPlayer:WaitForChild("PlayerGui")
  55.  
  56.  
  57.  
  58. local gotstring = 0
  59. local function getrandomstring()
  60. gotstring = gotstring+666
  61. local str = ""
  62. 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",
  63. "а","б","в","г","д","е","ё","ж","з","и","й","к","л","м","о","п","р","с","т","у","ф","х","ч","щ","ъ","ы","ъ","э","ю","я", "`", "$",
  64. "0","1","2","3","4","5","6","7","8","9", }
  65. local counting123 = 0
  66. for i, v in ipairs(randomstring) do
  67. counting123 = i
  68. end
  69. do
  70. math.randomseed(tick()+gotstring)
  71. for i = 3, math.random(1,100) do
  72. math.randomseed(i+tick()+gotstring)
  73.  
  74. local oneortwo = math.random(1,2)
  75. if oneortwo == 2 then
  76. math.randomseed(i+tick()+gotstring)
  77. str = str..""..randomstring[math.random(1, counting123)]
  78. else
  79. math.randomseed(i+tick()+gotstring)
  80. str = str..""..string.upper(randomstring[math.random(1, counting123)])
  81. end
  82.  
  83. end
  84. end
  85. return str
  86. end
  87. local mousedown = false
  88. local isonmovething = false
  89. local mouseoffset = Vector2.new()
  90. local mousedown = false
  91. local bspeed = 3584
  92.  
  93.  
  94.  
  95. Gui.Name = getrandomstring()
  96.  
  97. Move.Name = getrandomstring()
  98. Move.Draggable = true
  99. Move.Parent = Gui
  100. Move.BackgroundColor3 = Color3.new(0.0431373, 1, 0.0745098)
  101. Move.BackgroundTransparency = 0.40000000596046
  102. Move.BorderSizePixel = 0
  103. Move.Position = UDim2.new(0.5, 0,0.018, 0)
  104. Move.Size = UDim2.new(0, 320, 0, 30)
  105.  
  106. Move.MouseEnter:Connect(function()
  107.  
  108. isonmovething = true
  109.  
  110. end)
  111. Move.MouseLeave:Connect(function()
  112.  
  113. isonmovething = mousedown and true or false
  114. end)
  115. mouse.Button1Down:connect(function()
  116. mousedown = true
  117. mouseoffset = Move.AbsolutePosition - Vector2.new(mouse.X, mouse.Y)
  118. end)
  119. mouse.Button1Up:connect(function()
  120. mousedown = false
  121. end)
  122.  
  123. mouse.Move:Connect(function()
  124. if isonmovething == true and mousedown then
  125. Move.Position = UDim2.new(0, mouseoffset.X + mouse.X, 0, mouseoffset.Y + mouse.Y)
  126. end
  127. end)
  128.  
  129. Main.Name = getrandomstring()
  130. Main.Parent = Move
  131. Main.BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471)
  132. Main.BackgroundTransparency = 0.69999998807907
  133. Main.Position = UDim2.new(0, 0, 0.995670795, 0)
  134. Main.Size = UDim2.new(1.0000006, 0, 11.2, 0)
  135.  
  136. EspStatus.Name = getrandomstring()
  137. EspStatus.Parent = Main
  138. EspStatus.BackgroundColor3 = Color3.new(1, 1, 1)
  139. EspStatus.BackgroundTransparency = 1
  140. EspStatus.Size = UDim2.new(0.272955924, 0, 0.161862016, 0)
  141. EspStatus.Font = Enum.Font.ArialBold
  142. EspStatus.Text = "Press T to update Esp"
  143. EspStatus.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  144. EspStatus.TextScaled = true
  145. EspStatus.TextSize = 14
  146. EspStatus.TextWrapped = true
  147.  
  148. st1.Name = getrandomstring()
  149. st1.Parent = Main
  150. st1.BackgroundColor3 = Color3.new(1, 1, 1)
  151. st1.BackgroundTransparency = 1
  152. st1.Position = UDim2.new(0.271787882, 0, 0, 0)
  153. st1.Size = UDim2.new(0.728211343, 0, 0.161862016, 0)
  154. st1.Font = Enum.Font.ArialBold
  155. st1.Text = "Press "..aimkey.." to lock on a person inside ur view"
  156. st1.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  157. st1.TextScaled = true
  158. st1.TextSize = 14
  159. st1.TextWrapped = true
  160.  
  161. st1_2.Name = getrandomstring()
  162. st1_2.Parent = Main
  163. st1_2.BackgroundColor3 = Color3.new(1, 1, 1)
  164. st1_2.BackgroundTransparency = 1
  165. st1_2.Position = UDim2.new(0, 0, 0.375590861, 0)
  166. st1_2.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
  167. st1_2.Font = Enum.Font.ArialBold
  168. st1_2.TextXAlignment = Enum.TextXAlignment.Left
  169. st1_2.Text = "Current ballistics: 0"
  170. st1_2.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  171. st1_2.TextScaled = true
  172. st1_2.TextSize = 14
  173. st1_2.TextWrapped = true
  174.  
  175. local aimbothiderbox = Instance.new("TextBox")
  176. aimbothiderbox.Name = getrandomstring()
  177. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." off"
  178. aimbothiderbox.Size = UDim2.new(1, 0,0.162, 0)
  179. aimbothiderbox.TextScaled = true
  180. aimbothiderbox.TextColor3 =Color3.fromRGB(255, 0, 0)
  181. aimbothiderbox.Position = UDim2.new(0, 0,0.853, 0)
  182. aimbothiderbox.BackgroundTransparency = 1
  183. aimbothiderbox.Parent = Main
  184.  
  185. st1_3.Name = getrandomstring()
  186. st1_3.Parent = Main
  187. st1_3.BackgroundColor3 = Color3.new(1, 1, 1)
  188. st1_3.BackgroundTransparency = 1
  189. st1_3.Position = UDim2.new(0, 0, 0.18558608, 0)
  190. st1_3.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
  191. st1_3.Font = Enum.Font.ArialBold
  192. st1_3.Text = "Bullet speed = 3584"
  193. st1_3.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  194. st1_3.TextScaled = true
  195. st1_3.TextSize = 14
  196. st1_3.TextWrapped = true
  197. local teambasedstatus = st1_3:Clone()
  198. teambasedstatus.Parent = Main
  199. teambasedstatus.TextScaled = true
  200. teambasedstatus.Position = UDim2.new(0, 0,.7, 0)
  201. teambasedstatus.Size = UDim2.new(1, 0,.1, 0)
  202. teambasedstatus.Name = getrandomstring()
  203. teambasedstatus.Text = "Team Based: "..tostring(TeamBased)
  204. local espstatustext = teambasedstatus:Clone()
  205. espstatustext.Name = getrandomstring()
  206. espstatustext.Position = UDim2.new(0, 0,0.58, 0)
  207. espstatustext.Text = "Esp loop :"..tostring(autoesp)
  208. espstatustext.Parent = Main
  209. local hide = Instance.new("TextButton")
  210. hide.Text = "_"
  211. hide.BackgroundTransparency = 1
  212. hide.TextScaled = true
  213. hide.TextWrapped = true
  214. hide.Size = UDim2.new(0.1, 0,1, 0)
  215. hide.Position = UDim2.new(0.9, 0,-0.15, 0)
  216. hide.Name = getrandomstring()
  217. hide.Parent = Move
  218. Name.Name = getrandomstring()
  219. Name.Parent = Move
  220. Name.BackgroundColor3 = Color3.new(1, 1, 1)
  221. Name.BackgroundTransparency = 1
  222. Name.Size = UDim2.new(0.838, 0, 1, 0)
  223. Name.Font = Enum.Font.Arial
  224. Name.Text = "Perfect Aimbot v"..ver
  225. Name.TextColor3 = Color3.new(0, 0, 0)
  226. Name.TextScaled = true
  227. Name.TextSize = 14
  228. Name.TextWrapped = true
  229. Name.TextXAlignment = Enum.TextXAlignment.Left
  230. local scr = Instance.new("ScrollingFrame")
  231. scr.Size = Main.Size
  232. scr.Position = Main.Position
  233. scr.ScrollBarThickness = 0
  234. scr.BackgroundTransparency = 1
  235. scr.Name = getrandomstring()
  236. Main.Size = UDim2.new(1, 0, 1, 0)
  237. Main.Position = UDim2.new(0,0,0,0)
  238. Main.Parent = scr
  239. scr.Parent = Move
  240. startpos = Main.Position
  241. Move.Active = true
  242.  
  243. -- Scripts:
  244. hided = false
  245. hide.MouseButton1Click:Connect(function()
  246. if hided == false then
  247. hided = true
  248. Main:TweenPosition(UDim2.new(0, 0, -1.5, 0))
  249. else
  250. hided = false
  251. Main:TweenPosition(startpos)
  252. end
  253. end)
  254.  
  255.  
  256. aimbothiderbox.FocusLost:Connect(function()
  257. local numb = tonumber(aimbothiderbox.Text)
  258. if aimbothider == true then
  259. aimbothiderbox.TextColor3 =Color3.fromRGB(11, 255, 19)
  260. else
  261. aimbothiderbox.TextColor3 =Color3.fromRGB(255, 0, 0)
  262. end
  263. if numb ~= nil then
  264. aimbothiderspeed = numb
  265. if aimbothider == true then
  266. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." on"
  267. else
  268. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." off"
  269. end
  270. else
  271. if aimbothider == true then
  272. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." on"
  273. else
  274. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." off"
  275. end
  276. end
  277. end)
  278.  
  279.  
  280. local plrsforaim = {}
  281.  
  282.  
  283. Move.Draggable = true
  284. Gui.ResetOnSpawn = false
  285. --Gui.Name = "Chat"
  286. Gui.DisplayOrder = 999
  287. pcall(function()
  288. if not game:GetService("CoreGui") then
  289. Gui.Parent = plrs.LocalPlayer.PlayerGui
  290. else
  291. Gui.Parent = game:GetService("CoreGui")
  292. end
  293. end)
  294. local espheadthing
  295. do
  296. local BillboardGui = Instance.new("BillboardGui")
  297. local PName = Instance.new("TextLabel")
  298. local Pdist = Instance.new("TextLabel")
  299. local ImageLabel = Instance.new("ImageLabel")
  300. local ImageLabel_2 = Instance.new("ImageLabel")
  301. --Properties:
  302. --BillboardGui.Parent = game.Workspace.Part
  303. BillboardGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  304. BillboardGui.AlwaysOnTop = true
  305. BillboardGui.LightInfluence = 0
  306. BillboardGui.Size = UDim2.new(0, 100, 0, 46)
  307. BillboardGui.Name = "headoverthing"
  308. PName.Name = "PName"
  309. PName.Parent = BillboardGui
  310. PName.BackgroundColor3 = espcolor
  311. PName.BackgroundTransparency = 0.55000001192093
  312. PName.BorderSizePixel = 0
  313. PName.Size = UDim2.new(0, 100, 0, 23)
  314. PName.Font = Enum.Font.SourceSans
  315. PName.Text = "urmom"
  316. PName.TextColor3 = Color3.new(0, 0, 0)
  317. PName.TextScaled = true
  318. PName.TextSize = 14
  319. PName.TextWrapped = true
  320.  
  321. Pdist.Name = "Pdist"
  322. Pdist.Parent = BillboardGui
  323. Pdist.AnchorPoint = Vector2.new(0.5, 0)
  324. Pdist.BackgroundColor3 = espcolor
  325. Pdist.BackgroundTransparency = 0.55000001192093
  326. Pdist.BorderSizePixel = 0
  327. Pdist.Position = UDim2.new(0.5, 0, 0.5, 0)
  328. Pdist.Size = UDim2.new(0, 70, 0, 23)
  329. Pdist.Font = Enum.Font.SourceSans
  330. Pdist.Text = "666"
  331. Pdist.TextColor3 = Color3.new(0, 0, 0)
  332. Pdist.TextScaled = true
  333. Pdist.TextSize = 14
  334. Pdist.TextWrapped = true
  335.  
  336. ImageLabel.Parent = BillboardGui
  337. ImageLabel.BackgroundColor3 = Color3.new(0.298039, 1, 0)
  338. ImageLabel.BackgroundTransparency = 1
  339. ImageLabel.BorderColor3 = espcolor
  340. ImageLabel.Position = UDim2.new(1, -15, 0.5, 0)
  341. ImageLabel.Rotation = 180
  342. ImageLabel.Size = UDim2.new(0, 15, 0, 23)
  343. ImageLabel.Image = "rbxassetid://2832171824"
  344. ImageLabel.ImageColor3 = espcolor
  345. ImageLabel.ImageTransparency = 0.55000001192093
  346.  
  347. ImageLabel_2.Parent = BillboardGui
  348. ImageLabel_2.BackgroundColor3 = espcolor
  349. ImageLabel_2.BackgroundTransparency = 1
  350. ImageLabel_2.BorderColor3 = Color3.new(0.298039, 1, 0)
  351. ImageLabel_2.Position = UDim2.new(0, 0, 0.5, 0)
  352. ImageLabel_2.Rotation = 180
  353. ImageLabel_2.Size = UDim2.new(0, 15, 0, 23)
  354. ImageLabel_2.Image = "rbxassetid://2832177613"
  355. ImageLabel_2.ImageColor3 = espcolor
  356. ImageLabel_2.ImageTransparency = 0.55000001192093
  357. espheadthing = BillboardGui
  358. end
  359.  
  360.  
  361.  
  362. f = {}
  363. f.UpdateHeadUI = function(v)
  364.  
  365.  
  366. if v.Adornee and v.Adornee ~= nil then
  367. local destr = false
  368. if TeamBased then
  369. destr = true
  370. local plr = plrs:GetPlayerFromCharacter(v.Adornee.Parent)
  371. if plr and plr.Team and plr.Team.Name ~= lplr.Team.Name then
  372. destr = false
  373. end
  374. end
  375. if lightesp == true then
  376. v.Pdist.TextColor3 = Color3.new(1,1,1)
  377. v.PName.TextColor3 = Color3.new(1,1,1)
  378. else
  379. v.Pdist.TextColor3 = Color3.new(0,0,0)
  380. v.PName.TextColor3 = Color3.new(0,0,0)
  381. end
  382. local d = math.floor((cam.CFrame.p - v.Adornee.CFrame.p).magnitude)
  383. v.Pdist.Text = tostring(d)
  384. if d < 14 then
  385. v.Enabled = false
  386. else
  387. v.Enabled = true
  388. end
  389. v.StudsOffset = Vector3.new(0,.6+d/14,0)
  390. if destr then
  391. v:Destroy()
  392. end
  393. else
  394. v:Destroy()
  395. end
  396.  
  397.  
  398. end
  399. local espforlder
  400. local partconverter = Instance.new("Part")
  401. --local headsupdatelist = {}
  402. st1_3.FocusLost:connect(function()
  403. if tonumber(st1_3.Text) then
  404. bspeed = tonumber(st1_3.Text)
  405. else
  406.  
  407. end
  408. end)
  409. f.addesp = function()
  410. pcall(function()
  411. --print("ESP ran")
  412. if espforlder then
  413. espforlder:Destroy()
  414. espforlder = Instance.new("Folder")
  415. espforlder.Parent = game.Workspace.CurrentCamera
  416. else
  417. espforlder = Instance.new("Folder")
  418. espforlder.Parent = game.Workspace.CurrentCamera
  419. end
  420. for i, v in pairs(espforlder:GetChildren()) do
  421. v:Destroy()
  422. end
  423. for _, plr in pairs(plrs:GetChildren()) do
  424. if plr.Character and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name then
  425. if TeamBased == true then
  426.  
  427. if plr.Team.Name ~= plrs.LocalPlayer.Team.Name then
  428. pcall(function()
  429. local e = espforlder:FindFirstChild(plr.Name)
  430. if not e then
  431. local fold = Instance.new("Folder", espforlder)
  432. fold.Name = plr.Name
  433.  
  434. --partconverter.BrickColor = plr.Team.Color
  435. --local teamc = partconverter.Color
  436. for i, p in pairs(plr.Character:GetChildren()) do
  437. if p:IsA("BasePart") and p.Name ~= "HumanoidRootPart" then
  438. if charmsesp then
  439. local urmom = Instance.new("BoxHandleAdornment")
  440. urmom.ZIndex = 10
  441. urmom.AlwaysOnTop = true
  442. urmom.Color3 = espcolor
  443. urmom.Size = p.Size
  444. urmom.Adornee = p
  445. urmom.Name = tick().." Ur mom has big gay"
  446. urmom.Transparency = wallhack_esp_transparency
  447. urmom.Parent = fold
  448. if p.Name == "Head" then
  449. local th = p:FindFirstChild("headoverthing")
  450. if not th then
  451. local ht = espheadthing:Clone()
  452. ht.PName.Text = p.Parent.Name
  453. ht.Adornee = p
  454. --table.insert(headsupdatelist, ht)
  455. delay(0, function()
  456. while wait(0.08) and plr and p do
  457. f.UpdateHeadUI(ht)
  458. end
  459. end)
  460. ht.Parent = p
  461. end
  462. end
  463. end
  464. end
  465. end
  466. plr.Character.Humanoid.Died:Connect(function()
  467. fold:Destroy()
  468. end)
  469.  
  470. end
  471. end)
  472. end
  473. else
  474. local e = espforlder:FindFirstChild(plr.Name)
  475. if not e then
  476. local fold = Instance.new("Folder", espforlder)
  477. fold.Name = plr.Name
  478.  
  479. --partconverter.BrickColor = plr.Team.Color
  480. --local teamc = Move.BackgroundColor3
  481. for i, p in pairs(plr.Character:GetChildren()) do
  482. if p:IsA("BasePart") and p.Name ~= "HumanoidRootPart" then
  483. pcall(function()
  484. if charmsesp then
  485. local urmom = Instance.new("BoxHandleAdornment")
  486. urmom.ZIndex = 10
  487. urmom.AlwaysOnTop = true
  488. urmom.Color3 = espcolor
  489. urmom.Size = p.Size
  490. urmom.Adornee = p
  491. urmom.Name = tick().." Ur mom has big gay"
  492. urmom.Transparency = wallhack_esp_transparency
  493. urmom.Parent = fold
  494. end
  495. if p.Name == "Head" then
  496. local th = p:FindFirstChild("headoverthing")
  497. if not th then
  498. local ht = espheadthing:Clone()
  499. ht.PName.Text = p.Parent.Name
  500. ht.Adornee = p
  501. delay(0, function()
  502. while wait(0.08) and plr and p do
  503. f.UpdateHeadUI(ht)
  504. end
  505. end)
  506. --table.insert(headsupdatelist, ht)
  507. ht.Parent = p
  508. end
  509. end
  510. end)
  511. end
  512. end
  513. plr.Character.Humanoid.Died:Connect(function()
  514. fold:Destroy()
  515. end)
  516. end
  517. end
  518.  
  519.  
  520. end
  521. end
  522. end)
  523. end
  524.  
  525. local uis = game:GetService("UserInputService")
  526. local bringall = false
  527. local hided2 = false
  528. local upping = false
  529. local downing = false
  530. mouse.KeyDown:Connect(function(a)
  531.  
  532. if a == "t" then
  533. --print("worked1")
  534. f.addesp()
  535. elseif a == gui_hide_button[2] and uis:IsKeyDown(gui_hide_button[1]) then
  536. if hided2 == false then
  537. hided2 = true
  538. autoesp =false
  539. if espforlder then
  540. espforlder:Destroy()
  541. end
  542. Gui.Enabled = false
  543. else
  544. Gui.Enabled = true
  545. hided2 = false
  546. end
  547.  
  548. elseif a == "y" then
  549. if aimbothider == false then
  550. aimbothider = true
  551. if aimbothider == true then
  552. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." on"
  553. else
  554. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." off"
  555. end
  556. else
  557.  
  558. aimbothider = false
  559. if aimbothider == true then
  560. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." on"
  561. else
  562. aimbothiderbox.Text = "Speed :"..tostring(aimbothiderspeed).." off"
  563. end
  564. end
  565. if aimbothider == true then
  566. aimbothiderbox.TextColor3 =Color3.fromRGB(11, 255, 19)
  567. else
  568. aimbothiderbox.TextColor3 =Color3.fromRGB(255, 0, 0)
  569. end
  570. elseif a == "l" then
  571. if not uis:IsKeyDown(Enum.KeyCode.LeftControl) then
  572. if autoesp == false then
  573. autoesp = true
  574. else
  575. autoesp = false
  576. end
  577. else
  578. if lightesp == true then
  579. lightesp = false
  580. else
  581. lightesp = true
  582. end
  583. end
  584. elseif a == "]" then
  585. upping = true
  586. downing = false
  587. elseif a== "[" then
  588. downing = true
  589. upping = false
  590. elseif a == Aim_Assist_Key[2] and uis:IsKeyDown(Aim_Assist_Key[1]) then
  591. if Aim_Assist == true then
  592. Aim_Assist = false
  593. --print("disabled")
  594. else
  595. Aim_Assist = true
  596. end
  597. end
  598. if a == "j" then
  599. if mouse.Target then
  600. mouse.Target:Destroy()
  601. end
  602. end
  603. if a == key then
  604. if switch == false then
  605. switch = true
  606. else
  607. switch = false
  608. if aimatpart ~= nil then
  609. aimatpart = nil
  610. end
  611. end
  612. elseif a == "b" and uis:IsKeyDown(Enum.KeyCode.LeftControl) and not uis:IsKeyDown(Enum.KeyCode.R) then
  613. if movementcounting then
  614. movementcounting = false
  615. else
  616. movementcounting = true
  617. end
  618. elseif a == teambasedswitch then
  619. if TeamBased == true then
  620. TeamBased = false
  621. teambasedstatus.Text = "Team Based: "..tostring(TeamBased)
  622. else
  623. TeamBased = true
  624. teambasedstatus.Text = "Team Based: "..tostring(TeamBased)
  625. end
  626. elseif a == "b" and uis:IsKeyDown(Enum.KeyCode.LeftControl) and uis:IsKeyDown(Enum.KeyCode.R) then
  627. ballisticsboost = 0
  628. elseif a == aimkey then
  629. if not aimatpart then
  630. local maxangle = math.rad(20)
  631. for i, plr in pairs(plrs:GetChildren()) do
  632. if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
  633. if TeamBased == true then
  634. if plr.Team.Name ~= lplr.Team.Name then
  635. local an = checkfov(plr.Character.Head)
  636. if an < maxangle then
  637. maxangle = an
  638. aimatpart = plr.Character.Head
  639. end
  640. end
  641. else
  642. local an = checkfov(plr.Character.Head)
  643. if an < maxangle then
  644. maxangle = an
  645. aimatpart = plr.Character.Head
  646. end
  647. --print(plr)
  648. end
  649. local old = aimatpart
  650. plr.Character.Humanoid.Died:Connect(function()
  651. --print("died")
  652. if aimatpart and aimatpart == old then
  653. aimatpart = nil
  654. end
  655. end)
  656.  
  657. end
  658. end
  659. else
  660. aimatpart = nil
  661. canaimat = false
  662. delay(1.1, function()
  663. canaimat = true
  664. end)
  665. end
  666. end
  667. end)
  668.  
  669. function getfovxyz (p0, p1, deg)
  670. local x1, y1, z1 = p0:ToOrientation()
  671. local cf = CFrame.new(p0.p, p1.p)
  672. local x2, y2, z2 = cf:ToOrientation()
  673. local d = math.deg
  674. if deg then
  675. return Vector3.new(d(x1-x2), d(y1-y2), d(z1-z2))
  676. else
  677. return Vector3.new((x1-x2), (y1-y2), (z1-z2))
  678. end
  679. end
  680.  
  681.  
  682. function aimat(part)
  683. if part then
  684. --print(part)
  685. local d = (cam.CFrame.p - part.CFrame.p).magnitude
  686. local calculatedrop
  687. local timetoaim = 0
  688. local pos2 = Vector3.new()
  689. if movementcounting == true then
  690. timetoaim = d/bspeed
  691. pos2 = part.Velocity * timetoaim
  692. end
  693. local minuseddrop = (ballisticsboost+50)/50
  694. if ballisticsboost ~= 0 then
  695. calculatedrop = d - (d/minuseddrop)
  696.  
  697. else
  698. calculatedrop = 0
  699. end
  700. --print(calculatedrop)
  701. local addative = Vector3.new()
  702. if movementcounting then
  703. addative = pos2
  704. end
  705. local cf = CFrame.new(cam.CFrame.p, (addative + part.CFrame.p+ Vector3.new(0, calculatedrop, 0)))
  706. if aimbothider == true or Aim_Assist == true then
  707. cam.CFrame = cam.CFrame:Lerp(cf, aimbothiderspeed)
  708. else
  709.  
  710. cam.CFrame = cf
  711. end
  712. --print(cf)
  713. end
  714. end
  715. function checkfov (part)
  716. local fov = getfovxyz(game.Workspace.CurrentCamera.CFrame, part.CFrame)
  717. local angle = math.abs(fov.X) + math.abs(fov.Y)
  718. return angle
  719. end
  720. pcall(function()
  721. delay(0, function()
  722. while wait(.32) do
  723. if Aim_Assist and not aimatpart and canaimat and lplr.Character and lplr.Character.Humanoid and lplr.Character.Humanoid.Health > 0 then
  724. for i, plr in pairs(plrs:GetChildren()) do
  725.  
  726.  
  727. local minangle = math.rad(5.5)
  728. local lastpart = nil
  729. local function gg(plr)
  730. pcall(function()
  731. if plr.Name ~= lplr.Name and plr.Character and plr.Character.Humanoid and plr.Character.Humanoid.Health > 0 and plr.Character.Head then
  732. local raycasted = false
  733. local cf1 = CFrame.new(cam.CFrame.p, plr.Character.Head.CFrame.p) * CFrame.new(0, 0, -4)
  734. local r1 = Ray.new(cf1.p, cf1.LookVector * 9000)
  735. local obj, pos = game.Workspace:FindPartOnRayWithIgnoreList(r1, {lplr.Character.Head})
  736. local dist = (plr.Character.Head.CFrame.p- pos).magnitude
  737. if dist < 4 then
  738. raycasted = true
  739. end
  740. if raycasted == true then
  741. local an1 = getfovxyz(cam.CFrame, plr.Character.Head.CFrame)
  742. local an = abs(an1.X) + abs(an1.Y)
  743. if an < minangle then
  744. minangle = an
  745. lastpart = plr.Character.Head
  746. end
  747. end
  748. end
  749. end)
  750. end
  751. if TeamBased then
  752. if plr.Team.Name ~= lplr.Team.Name then
  753. gg(plr)
  754. end
  755. else
  756. gg(plr)
  757. end
  758. --print(math.deg(minangle))
  759. if lastpart then
  760. aimatpart = lastpart
  761. aimatpart.Parent.Humanoid.Died:Connect(function()
  762. if aimatpart == lastpart then
  763. aimatpart = nil
  764. end
  765. end)
  766.  
  767. end
  768. end
  769. end
  770. end
  771. end)
  772. end)
  773. local oldheadpos
  774. local lastaimapart
  775. game:GetService("RunService").RenderStepped:Connect(function(dt)
  776. if uis:IsKeyDown(Enum.KeyCode.RightBracket) or uis:IsKeyDown(Enum.KeyCode.LeftBracket) then
  777. if upping then
  778. ballisticsboost = ballisticsboost + dt/1.9
  779. elseif downing then
  780. ballisticsboost = ballisticsboost - dt/1.9
  781. end
  782. end
  783. if movementcounting then
  784. st1_2.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  785. st1_2.Text = "Current ballistics: "..tostring(math.floor(ballisticsboost*10)/10)
  786. else
  787. st1_2.TextColor3 = Color3.new(1,0,0)
  788. end
  789. espstatustext.Text = "Esp loop :"..tostring(autoesp)
  790. if aimatpart and lplr.Character and lplr.Character.Head then
  791. if BetterDeathCount and lastaimapart and lastaimapart == aimatpart then
  792. local dist = (oldheadpos - aimatpart.CFrame.p).magnitude
  793. if dist > 40 then
  794. aimatpart = nil
  795. end
  796. end
  797. lastaimapart = aimatpart
  798. oldheadpos = lastaimapart.CFrame.p
  799. do
  800. if aimatpart.Parent == plrs.LocalPlayer.Character then
  801. aimatpart = nil
  802. end
  803. aimat(aimatpart)
  804. pcall(function()
  805. if Aim_Assist == true then
  806. local cf1 = CFrame.new(cam.CFrame.p, aimatpart.CFrame.p) * CFrame.new(0, 0, -4)
  807. local r1 = Ray.new(cf1.p, cf1.LookVector * 1000)
  808. local obj, pos = game.Workspace:FindPartOnRayWithIgnoreList(r1, {lplr.Character.Head})
  809. local dist = (aimatpart.CFrame.p- pos).magnitude
  810. if obj then
  811. --print(obj:GetFullName())
  812. end
  813. if not obj or dist > 6 then
  814. aimatpart = nil
  815. --print("ooof")
  816. end
  817. canaimat = false
  818. delay(.5, function()
  819. canaimat = true
  820. end)
  821. end
  822. end)
  823. end
  824.  
  825.  
  826.  
  827. end
  828. end)
  829.  
  830.  
  831. delay(0, function()
  832. while wait(espupdatetime) do
  833. if autoesp == true then
  834. pcall(function()
  835. f.addesp()
  836. end)
  837. end
  838. end
  839. end)
  840. --warn("loaded")
  841. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement