Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.82 KB | None | 0 0
  1.  
  2. local f_print, printing = print, true
  3. local function print ( ... )
  4. if printing then
  5. f_print("[Lilith] - ", ...)
  6. end
  7. end
  8. print "Version 1.4b, official release;"
  9. print "Aimbot will not work in every game, such as Phantom Forces."
  10.  
  11. -- configuration:
  12. local settings = {
  13. -- hotkeys:
  14. commandbar_Hotkey = "Minus",
  15. esp_Hotkey = "RightAlt",
  16. aimbot_Hotkey = "RightControl";
  17.  
  18. -- defaults:
  19. esp_boxColor = "Bright red",
  20. esp_boxTransparent = true,
  21. esp_useTeamColorIfApplicable = true,
  22. esp_showDistance = true,
  23. esp_holdHotkey = false,
  24. esp_showCharacterEspd = true,
  25. aimbot_clickToLock = true,
  26. aimbot_clickToLockDistanceOverride = true,
  27. aimbot_maxDistance = 250,
  28. aimbot_aimFor = "Head";
  29.  
  30. -- ignores:
  31. esp_ignoreTeam = true,
  32. esp_dont_ignoreSelf = false,
  33. aimbot_ignoreWalls = false,
  34. aimbot_ignoreTeam = false;
  35. }
  36.  
  37. -- mainscript:
  38. local Players = game:GetService("Players")
  39. local Teams = game:GetService("Teams")
  40. local RunService = game:GetService("RunService")
  41. local UserInputService = game:GetService("UserInputService")
  42.  
  43. local localPlayer = Players.LocalPlayer
  44. local Mouse = localPlayer:GetMouse()
  45. local CoreGui = game:GetService("CoreGui")
  46.  
  47. local function findFirstChild (obj, name, sensitive)
  48. local children = obj:GetChildren()
  49. for i = 1, #children do
  50. local objN = children[i].Name
  51. if not sensitive then
  52. objN, name = objN:lower(), name:lower()
  53. end
  54. if objN:sub(1, name:len()) == name then
  55. return children[i]
  56. end
  57. end
  58. end
  59. local function setHotkey (section, keyName)
  60. if Enum.KeyCode[keyName] then
  61. settings[section .. '_Hotkey'] = Enum.KeyCode[keyName]
  62. print ("Sucessfully set " .. section .. "'s hotkey to " .. keyName)
  63. end
  64. end setHotkey("esp", settings.esp_Hotkey); setHotkey("aimbot", settings.aimbot_Hotkey); setHotkey("commandbar", settings.commandbar_Hotkey)
  65. local function splitString (str, delimeter)
  66. local strParts = {}
  67. local pattern = ("([^%s]+)"):format(delimeter)
  68.  
  69. str:gsub(pattern, function(section)
  70. strParts[#strParts + 1] = section
  71. end)
  72. return strParts
  73. end
  74. local function isHumanoidAlive (character)
  75. if character then
  76. local humanoid = character:FindFirstChildOfClass("Humanoid")
  77. if humanoid and humanoid.Health > 0 then
  78. return character, humanoid
  79. end
  80. end
  81. end
  82. local function getCharacterFromPart (obj) -- made this in haste, so its unorganized!
  83. while (obj ~= game and obj ~= workspace) and (obj.Parent and not Players:GetPlayerFromCharacter(obj.Parent)) do
  84. obj = obj.Parent
  85. end
  86. return obj
  87. end
  88. local function viewNotObstructed (lookingAt, parent)
  89. local character, _ = isHumanoidAlive(localPlayer.Character)
  90. if character then
  91. local headPos = character.Head.CFrame.p
  92. local viewRay = Ray.new(headPos, (lookingAt.CFrame.p - headPos).unit *
  93. settings.aimbot_maxDistance)
  94. local object = workspace:FindPartOnRay(viewRay, character, true, true)
  95. if object then
  96. return object:IsDescendantOf(parent)
  97. end
  98. end
  99. end
  100. local function setColor (color)
  101. return select(2, pcall(function()
  102. if typeof(color) == "BrickColor" then
  103. color = color.Color
  104. elseif typeof(color) == "string" then
  105. color = BrickColor.new(color).Color
  106. end
  107. return color
  108. end))
  109. end
  110.  
  111. -- @create objects
  112. local ESPOBJF do
  113. ESPOBJF = findFirstChild(CoreGui, "ESPOBJF")
  114. if not ESPOBJF then
  115. ESPOBJF = Instance.new("Folder", CoreGui)
  116. ESPOBJF.Name = "ESPOBJF"
  117. end
  118. end
  119. local Box, espText, aimbotText
  120. local commandBar do
  121. commandBar = Instance.new("ScreenGui")
  122. commandBar.Name = "%$#@$!&"
  123.  
  124. local frame = Instance.new("Frame", commandBar)
  125. frame.BackgroundTransparency = 1; frame.Size, frame.Position = UDim2.new(0.221, 0,0.111, 0), UDim2.new(0.407, 0,0.644, 0); frame.Draggable = true; frame.Active = true
  126.  
  127. local textlabel = Instance.new("TextLabel", frame)
  128. textlabel.BackgroundTransparency = 1; textlabel.TextSize = 16; textlabel.TextColor3 = Color3.fromRGB(255, 255, 255); textlabel.Font = Enum.Font.SourceSansLight; textlabel.Position, textlabel.Size = UDim2.new(0.132, 0,0.1, 0), UDim2.new(0.75, 0, 0.201, 0); textlabel.ZIndex = 1; textlabel.Text = "[Lilith]"
  129.  
  130. Box = Instance.new("TextBox", frame)
  131. Box.BackgroundColor3 = Color3.fromRGB(58, 58, 58); Box.BackgroundTransparency = 0.5; Box.BorderSizePixel = 0; Box.TextSize = 16; Box.TextColor3 = Color3.fromRGB(255, 255, 255); Box.Font = Enum.Font.SourceSansItalic; Box.ClipsDescendants = true; Box.ZIndex = 1; Box.Text = "press to `-` to type"; Box.Size, Box.Position = UDim2.new(0.922, 0,0.402, 0), UDim2.new(0.026, 0,0.402, 0) ; Box.TextTransparency = 0.5
  132.  
  133. aimbotText = textlabel:Clone()
  134. aimbotText.Size, aimbotText.Position =UDim2.new(0.079, 0,0.201, 0), UDim2.new(0.74, 0,0.1, 0); aimbotText.TextColor3, aimbotText.Font = Color3.fromRGB(48, 48, 48), Enum.Font.SourceSansBold; aimbotText.Text = "bot"; aimbotText.Parent = frame
  135.  
  136. espText = textlabel:Clone()
  137. espText.Size, espText.Position =UDim2.new(0.079, 0,0.201, 0), UDim2.new(0.184, 0,0.1, 0); espText.TextColor3, espText.Font = Color3.fromRGB(48, 48, 48), Enum.Font.SourceSansBold; espText.Text = "esp"; espText.Parent = frame
  138. end
  139. local active_espObjects = {}
  140. local function clear_active_espObjects (ofParent)
  141. if not ofParent then
  142. ESPOBJF:ClearAllChildren()
  143. local a = 1
  144. while active_espObjects[a] do
  145. if active_espObjects[a] then
  146. active_espObjects[a]:Destroy()
  147. end
  148. active_espObjects[a] = nil
  149. a = a + 1
  150. end
  151. else
  152. local j = 1
  153. while active_espObjects[j] do
  154. local espObj = active_espObjects[j]
  155. if espObj and espObj:IsDescendantOf(ofParent) or ((espObj:IsA("BoxHandleAdornment") or espObj:IsA("BillboardGui")) and espObj.Adornee and espObj.Adornee:IsDescendantOf(ofParent)) then
  156. espObj:Destroy()
  157. espObj = nil
  158. end
  159. j = j + 1
  160. end
  161. end
  162. end
  163. local function createEspBoxOnObj (obj, color)
  164. local espBox do
  165. espBox = Instance.new("BoxHandleAdornment")
  166. espBox.AlwaysOnTop = true
  167. espBox.ZIndex = 10
  168. espBox.Color3 = BrickColor.new(settings.esp_boxColor).Color
  169. end
  170.  
  171. local color = setColor(color)
  172. if color then
  173. espBox.Color3 = color
  174. end
  175.  
  176. if settings.esp_boxTransparent then
  177. espBox.Transparency = 0.8
  178. end
  179.  
  180. espBox.Size = obj.Size
  181. espBox.Adornee = obj
  182. espBox.Parent = ESPOBJF
  183. active_espObjects[#active_espObjects + 1] = espBox
  184.  
  185. return espBox
  186. end
  187. local function getDistanceFrom (object)
  188. if localPlayer.Character and localPlayer.Character.Head then
  189. return math.floor((object.Position - localPlayer.Character.Head.Position).magnitude)
  190. else
  191. return "err"
  192. end
  193. end
  194. local function createDistTagOnCharacter (character, removeTag, color)
  195. local _, humanoid = isHumanoidAlive(character)
  196. if humanoid then
  197. humanoid.Died:Connect(function()
  198. clear_active_espObjects(character)
  199. end)
  200. local head = character:FindFirstChild("Head")
  201. if head then
  202. if ESPOBJF:findFirstChild(character.Name) then
  203. ESPOBJF[character.Name]:Destroy()
  204. if removeTag then
  205. return
  206. end
  207. end
  208.  
  209. local textLabel
  210. local distTag do
  211. distTag = Instance.new("BillboardGui")
  212. distTag.AlwaysOnTop = true
  213. distTag.Enabled = true
  214. distTag.Size = UDim2.new(0, 10,0, 50)
  215.  
  216. textLabel = Instance.new("TextLabel", distTag)
  217. textLabel.Size = UDim2.new(0, 75,0, 25)
  218. textLabel.BackgroundColor3 = (color ~= nil and color) or Color3.fromRGB(48, 48, 48)
  219. textLabel.BackgroundTransparency = 0.5
  220. textLabel.Font = Enum.Font.SourceSansBold
  221. textLabel.TextSize = 18
  222. textLabel.TextColor3 = Color3.fromRGB(255, 255 ,255)
  223. textLabel.ClipsDescendants = true
  224. textLabel.BorderSizePixel = 0
  225. end
  226. distTag.Adornee = head
  227. distTag.Parent = ESPOBJF
  228. distTag.Name = character.Name
  229. textLabel.Text = character.Name
  230. active_espObjects[#active_espObjects + 1] = distTag
  231.  
  232. coroutine.resume(coroutine.create(function()
  233. local now = tick()
  234. while isHumanoidAlive(character) and distTag do
  235. local t = tick() - now
  236. if t < 5 then
  237. if textLabel.Text ~= character.Name then
  238. textLabel.Text = character.Name
  239. end
  240. elseif t < 10 and t > 5 then
  241. textLabel.Text = getDistanceFrom(head)
  242. elseif t > 10 then
  243. now = tick()
  244. end
  245. wait()
  246. end
  247. end))
  248. return distTag
  249. end
  250. end
  251. end
  252.  
  253. -- @esp component
  254. local function esp_getPlayers ()
  255. local players = {}
  256. for _, player in next, Players:GetPlayers() do
  257. if (not settings.esp_ignoreTeam and player.Team ~= localPlayer.Team) or settings.esp_ignoreTeam then
  258. if settings.esp_dont_ignoreSelf or player ~= localPlayer then
  259. players[#players + 1] = player
  260. end
  261. end
  262. end
  263. return players
  264. end
  265. function espCharacter (character, color, override)
  266. local alreadyESPdTag = character:FindFirstChild("AESPT")
  267. if alreadyESPdTag then
  268. if override then
  269. clear_active_espObjects(character)
  270. else
  271. return
  272. end
  273. end
  274.  
  275. local _, humanoid = isHumanoidAlive(character)
  276. if humanoid then
  277.  
  278. humanoid.Died:Connect(function()
  279. clear_active_espObjects(character)
  280. end)
  281. for _, part in next, character:GetChildren() do
  282. if part:IsA("BasePart") then
  283. createEspBoxOnObj(part, color)
  284. end
  285. end
  286.  
  287. alreadyESPdTag = Instance.new("BoolValue", character)
  288. alreadyESPdTag.Name = "AESPT"
  289. active_espObjects[#active_espObjects + 1] = alreadyESPdTag
  290. end
  291. end
  292. local espEnabled = false
  293. local esp_Cache = {}
  294. function clear_esp_Cache ()
  295. local a = 1
  296. while esp_Cache[a] do
  297. esp_Cache[a]:Disconnect()
  298. esp_Cache[a] = nil
  299. a = a + 1
  300. end
  301. esp_Cache = {}
  302. end
  303. local function handle_Esp (character)
  304.  
  305. local timeout = tick()
  306. if not isHumanoidAlive(character) then
  307. repeat wait() until isHumanoidAlive(character) or (tick() - timeout) >= 2
  308. if not isHumanoidAlive(character) then return end
  309. end
  310.  
  311. local teamColor = Players:GetPlayerFromCharacter(character).TeamColor
  312. local color = (settings.esp_useTeamColorIfApplicable and teamColor) or settings.esp_boxColor
  313. color = setColor(color)
  314. if settings.esp_showCharacterEspd then
  315. espCharacter(character, color)
  316. end
  317. if settings.esp_showDistance then
  318. createDistTagOnCharacter(character, false, color)
  319. end
  320.  
  321. local humanoid = character:FindFirstChildOfClass("Humanoid")
  322. humanoid.Died:Connect(function()
  323. clear_active_espObjects(character)
  324. end)
  325.  
  326. end
  327. local function toggle_Esp (turnOff)
  328. if turnOff then
  329. clear_esp_Cache()
  330. clear_active_espObjects()
  331. espEnabled = false
  332. espText.TextColor3 = Color3.fromRGB(48, 48, 48)
  333. print "ESP successfully disabled"
  334. return
  335. elseif not turnOff and not espEnabled then
  336. print "Attempting to enabled ESP .."
  337. clear_esp_Cache()
  338. clear_active_espObjects()
  339. local players = esp_getPlayers()
  340. for _, player in next, players do
  341. local rbxScriptSignal = player.CharacterAdded:Connect(function(character)
  342. if (not espEnabled and rbxScriptSignal) then rbxScriptSignal:Disconnect(); rbxScriptSignal = nil return end
  343. handle_Esp(character)
  344. end); esp_Cache[#esp_Cache + 1] = rbxScriptSignal
  345. if player.Character and isHumanoidAlive(player.Character) then
  346. handle_Esp(player.Character)
  347. end
  348. end
  349. espText.TextColor3 = Color3.fromRGB(0, 255, 0)
  350. print "ESP successfully enabled"
  351. end
  352. end
  353.  
  354. -- @aimbot component
  355. local targetPlayer, targetTeam, currentLock
  356. local function clickToTarget (target, override_maxDistance)
  357. if target and (override_maxDistance or (not override_maxDistance and getDistanceFrom(target) <= settings.aimbot_maxDistance)) then
  358. if target.Parent and isHumanoidAlive(target.Parent) then
  359. targetPlayer = game.Players:GetPlayerFromCharacter(target.Parent)
  360. return true
  361. end
  362. end
  363. end
  364. local function getClosestCharacter ()
  365. if isHumanoidAlive(localPlayer.Character) then
  366. local closestDist, chrctr
  367. if targetPlayer then
  368. chrctr, _ = isHumanoidAlive(targetPlayer.Character)
  369. if not chrctr then
  370. chrctr = targetPlayer.CharacterAdded:wait()
  371. end
  372. else
  373. local players = (targetTeam and targetTeam:GetPlayers()) or Players:GetPlayers()
  374. for i = 1, #players do
  375. if players[i] ~= localPlayer and (targetTeam or settings.aimbot_ignoreTeam or (not settings.aimbot_ignoreTeam and players[i].Team ~= localPlayer.Team)) then
  376. local player = players[i]
  377. if isHumanoidAlive(player.Character) then
  378. local bodyPart = player.Character:FindFirstChild(settings.aimbot_aimFor)
  379. if bodyPart then
  380. local distanceBetween = getDistanceFrom(bodyPart)
  381. if distanceBetween <= settings.aimbot_maxDistance and (not closestDist or distanceBetween < closestDist) then
  382. if (settings.aimbot_ignoreWalls or (not settings.aimbot_ignoreWalls and viewNotObstructed(bodyPart, player.Character))) then
  383. closestDist = distanceBetween
  384. chrctr = player.character
  385. end
  386. end
  387. end
  388. end
  389. end
  390. end
  391. end
  392. return chrctr
  393. end
  394. end
  395. local function targetCamera ()
  396. if isHumanoidAlive(localPlayer.Character) then
  397. local head = localPlayer.Character.Head
  398. local camera = workspace.CurrentCamera
  399. local character = (targetPlayer and isHumanoidAlive(targetPlayer.Character) and targetPlayer.Character) or getClosestCharacter()
  400. if character and character:FindFirstChild(settings.aimbot_aimFor) then
  401. currentLock = Players:GetPlayerFromCharacter(character)
  402. camera.CFrame = CFrame.new(camera.CFrame.p, character[settings.aimbot_aimFor].CFrame.p)
  403. end
  404. end
  405. end
  406. aimbotEnabled = false
  407. local function toggle_Aimbot ()
  408. aimbotEnabled = not aimbotEnabled
  409. print ("Aimbot successfully " .. ((aimbotEnabled and "enabled") or "disabled"))
  410. aimbotText.TextColor3 = (aimbotEnabled and Color3.fromRGB(0, 255, 0)) or Color3.fromRGB(48, 48, 48)
  411. end
  412.  
  413. -- @commandbar component
  414. local function isSetting (settingName)
  415. for k in next, settings do
  416. if k:lower() == settingName:lower() then
  417. return k
  418. end
  419. end
  420. return nil
  421. end
  422. local function changeSetting (settingName, newValue, notBoolean)
  423. if typeof(newValue) == "string" and not notBoolean then
  424. if (newValue:lower() == "enable" or newValue:lower() == "true") then newValue = true
  425. elseif (newValue:lower() == "disable" or newValue:lower() == "false") then newValue = false end
  426. end
  427. local k = isSetting(settingName)
  428. if k then
  429. settings[k] = newValue
  430. print("changed", k, newValue)
  431. end
  432. end
  433. function execute_Command (contents)
  434. local section = contents[1]:lower()
  435. local command = contents[2] and contents[2]:lower()
  436.  
  437. if (section == "enable" or section == "on") or (section == "disable" or section == "off") then
  438. if command == "aimbot" then
  439. aimbotEnabled = (section == "enable" or section == "on")
  440. print ("Aimbot successfully " .. ((aimbotEnabled and "enabled") or "disabled"))
  441. aimbotText.TextColor3 = (aimbotEnabled and Color3.fromRGB(0, 255, 0)) or Color3.fromRGB(48, 48, 48)
  442. elseif command == "esp" then
  443. toggle_Esp((section == "disable" or section == "off") and true)
  444. espEnabled = (section == "enable" or section == "on")
  445. end
  446.  
  447. --
  448.  
  449. elseif section == "esp" then
  450. if (command == "enable" or command == "on") or (command == "disable" or command == "off") then
  451. toggle_Esp((command == "disable" or command == "off") and true)
  452. espEnabled = (command == "enable" or command == "on")
  453. elseif command == "find" or command == "hide" or command:find("dist") then
  454. local plyr = findFirstChild(Players, contents[3]:lower())
  455. local color = (#contents > 4 and table.concat(contents, " ", 4)) or contents[4]
  456. if color == "" or color == " " then
  457. color = nil
  458. end
  459. if plyr then
  460. if command == "showdist" or command == "hidedist" then
  461. createDistTagOnCharacter(plyr.Character, command == "hidedist", color)
  462. return
  463. else
  464. if command == "find" then
  465. espCharacter(plyr.Character, color, true)
  466. espEnabled = true
  467. espText.TextColor3 = Color3.fromRGB(0, 255, 0)
  468. elseif command == "hide" then
  469. clear_active_espObjects(plyr.Character)
  470. end
  471. end
  472. end
  473. elseif command == "boxcolor" then
  474. local color = (#contents > 3 and table.concat(contents, " ", 3)) or contents[3]
  475. if color ~= " " and color ~= "" then
  476. changeSetting("esp_boxColor", color)
  477. toggle_Esp(true); toggle_Esp()
  478. print "Esp reset due to setting change."
  479. end
  480. elseif command == "ignoreteam" or command == "dontignoreself" or command == "showdistance" or command == "showcharacterespd" or command == "holdhotkey" or command == "useteamcolorifapplicable" or command == "boxtransparent" then
  481.  
  482. local value = contents[3]:lower()
  483. if command ~= "holdhotkey" then
  484. if command == "ignoreteam" then
  485. changeSetting("esp_ignoreTeam", value)
  486. elseif command == "dontignoreself" then
  487. changeSetting("esp_dont_ignoreSelf", value)
  488. elseif command == "showdistance" then
  489. changeSetting("esp_showDistance", value)
  490. elseif command == "boxtransparent" then
  491. changeSetting("esp_boxTransparent", value)
  492. elseif command == "showcharacterespd" then
  493. changeSetting("esp_showCharacterEspd", value)
  494. elseif command == "useteamcolorifapplicable" then
  495. changeSetting("esp_useTeamColorIfApplicable", value)
  496. end
  497. toggle_Esp(true); toggle_Esp()
  498. print "Esp reset due to setting change."
  499. else
  500. changeSetting("esp_holdHotkey", value)
  501. if settings.esp_holdHotkey then
  502. print "Esp must now be activated by holding the hotkey."
  503. else
  504. print "Esp must now be toggled by pressing the hotkey."
  505. end
  506. toggle_Esp(true)
  507. print "Esp turned off due to activation change."
  508. end
  509. elseif command == "hotkey" or command == "sethotkey" then
  510. setHotkey("esp", contents[3])
  511. toggle_Esp(true)
  512. print "Esp turned off due to activation change."
  513. end
  514.  
  515. --
  516.  
  517. elseif section == "aimbot" then
  518. if (command == "enable" or command == "on") or (command == "disable" or command == "off") then
  519. aimbotEnabled = (command == "enable" or command == "on")
  520. aimbotText.TextColor3 = (aimbotEnabled and Color3.fromRGB(0, 255, 0)) or Color3.fromRGB(48, 48, 48)
  521. print ("Aimbot successfully " .. ((aimbotEnabled and "enabled") or "disabled"))
  522. elseif command == "target" then
  523. local content3 = contents[3]:lower()
  524. local plyr = findFirstChild(Players, content3)
  525. if not plyr then
  526. if content3 == "team" then
  527. local content4 = (#contents > 4 and table.concat(contents, " ", 4)) or contents[4]
  528. local team = findFirstChild(Teams, content4)
  529. if not team and (content4 == "disable" or content4 == "__disable") then
  530. targetTeam = nil
  531. aimbotEnabled = false
  532. aimbotText.TextColor3 = Color3.fromRGB(48, 48, 48)
  533. print "Aimbot disabled; target team removed."
  534. else
  535. targetTeam = team
  536. if aimbotEnabled then
  537. aimbotEnabled = false
  538. end
  539. aimbotEnabled = true
  540. aimbotText.TextColor3 = Color3.fromRGB(0, 255, 0)
  541. print "Aimbot enabled; target team set."
  542. end
  543. elseif content3 == "disable" or content3 == "__disable" then
  544. targetPlayer = nil
  545. aimbotEnabled = false
  546. aimbotText.TextColor3 = Color3.fromRGB(48, 48, 48)
  547. print "Aimbot disabled; target player removed."
  548. end
  549. else
  550. targetPlayer = plyr
  551. if aimbotEnabled then
  552. aimbotEnabled = false
  553. end
  554. aimbotEnabled = true
  555. aimbotText.TextColor3 = Color3.fromRGB(0, 255, 0)
  556. print "Aimbot target enabled; player set."
  557. end
  558. else
  559. if command == "maxdistance" then
  560. local number = tonumber(contents[3])
  561. if number then
  562. changeSetting("aimbot_maxDistance", number)
  563. end
  564.  
  565. elseif (command == "ignorewalls" or command == "ignoreteam" or command == "aimfor" or command == "clicktolock" or command == "clicktolockdistanceoverride") then
  566. local value = contents[3]
  567. if command == "ignorewalls" then
  568. changeSetting("aimbot_ignoreWalls", value)
  569. elseif command == "ignoreteam" then
  570. changeSetting("aimbot_ignoreTeam", value)
  571. elseif command == "clicktolock" then
  572. changeSetting("aimbot_clickToLock", value)
  573. elseif command == "clicktolockdistanceoverride" then
  574. changeSetting("aimbot_clickToLockDistanceOverride", value)
  575. elseif command == "aimfor" then
  576. changeSetting("aimbot_aimFor", (#contents > 3 and table.concat(contents, " ", 3) or contents[3]), true)
  577. end
  578. aimbotEnabled = false; aimbotEnabled = "true"
  579. aimbotText.TextColor3 = Color3.fromRGB(0, 255, 0)
  580. print "Aimbot reset due to setting change."
  581.  
  582. elseif command == "hotkey" or command == "sethotkey" then
  583. setHotkey("aimbot", contents[3])
  584. aimbotEnabled = false
  585. aimbotText.TextColor3 = Color3.fromRGB(48, 48, 48)
  586. print "Aimbot turned off due to activation change."
  587. end
  588. end
  589.  
  590.  
  591. -- @some flexiblity
  592. elseif section == "target" then
  593. execute_Command({"aimbot", "target", contents[2], contents[3]})
  594. elseif (section == "find" or section == "hide" or section:find("dist")) then
  595. execute_Command({"esp", section, contents[2], (#contents > 3 and table.concat(contents, " ", 3) or contents[3])})
  596.  
  597.  
  598. -- @basic fix
  599. elseif section == "resetcache" then
  600. clear_active_espObjects()
  601. elseif section == "terminate" then
  602. ESP_RBXScriptSignal:Disconnect()
  603. ESP_RBXScriptSignal = nil
  604. AIMBOT_RbxScriptSignal:Disconnect()
  605. AIMBOT_RbxScriptSignal = nil
  606. KEYS_RbxScriptSignal:Disconnect()
  607. KEYS_RbxScriptSignal = nil
  608.  
  609. clear_esp_Cache()
  610. clear_active_espObjects()
  611. ESPOBJF:Destroy()
  612. commandBar:Destroy()
  613.  
  614. end
  615. end
  616. local function on_FocusLost (enterPressed)
  617. local content = Box.Text
  618. Box.Text = "press `-` to type"
  619. Box.Font = Enum.Font.SourceSansItalic
  620. Box.TextTransparency = 0.5
  621. if enterPressed then
  622. if content ~= " " or content ~= "" then
  623. execute_Command(splitString(content, " "))
  624. end
  625. end
  626. end
  627.  
  628. -- @endscript
  629. ESP_RBXScriptSignal = RunService.RenderStepped:Connect(function()
  630. if not script then
  631. return
  632. end
  633. if not settings.esp_holdHotkey then
  634. return
  635. end
  636. if not espEnabled and UserInputService:IsKeyDown(settings.esp_Hotkey) then
  637. toggle_Esp()
  638. espEnabled = true
  639. elseif espEnabled and not UserInputService:IsKeyDown(settings.esp_Hotkey) then
  640. toggle_Esp(true)
  641. end
  642. end)
  643. AIMBOT_RbxScriptSignal = RunService.RenderStepped:Connect(function()
  644. if aimbotEnabled then
  645. targetCamera()
  646. end
  647. end)
  648. KEYS_RbxScriptSignal = UserInputService.InputBegan:Connect(function(inputObj, gpe)
  649. local key = inputObj.KeyCode
  650. if (key == settings.esp_Hotkey) or (key == settings.aimbot_Hotkey) or (key == settings.commandbar_Hotkey) then
  651. if key == settings.commandbar_Hotkey and not gpe then
  652. Box:CaptureFocus()
  653. end
  654. if key == settings.aimbot_Hotkey then
  655. toggle_Aimbot()
  656. end
  657. if key == settings.esp_Hotkey then
  658. if espEnabled then
  659. toggle_Esp(true)
  660. else
  661. toggle_Esp()
  662. espEnabled = true
  663. end
  664. end
  665. end
  666. end)
  667. AIMBOTLOCK_RbxScriptSignal = Mouse.Button2Down:Connect(function()
  668.  
  669. local t = Mouse.Target
  670. if not t then
  671. return
  672. end
  673. if not Players:GetPlayerFromCharacter(t.Parent) then
  674. local character = getCharacterFromPart(t)
  675. if not character then
  676. return
  677. else
  678. t = character:FindFirstChild("HumanoidRootPart")
  679. if not t then
  680. return
  681. end
  682. end
  683. end
  684.  
  685. if not aimbotEnabled and settings.aimbot_clickToLock then
  686. local success = clickToTarget(t, settings.aimbot_clickToLockDistanceOverride)
  687. if success then
  688. currentLock = targetPlayer
  689. aimbotEnabled = true
  690. aimbotText.TextColor3 = Color3.fromRGB(0, 255, 0)
  691. print "Aimbot Enabled; target player set. [click to lock method]"
  692. end
  693. elseif aimbotEnabled then
  694. if currentLock and currentLock.Character and t:IsDescendantOf(currentLock.Character) then
  695. if targetPlayer ~= currentLock then
  696. targetPlayer = currentLock
  697. elseif targetPlayer == currentLock then
  698. targetPlayer, currentLock = nil, nil
  699. aimbotEnabled = false
  700. aimbotText.TextColor3 = Color3.fromRGB(48, 48, 48)
  701. print "Aimbot disabled; target player removed. [click to lock method]"
  702. end
  703. end
  704. end
  705.  
  706. end)
  707. Box.FocusLost:Connect(on_FocusLost)
  708. Box.Focused:Connect(function()
  709. Box.Font = Enum.Font.SourceSans
  710. Box.TextTransparency = 0
  711. end)
  712.  
  713. ESPOBJF.Parent = CoreGui
  714. commandBar.Parent = CoreGui
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement