Advertisement
spidey_v6

Untitled

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