Advertisement
NovaKun

FPS Gui (ROBLOX)

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