Advertisement
Guest User

Counter Blox Aimbot & Esp Hack Script

a guest
May 19th, 2021
8,670
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.68 KB | None | 0 0
  1. --Discord --https://discord.gg/s4cPnxdeGr
  2.  
  3. -- Work on all Exploits
  4.  
  5. -- STRG A Line all
  6. -- STRG C KOPIE
  7. -- STRG V Paste
  8.  
  9. -- Press T For Esp
  10. -- Press E For Aimbot
  11.  
  12. -- Have Fun
  13.  
  14. local plrs = game:GetService("Players")
  15. local TeamBased = true ; local teambasedswitch = "o"
  16. local presskeytoaim = true; local aimkey = "e"
  17. local raycast = false
  18.  
  19. local espupdatetime = 5; autoesp = false
  20.  
  21.  
  22.  
  23. local lockaim = true; local lockangle = 5
  24.  
  25.  
  26.  
  27. --function findwat(folder, what)
  28. -- for i, smth in pairs(folder:GetChildren()) do
  29. -- if string.find(string.lower(tostring(smth)), string.lower(what)) then
  30. -- return smth
  31. -- end
  32. -- end
  33. --end
  34. --
  35. --local plrs = findwat(game, "Players")
  36.  
  37.  
  38.  
  39.  
  40. local Gui = Instance.new("ScreenGui")
  41. local Move = Instance.new("Frame")
  42. local Main = Instance.new("Frame")
  43. local EspStatus = Instance.new("TextLabel")
  44. local st1 = Instance.new("TextLabel")
  45. local st1_2 = Instance.new("TextLabel")
  46. local st1_3 = Instance.new("TextLabel")
  47. local Name = Instance.new("TextLabel")
  48. --Properties:
  49. Gui.Name = "Gui"
  50. Gui.Parent = plrs.LocalPlayer:WaitForChild("PlayerGui")
  51.  
  52. Move.Name = "Move"
  53. Move.Parent = Gui
  54. Move.BackgroundColor3 = Color3.new(0.0431373, 1, 0.0745098)
  55. Move.BackgroundTransparency = 0.40000000596046
  56. Move.BorderSizePixel = 0
  57. Move.Position = UDim2.new(0.005, 0,0.018, 0)
  58. Move.Size = UDim2.new(0.28141585, 0, 0.0320388414, 0)
  59.  
  60. Main.Name = "Main"
  61. Main.Parent = Move
  62. Main.BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471)
  63. Main.BackgroundTransparency = 0.69999998807907
  64. Main.Position = UDim2.new(0, 0, 0.995670795, 0)
  65. Main.Size = UDim2.new(1.0000006, 0, 9.79697132, 0)
  66.  
  67. EspStatus.Name = "EspStatus"
  68. EspStatus.Parent = Main
  69. EspStatus.BackgroundColor3 = Color3.new(1, 1, 1)
  70. EspStatus.BackgroundTransparency = 1
  71. EspStatus.Size = UDim2.new(0.272955924, 0, 0.161862016, 0)
  72. EspStatus.Font = Enum.Font.ArialBold
  73. EspStatus.Text = "Press T to update Esp"
  74. EspStatus.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  75. EspStatus.TextScaled = true
  76. EspStatus.TextSize = 14
  77. EspStatus.TextWrapped = true
  78.  
  79. st1.Name = "st1"
  80. st1.Parent = Main
  81. st1.BackgroundColor3 = Color3.new(1, 1, 1)
  82. st1.BackgroundTransparency = 1
  83. st1.Position = UDim2.new(0.271787882, 0, 0, 0)
  84. st1.Size = UDim2.new(0.728211343, 0, 0.161862016, 0)
  85. st1.Font = Enum.Font.ArialBold
  86. st1.Text = "Press "..aimkey.." to lock on a person inside ur view"
  87. st1.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  88. st1.TextScaled = true
  89. st1.TextSize = 14
  90. st1.TextWrapped = true
  91.  
  92. st1_2.Name = "st1"
  93. st1_2.Parent = Main
  94. st1_2.BackgroundColor3 = Color3.new(1, 1, 1)
  95. st1_2.BackgroundTransparency = 1
  96. st1_2.Position = UDim2.new(0, 0, 0.375590861, 0)
  97. st1_2.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
  98. st1_2.Font = Enum.Font.ArialBold
  99. st1_2.Text = "Press L to enable esp loop"
  100. st1_2.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  101. st1_2.TextScaled = true
  102. st1_2.TextSize = 14
  103. st1_2.TextWrapped = true
  104.  
  105. st1_3.Name = "st1"
  106. st1_3.Parent = Main
  107. st1_3.BackgroundColor3 = Color3.new(1, 1, 1)
  108. st1_3.BackgroundTransparency = 1
  109. st1_3.Position = UDim2.new(0, 0, 0.18558608, 0)
  110. st1_3.Size = UDim2.new(0.999999881, 0, 0.161862016, 0)
  111. st1_3.Font = Enum.Font.ArialBold
  112. st1_3.Text = "Press O to change team based mode"
  113. st1_3.TextColor3 = Color3.new(0.0431373, 1, 0.0745098)
  114. st1_3.TextScaled = true
  115. st1_3.TextSize = 14
  116. st1_3.TextWrapped = true
  117. local teambasedstatus = st1_3:Clone()
  118. teambasedstatus.Parent = st1_3
  119. teambasedstatus.TextScaled = true
  120. teambasedstatus.Position = UDim2.new(0, 0,0.694, 0)
  121. teambasedstatus.Text = tostring(TeamBased)
  122.  
  123. Name.Name = "Name"
  124. Name.Parent = Move
  125. Name.BackgroundColor3 = Color3.new(1, 1, 1)
  126. Name.BackgroundTransparency = 1
  127. Name.Size = UDim2.new(0.838, 0, 0.980000019, 0)
  128. Name.Font = Enum.Font.Arial
  129. Name.Text = "FPS gui v1.0"
  130. Name.TextColor3 = Color3.new(0, 0, 0)
  131. Name.TextScaled = true
  132. Name.TextSize = 14
  133. Name.TextWrapped = true
  134. Name.TextXAlignment = Enum.TextXAlignment.Left
  135. -- Scripts:
  136.  
  137.  
  138. local plrsforaim = {}
  139.  
  140. local lplr = game:GetService("Players").LocalPlayer
  141. Move.Draggable = true
  142. Gui.ResetOnSpawn = false
  143. Gui.Name = "Chat"
  144. Gui.DisplayOrder = 999
  145.  
  146. Gui.Parent = plrs.LocalPlayer.PlayerGui
  147.  
  148.  
  149. f = {}
  150. local espforlder
  151.  
  152. f.addesp = function()
  153. --print("ESP ran")
  154. if espforlder then
  155. else
  156. espforlder = Instance.new("Folder")
  157. espforlder.Parent = game.Workspace.CurrentCamera
  158. end
  159. for i, v in pairs(espforlder:GetChildren()) do
  160. v:Destroy()
  161. end
  162. for _, plr in pairs(plrs:GetChildren()) do
  163. if plr.Character and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name then
  164. if TeamBased == true then
  165. if plr.Team.Name ~= plrs.LocalPlayer.Team.Name then
  166. local e = espforlder:FindFirstChild(plr.Name)
  167. if not e then
  168. --print("Added esp for team based")
  169. local bill = Instance.new("BillboardGui", espforlder)
  170. bill.Name = plr.Name
  171. bill.AlwaysOnTop = true
  172. bill.Size = UDim2.new(1,0,1,0)
  173. bill.Adornee = plr.Character.Head
  174. local Frame = Instance.new('Frame',bill)
  175. Frame.Active = true
  176. Frame.BackgroundColor3 = Color3.new(0/255,255/255,0/255)
  177. Frame.BackgroundTransparency = 0
  178. Frame.BorderSizePixel = 0
  179. Frame.AnchorPoint = Vector2.new(.5, .5)
  180. Frame.Position = UDim2.new (0.5,0,0.5,0)
  181. Frame.Size = UDim2.new (1,0,1,0)
  182. Frame.Rotation = 0
  183. plr.Character.Humanoid.Died:Connect(function()
  184. bill:Destroy()
  185. end)
  186. end
  187. end
  188. else
  189. local e = espforlder:FindFirstChild(plr.Name)
  190. if not e then
  191. --print("Added esp")
  192. local bill = Instance.new("BillboardGui", espforlder)
  193. bill.Name = plr.Name
  194. bill.AlwaysOnTop = true
  195. bill.Size = UDim2.new(1,0,1,0)
  196. bill.Adornee = plr.Character.Head
  197. local Frame = Instance.new('Frame',bill)
  198. Frame.Active = true
  199. Frame.BackgroundColor3 = Color3.new(0/255,255/255,0/255)
  200. Frame.BackgroundTransparency = 0
  201. Frame.BorderSizePixel = 0
  202. Frame.AnchorPoint = Vector2.new(.5, .5)
  203. Frame.Position = UDim2.new (0.5,0,0.5,0)
  204. Frame.Size = UDim2.new (1,0,1,0)
  205. Frame.Rotation = 0
  206. plr.Character.Humanoid.Died:Connect(function()
  207. bill:Destroy()
  208. end)
  209. end
  210. end
  211.  
  212.  
  213. end
  214. end
  215. end
  216. local cam = game.Workspace.CurrentCamera
  217.  
  218. local mouse = lplr:GetMouse()
  219. local switch = false
  220. local key = "k"
  221. local aimatpart = nil
  222. mouse.KeyDown:Connect(function(a)
  223. if a == "t" then
  224. print("worked1")
  225. f.addesp()
  226. elseif a == "u" then
  227. if raycast == true then
  228. raycast = false
  229. else
  230. raycast = true
  231. end
  232. elseif a == "l" then
  233. if autoesp == false then
  234. autoesp = true
  235. else
  236. autoesp = false
  237. end
  238. end
  239. if a == "j" then
  240. if mouse.Target then
  241. mouse.Target:Destroy()
  242. end
  243. end
  244. if a == key then
  245. if switch == false then
  246. switch = true
  247. else
  248. switch = false
  249. if aimatpart ~= nil then
  250. aimatpart = nil
  251. end
  252. end
  253. elseif a == teambasedswitch then
  254. if TeamBased == true then
  255. TeamBased = false
  256. teambasedstatus.Text = tostring(TeamBased)
  257. else
  258. TeamBased = true
  259. teambasedstatus.Text = tostring(TeamBased)
  260. end
  261. elseif a == aimkey then
  262. if not aimatpart then
  263. local maxangle = math.rad(20)
  264. for i, plr in pairs(plrs:GetChildren()) do
  265. if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
  266. if TeamBased == true then
  267. if plr.Team.Name ~= lplr.Team.Name then
  268. local an = checkfov(plr.Character.Head)
  269. if an < maxangle then
  270. maxangle = an
  271. aimatpart = plr.Character.Head
  272. end
  273. end
  274. else
  275. local an = checkfov(plr.Character.Head)
  276. if an < maxangle then
  277. maxangle = an
  278. aimatpart = plr.Character.Head
  279. end
  280. print(plr)
  281. end
  282. plr.Character.Humanoid.Died:Connect(function()
  283. if aimatpart.Parent == plr.Character or aimatpart == nil then
  284. aimatpart = nil
  285. end
  286. end)
  287. end
  288. end
  289. else
  290. aimatpart = nil
  291. end
  292. end
  293. end)
  294.  
  295. function getfovxyz (p0, p1, deg)
  296. local x1, y1, z1 = p0:ToOrientation()
  297. local cf = CFrame.new(p0.p, p1.p)
  298. local x2, y2, z2 = cf:ToOrientation()
  299. --local d = math.deg
  300. if deg then
  301. --return Vector3.new(d(x1-x2), d(y1-y2), d(z1-z2))
  302. else
  303. return Vector3.new((x1-x2), (y1-y2), (z1-z2))
  304. end
  305. end
  306.  
  307. function getaimbotplrs()
  308. plrsforaim = {}
  309. for i, plr in pairs(plrs:GetChildren()) do
  310. if plr.Character and plr.Character.Humanoid and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name and plr.Character.Head then
  311.  
  312. if TeamBased == true then
  313. if plr.Team.Name ~= lplr.Team.Name then
  314. local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
  315. local r = Ray.new(cf, cf.LookVector * 10000)
  316. local ign = {}
  317. for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
  318. if v:IsA("BasePart") then
  319. table.insert(ign , v)
  320. end
  321. end
  322. local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
  323. if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
  324. table.insert(plrsforaim, obj)
  325. end
  326. end
  327. else
  328. local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
  329. local r = Ray.new(cf, cf.LookVector * 10000)
  330. local ign = {}
  331. for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
  332. if v:IsA("BasePart") then
  333. table.insert(ign , v)
  334. end
  335. end
  336. local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
  337. if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
  338. table.insert(plrsforaim, obj)
  339. end
  340. end
  341.  
  342.  
  343. end
  344. end
  345. end
  346.  
  347. function aimat(part)
  348. cam.CFrame = CFrame.new(cam.CFrame.p, part.CFrame.p)
  349. end
  350. function checkfov (part)
  351. local fov = getfovxyz(game.Workspace.CurrentCamera.CFrame, part.CFrame)
  352. local angle = math.abs(fov.X) + math.abs(fov.Y)
  353. return angle
  354. end
  355.  
  356. game:GetService("RunService").RenderStepped:Connect(function()
  357. if aimatpart then
  358. aimat(aimatpart)
  359. if aimatpart.Parent == plrs.LocalPlayer.Character then
  360. aimatpart = nil
  361. end
  362. end
  363.  
  364.  
  365. -- if switch == true then
  366. -- local maxangle = 99999
  367. --
  368. -- --print("Loop")
  369. -- if true and raycast == false then
  370. -- for i, plr in pairs(plrs:GetChildren()) do
  371. -- if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
  372. -- if TeamBased then
  373. -- if plr.Team.Name ~= lplr.Team.Name or plr.Team.TeamColor ~= lplr.Team.TeamColor then
  374. -- local an = checkfov(plr.Character.Head)
  375. -- if an < maxangle then
  376. -- maxangle = an
  377. -- aimatpart = plr.Character.Head
  378. -- if an < lockangle then
  379. -- break
  380. -- end
  381. -- end
  382. -- end
  383. -- else
  384. -- local an = checkfov(plr.Character.Head)
  385. -- if an < maxangle then
  386. -- maxangle = an
  387. -- aimatpart = plr.Character.Head
  388. -- if an < lockangle then
  389. -- break
  390. -- end
  391. -- end
  392. -- end
  393. --
  394. --
  395. --
  396. --
  397. -- end
  398. -- end
  399. -- elseif raycast == true then
  400. --
  401. -- end
  402.  
  403. if raycast == true and switch == false and not aimatpart then
  404. getaimbotplrs()
  405. aimatpart = nil
  406. local maxangle = 999
  407. for i, v in ipairs(plrsforaim) do
  408. if v.Parent ~= lplr.Character then
  409. local an = checkfov(v)
  410. if an < maxangle and v ~= lplr.Character.Head then
  411. maxangle = an
  412. aimatpart = v
  413. print(v:GetFullName())
  414. v.Parent.Humanoid.Died:connect(function()
  415. aimatpart = nil
  416. end)
  417. end
  418. end
  419. end
  420.  
  421. end
  422. end)
  423. delay(0, function()
  424. while wait(espupdatetime) do
  425. if autoesp == true then
  426. pcall(function()
  427. f.addesp()
  428. end)
  429. end
  430. end
  431. end)
  432. warn("loaded")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement