Advertisement
Guest User

a36nwn6wa6nw

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