Advertisement
roxpli

Script Aim and wh for Arsenal,CB:RO,JailBreak

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