Advertisement
Lemonkidlol

Jailbreak

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