Advertisement
Guest User

INSANE OP FPS SCRIPT!

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