Advertisement
Guest User

Untitled

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