Advertisement
Guest User

AIMBOT|ESP|FLY ARSENAL OP SCRIPT

a guest
Mar 28th, 2020
67,087
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.72 KB | None | 0 0
  1. --Press "H" to toggle aimbot, press "E" to toggle fly, press "Right Alt" to toggle ESP
  2.  
  3. Credit to PresidentIvan--
  4.  
  5. _G.FRIEND_LIST = {"ROBLOX","builderman"} --Add players you want to ignore
  6.  
  7. _G.IGNORE_TEAM = true
  8. _G.START_AIMBOT = Enum.KeyCode.H
  9. _G.MAX_DIST = 5000
  10. _G.TARGET_PART = "Head"
  11.  
  12. _G.START_ESP = Enum.KeyCode.RightAlt
  13. _G.PREFIX = "/e " --If you want a space between the command and pref, you need to type a space! Ex: /ehelp . /e help
  14.  
  15.  
  16.  
  17. local startTime = tick()
  18. local AIMBOT = false
  19. local EspEnabled = false
  20.  
  21. local Players = game:GetService("Players")
  22. local StarterGui = game:GetService("StarterGui")
  23. local CoreGui = game:GetService("CoreGui")
  24. local UIS = game:GetService("UserInputService")
  25. local RunService = game:GetService("RunService")
  26.  
  27. local plr = Players.LocalPlayer
  28. local camera = workspace.CurrentCamera
  29. local mouse = plr:GetMouse()
  30. local newray = Ray.new
  31.  
  32. local function RandomCharacters(length)
  33. local STR = ''
  34.  
  35. for i = 1, length do
  36. STR = STR .. string.char(math.random(65,90))
  37. end
  38.  
  39. return STR
  40. end
  41. local faces = {
  42. "Back",
  43. "Bottom",
  44. "Front",
  45. "Left",
  46. "Right",
  47. "Top"
  48. }
  49. local EspObjects = Instance.new("Folder")
  50. EspObjects.Parent = CoreGui
  51. EspObjects.Name = RandomCharacters(8)
  52.  
  53. local function SendMessage(txt,title,dur,size,color)
  54. print(txt)
  55. StarterGui:SetCore("ChatMakeSystemMessage",{
  56. Text = txt,
  57. Color = color,
  58. FontSize = size
  59. })
  60. StarterGui:SetCore("SendNotification",{
  61. Title = title,
  62. Text = txt,
  63. Duration = dur
  64. })
  65. end
  66. local function ChangeColor(player, color)
  67. if EspObjects:FindFirstChild(player) then
  68. for i,v in pairs(EspObjects:FindFirstChild(player):GetChildren()) do
  69. if v:IsA("SurfaceGui") then
  70. for _,x in pairs(v:GetChildren()) do
  71. if x:IsA("Frame") then
  72. x.BackgroundColor3 = color
  73. end
  74. end
  75. elseif v:IsA("BillboardGui") then
  76. for _,x in pairs(v:GetChildren()) do
  77. if x:IsA("TextLabel") then
  78. x.TextColor = color
  79. end
  80. end
  81. end
  82. end
  83. end
  84. end
  85. local function GetClosestPlayer(returnPlr,ignoreList)
  86. ignoreList = _G.FRIEND_LIST
  87. returnPlr = returnPlr or false
  88.  
  89. local ignoreTeam = _G.IGNORE_TEAM
  90. local maxdist = _G.MAX_DIST
  91. local targetpart = _G.TARGET_PART
  92.  
  93. if ignoreTeam == true then
  94. if #game:GetService("Teams"):GetChildren() <= 1 then
  95. ignoreTeam = false
  96. end
  97. if plr.Neutral == true then
  98. ignoreTeam = false
  99. end
  100. end
  101.  
  102. local temp1 = (maxdist)
  103. local FoundPlr
  104. local FoundPart
  105.  
  106. local Table = game.Players:GetPlayers()
  107. for _,v in pairs(Table) do
  108. local skip = false
  109. for _,i in pairs(ignoreList) do
  110. if i:lower() == v.Name:lower() then
  111. skip = true
  112. end
  113. end
  114. if ignoreTeam == true then
  115. if v.Team == plr.Team then
  116. skip = true
  117. end
  118. end
  119. if v.Character == nil or v.Character:FindFirstChild(targetpart) == nil then
  120. skip = true
  121. end
  122.  
  123. if skip == false then
  124. if (temp1 ~= nil and v.Character:FindFirstChild(targetpart) and plr.Character ~= nil and plr.Character:FindFirstChild(targetpart)) then
  125. if temp1 > (plr.Character.Head.Position - v.Character:FindFirstChild(targetpart).Position).magnitude then
  126. local vChar = v.Character
  127. if vChar:FindFirstChild("Humanoid") then
  128. local vHuman = vChar:FindFirstChild("Humanoid")
  129. if vHuman.Health > 0 then
  130. local dist = (plr.Character.Head.Position - vChar:FindFirstChild(targetpart).Position).magnitude
  131. if dist <= maxdist then
  132. local ray = newray(plr.Character.Head.CFrame.p, (vChar:FindFirstChild(targetpart).CFrame.p - plr.Character.Head.CFrame.p).unit * _G.MAX_DIST)
  133. local hitPart,position = workspace:FindPartOnRay(ray,plr.Character)
  134.  
  135. if hitPart then
  136. if hitPart:IsDescendantOf(vChar) then
  137. temp1 = dist
  138. FoundPlr = v
  139. FoundPart = vChar:FindFirstChild(targetpart)
  140. end
  141. end
  142. end
  143. end
  144. end
  145. end
  146. end
  147. end
  148. end
  149. if returnPlr == false then
  150. return FoundPart
  151. elseif returnPlr == true then
  152. return FoundPlr
  153. end
  154. end
  155. local function CreateEspBox(pObj, color)
  156. if (pObj:IsA("Part") and pObj.Parent:IsA("Model") and pObj.Parent ~= workspace) then
  157. for i,v in pairs(EspObjects:GetChildren()) do
  158. if v.Name == pObj.Parent.Name then
  159. return nil
  160. end
  161. end
  162. local newFlder = Instance.new("Folder")
  163. newFlder.Parent = EspObjects
  164. newFlder.Name = pObj.Parent.Name
  165.  
  166. for i,v in pairs(faces) do
  167. local surfGui = Instance.new("SurfaceGui")
  168. surfGui.AlwaysOnTop = true
  169. surfGui.Adornee = pObj
  170. surfGui.Face = v
  171.  
  172. local frme = Instance.new("Frame")
  173. frme.Size = UDim2.new(1,0,1,0)
  174. frme.BackgroundColor3 = color
  175. frme.BackgroundTransparency = .5
  176. frme.BorderSizePixel = 0
  177. frme.Parent = surfGui
  178.  
  179. surfGui.Parent = newFlder
  180. end
  181. local bbGui = Instance.new("BillboardGui")
  182. bbGui.Adornee = pObj
  183. bbGui.Size = UDim2.new(5.5,0,1.75,0)
  184. bbGui.ExtentsOffset = Vector3.new(0,2.5,0)
  185. bbGui.AlwaysOnTop = true
  186. local txtLab = Instance.new("TextLabel")
  187. txtLab.Text = pObj.Parent.Name
  188. txtLab.TextColor3 = color
  189. txtLab.TextScaled = false
  190. txtLab.TextSize = 17
  191. txtLab.Size = UDim2.new(1,0,1,0)
  192. txtLab.BackgroundTransparency = 1
  193. txtLab.BorderSizePixel = 0
  194. txtLab.Parent = bbGui
  195. bbGui.Parent = newFlder
  196.  
  197. local objPar = Instance.new("ObjectValue")
  198. objPar.Value = pObj
  199. objPar.Parent = newFlder
  200. objPar.Name = "pObj"
  201.  
  202. return newFlder
  203. end
  204. return nil
  205. end
  206. local function ClearEsp()
  207. EspObjects:ClearAllChildren()
  208. end
  209. local function ConnectEsp(player)
  210. local func1
  211. local func2
  212. if player.Character ~= nil and player.Character:FindFirstChild("Head") then
  213. if plr.Team == nil or player.Team == nil or plr.Neutral == true or player.Neutral == true then
  214. local fldr = CreateEspBox(player.Character:FindFirstChild("Head"), Color3.fromRGB(255,0,0))
  215. if fldr ~= nil then
  216. local func3
  217. func3 = fldr.pObj.Changed:Connect(function()
  218. if fldr.pObj.Value == nil then
  219. if EspObjects:FindFirstChild(player.Name) then
  220. EspObjects:FindFirstChild(player.Name):Destroy()
  221. end
  222. func3:Disconnect()
  223. end
  224. end)
  225. end
  226. elseif plr.Team == player.Team then
  227. CreateEspBox(player.Character:FindFirstChild("Head"), Color3.fromRGB(0,255,0))
  228. elseif plr.Team ~= player.Team then
  229. CreateEspBox(player.Character:FindFirstChild("Head"), Color3.fromRGB(255,0,0))
  230. end
  231. end
  232. func1 = player.CharacterAdded:Connect(function(char)
  233. wait(1)
  234. if player.Character ~= nil then
  235. func2 = player.Character:WaitForChild("Humanoid").Died:Connect(function()
  236. if EspObjects:FindFirstChild(player.Name) then
  237. EspObjects:FindFirstChild(player.Name):Destroy()
  238. end
  239. end)
  240. end
  241. if EspEnabled == true then
  242. if plr.Team == nil or player.Team == nil or plr.Neutral == true or player.Neutral == true then
  243. CreateEspBox(char:FindFirstChild("Head"), Color3.fromRGB(255,0,0))
  244. elseif plr.Team == player.Team then
  245. CreateEspBox(char:FindFirstChild("Head"), Color3.fromRGB(0,255,0))
  246. elseif plr.Team ~= player.Team then
  247. CreateEspBox(char:FindFirstChild("Head"), Color3.fromRGB(255,0,0))
  248. end
  249. else
  250. if EspObjects:FindFirstChild(player.Name) then
  251. EspObjects:FindFirstChild(player.Name):Destroy()
  252. end
  253. func2:Disconnect()
  254. func1:Disconnect()
  255. end
  256. end)
  257. if player.Character ~= nil then
  258. func2 = player.Character:WaitForChild("Humanoid").Died:Connect(function()
  259. if EspObjects:FindFirstChild(player.Name) then
  260. EspObjects:FindFirstChild(player.Name):Destroy()
  261. end
  262. end)
  263. end
  264. return
  265. end
  266. local function EnableEsp()
  267. if EspEnabled == true then
  268. for i,v in pairs(Players:GetPlayers()) do
  269. if v ~= plr then
  270. ConnectEsp(v)
  271. end
  272. end
  273. end
  274. end
  275. Players.PlayerAdded:Connect(function(player)
  276. if EspEnabled == true then
  277. ConnectEsp(player)
  278. end
  279. end)
  280. Players.PlayerRemoving:Connect(function(player)
  281. if EspObjects:FindFirstChild(player.Name) then
  282. EspObjects:FindFirstChild(player.Name):Destroy()
  283. end
  284. end)
  285. UIS.InputBegan:Connect(function(KEY, gpe)
  286. if gpe then return end;
  287. if KEY.KeyCode == _G.START_AIMBOT then
  288. if AIMBOT == false then
  289. AIMBOT = true
  290. SendMessage("Aimbot enabled.",
  291. "AimHot has been enabled.",
  292. 3,
  293. Enum.FontSize.Size28,
  294. Color3.fromRGB(200,50,50)
  295. )
  296. elseif AIMBOT == true then
  297. AIMBOT = false
  298. SendMessage("Aimbot disabled.",
  299. "AimHot has been disabled.",
  300. 3,
  301. Enum.FontSize.Size28,
  302. Color3.fromRGB(200,50,50)
  303. )
  304. end
  305. end
  306. if KEY.KeyCode == _G.START_ESP then
  307. if EspEnabled == false then
  308. SendMessage("ESP has been enabled.",
  309. "ESP enabled;",
  310. 3,
  311. Enum.FontSize.Size28,
  312. Color3.fromRGB(200,50,50)
  313. )
  314. EspEnabled = true
  315. EnableEsp()
  316. while EspEnabled == true do
  317. ClearEsp()
  318. EnableEsp()
  319. wait(1)
  320. end
  321. elseif EspEnabled == true then
  322. SendMessage("ESP has been disabled.",
  323. "ESP disabled;",
  324. 3,
  325. Enum.FontSize.Size28,
  326. Color3.fromRGB(200,50,50)
  327. )
  328. EspEnabled = false
  329. ClearEsp()
  330. end
  331. end
  332. end)
  333.  
  334. RunService.RenderStepped:Connect(function()
  335. if (AIMBOT == true and plr.Character ~= nil and plr.Character:FindFirstChild("Humanoid") and plr.Character.Humanoid.Health > 0) then
  336. local closestPart = GetClosestPlayer(false,{})
  337. if closestPart ~= nil then
  338. camera.CoordinateFrame = CFrame.new(camera.CoordinateFrame.p, closestPart.CFrame.p)
  339. if _G.AUTO_TRIGGER == true then
  340. mouse1click()
  341. end
  342. end
  343. end
  344. end)
  345. _G.AIMHOT_SECRETKEY = "dF10qLMn" --Not kind of secret but..
  346.  
  347. local helptxt = (
  348. "AimHot loaded. Time taken: ".. tick()-startTime .."\n"..
  349. "AimHot made by Herrtt#3868." .."\n"..
  350. " Command prefix are: "..(_G.PREFIX) .."\n"..
  351. " Commands are;" .."\n"..
  352. " <prefix>maxdist <number> (counted in studs)" .."\n"..
  353. " <prefix>ignoreteam <bool> (true/false)" .."\n"..
  354. " <prefix>targetpart <string> (Head, Torso etc.)" .."\n"..
  355. " <prefix>addfriend <plrname> (ROBLOX, etc.)" .."\n"..
  356. " <prefix>removefriend <plrname> (ROBLOX, etc.)" .."\n"..
  357. " <prefix>changepref <newprefix>" .."\n"..
  358. " <prefix>friends" .."\n"..
  359. " <prefix>help" .."\n"..
  360. " /e reset (will set all settings to regular.)" .."\n"..
  361. " Have fun!"
  362. )
  363.  
  364. plr.Chatted:Connect(function(msg)
  365. local pref = _G.PREFIX
  366. if type(pref) ~= "string" then
  367. print("Prefix must be a string!")
  368. end
  369.  
  370. if string.sub(msg,1,8+pref:len()) == pref.."maxdist " then
  371. local maxdist = tonumber(string.sub(msg,9,msg:len()))
  372. if type(maxdist) == "number" then
  373. _G.MAX_DIST = maxdist
  374. SendMessage("Changed maxdist to; "..(tostring(maxdist)),
  375. "Setting Changed;",
  376. 3,
  377. Enum.FontSize.Size28,
  378. Color3.fromRGB(200,50,50)
  379. )
  380. end
  381. end
  382. if string.sub(msg,1,11+pref:len()) == pref.."ignoreteam " then
  383. local setting = string.sub(msg,12,msg:len()):lower()
  384. print(setting)
  385. if setting == "true" or "false" then
  386. _G.IGNORE_TEAM = setting
  387.  
  388. SendMessage("Changed ignoreteam to; "..(tostring(setting)),
  389. "Setting Changed;",
  390. 3,
  391. Enum.FontSize.Size28,
  392. Color3.fromRGB(200,50,50)
  393. )
  394. end
  395. end
  396. if string.sub(msg,1,11+pref:len()) == pref.."targetpart " then
  397. local setting = string.sub(msg,12,msg:len())
  398. if type(setting) == "string" then
  399. _G.TARGET_PART = setting
  400.  
  401. SendMessage("Changed targetpart to; "..(tostring(setting)),
  402. "Setting Changed;",
  403. 3,
  404. Enum.FontSize.Size28,
  405. Color3.fromRGB(200,50,50)
  406. )
  407. end
  408. end
  409. if string.sub(msg,1,13+pref:len()) == pref.."removefriend " then
  410. local setting = string.sub(msg,14,msg:len())
  411. if type(setting) == "string" then
  412. for i,v in pairs(_G.FRIEND_LIST) do
  413. if v:lower() == setting:lower() then
  414. table.remove(_G.FRIEND_LIST,i)
  415. end
  416. end
  417. SendMessage("Removed player from friend list; "..(tostring(setting)),
  418. "Friend removed;",
  419. 3,
  420. Enum.FontSize.Size28,
  421. Color3.fromRGB(200,50,50)
  422. )
  423. end
  424. end
  425. if string.sub(msg,1,10+pref:len()) == pref.."addfriend " then
  426. local setting = string.sub(msg,11,msg:len())
  427. if type(setting) == "string" then
  428. for i,v in pairs(_G.FRIEND_LIST) do
  429. if v == setting:lower() then
  430. return
  431. end
  432. end
  433. table.insert(_G.FRIEND_LIST,setting:lower())
  434. SendMessage("Added player to friend list; "..(tostring(setting)),
  435. "Friend added;",
  436. 3,
  437. Enum.FontSize.Size28,
  438. Color3.fromRGB(200,50,50)
  439. )
  440. end
  441. end
  442. if string.sub(msg,1,7+pref:len()) == pref.."friends" then
  443. local friends = ""
  444. for i,v in pairs(_G.FRIEND_LIST) do
  445. if i == 1 then
  446. friends = v
  447. else
  448. friends = friends..", "..v
  449. end
  450. end
  451. SendMessage("Your friends are; " .."\n".. friends,
  452. "Your friends;",
  453. 3,
  454. Enum.FontSize.Size28,
  455. Color3.fromRGB(200,50,50)
  456. )
  457. end
  458. if string.sub(msg,1,11+pref:len()) == pref.."changepref " then
  459. local setting = string.sub(msg,12+pref:len(),msg:len())
  460. if type(setting) == "string" then
  461. _G.PREFIX = setting
  462. SendMessage("Changed prefix to; "..setting,
  463. "Setting changed;",
  464. 3,
  465. Enum.FontSize.Size28,
  466. Color3.fromRGB(200,50,50)
  467. )
  468. end
  469. end
  470. if string.sub(msg,1,4+pref:len()) == pref.."help" then
  471. SendMessage(helptxt,
  472. "AimHot by Herrtt#3868;",
  473. 3,
  474. Enum.FontSize.Size28,
  475. Color3.fromRGB(200,50,50)
  476. )
  477. end
  478. if msg == "/e reset" then
  479. _G.FRIEND_LIST = {"ROBLOX","builderman"}
  480.  
  481. _G.IGNORE_TEAM = true
  482. _G.START_AIMBOT = Enum.KeyCode.H
  483. _G.MAX_DIST = 5000
  484. _G.TARGET_PART = "Head"
  485. _G.PREFIX = "/e "
  486.  
  487. SendMessage("All settings are set back to regular.",
  488. "Settings reseted.",
  489. Enum.FontSize.Size28,
  490. Color3.fromRGB(200,50,50)
  491. )
  492. end
  493. end)
  494.  
  495. SendMessage(helptxt,
  496. "AimHot by Herrtt#3868;",
  497. 3,
  498. Enum.FontSize.Size28,
  499. Color3.fromRGB(200,50,50)
  500. )
  501. _G.AIMHOT_VERSION = "4.0"
  502.  
  503. --[[
  504. Made by PresidentIvan!
  505. --]]
  506.  
  507. loadstring(game:HttpGet("https://pastebin.com/raw/7rXZ9VNc", true))()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement