newtmannewt

Untitled

May 25th, 2018
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.31 KB | None | 0 0
  1.  
  2. Save New Duplicate & Edit Just Text Twitter
  3. 1
  4. 2
  5. 3
  6. 4
  7. 5
  8. 6
  9. 7
  10. 8
  11. 9
  12. 10
  13. 11
  14. 12
  15. 13
  16. 14
  17. 15
  18. 16
  19. 17
  20. 18
  21. 19
  22. 20
  23. 21
  24. 22
  25. 23
  26. 24
  27. 25
  28. 26
  29. 27
  30. 28
  31. 29
  32. 30
  33. 31
  34. 32
  35. 33
  36. 34
  37. 35
  38. 36
  39. 37
  40. 38
  41. 39
  42. 40
  43. 41
  44. 42
  45. 43
  46. 44
  47. 45
  48. 46
  49. 47
  50. 48
  51. 49
  52. 50
  53. 51
  54. 52
  55. 53
  56. 54
  57. 55
  58. 56
  59. 57
  60. 58
  61. 59
  62. 60
  63. 61
  64. 62
  65. 63
  66. 64
  67. 65
  68. 66
  69. 67
  70. 68
  71. 69
  72. 70
  73. 71
  74. 72
  75. 73
  76. 74
  77. 75
  78. 76
  79. 77
  80. 78
  81. 79
  82. 80
  83. 81
  84. 82
  85. 83
  86. 84
  87. 85
  88. 86
  89. 87
  90. 88
  91. 89
  92. 90
  93. 91
  94. 92
  95. 93
  96. 94
  97. 95
  98. 96
  99. 97
  100. 98
  101. 99
  102. 100
  103. 101
  104. 102
  105. 103
  106. 104
  107. 105
  108. 106
  109. 107
  110. 108
  111. 109
  112. 110
  113. 111
  114. 112
  115. 113
  116. 114
  117. 115
  118. 116
  119. 117
  120. 118
  121. 119
  122. 120
  123. 121
  124. 122
  125. 123
  126. 124
  127. 125
  128. 126
  129. 127
  130. 128
  131. 129
  132. 130
  133. 131
  134. 132
  135. 133
  136. 134
  137. 135
  138. 136
  139. 137
  140. 138
  141. 139
  142. 140
  143. 141
  144. 142
  145. 143
  146. 144
  147. 145
  148. 146
  149. 147
  150. 148
  151. 149
  152. 150
  153. 151
  154. 152
  155. 153
  156. 154
  157. 155
  158. 156
  159. 157
  160. 158
  161. 159
  162. 160
  163. 161
  164. 162
  165. 163
  166. 164
  167. 165
  168. 166
  169. 167
  170. 168
  171. 169
  172. 170
  173. 171
  174. 172
  175. 173
  176. 174
  177. 175
  178. 176
  179. 177
  180. 178
  181. 179
  182. 180
  183. 181
  184. 182
  185. 183
  186. 184
  187. 185
  188. 186
  189. 187
  190. 188
  191. 189
  192. 190
  193. 191
  194. 192
  195. 193
  196. 194
  197. 195
  198. 196
  199. 197
  200. 198
  201. 199
  202. 200
  203. 201
  204. 202
  205. 203
  206. 204
  207. 205
  208. 206
  209. 207
  210. 208
  211. 209
  212. 210
  213. 211
  214. 212
  215. 213
  216. 214
  217. 215
  218. 216
  219. 217
  220. 218
  221. 219
  222. 220
  223. 221
  224. 222
  225. 223
  226. 224
  227. 225
  228. 226
  229. 227
  230. 228
  231. 229
  232. 230
  233. 231
  234. 232
  235. 233
  236. 234
  237. 235
  238. 236
  239. 237
  240. 238
  241. 239
  242. 240
  243. 241
  244. 242
  245. 243
  246. 244
  247. 245
  248. 246
  249. 247
  250. 248
  251. 249
  252. 250
  253. 251
  254. 252
  255. 253
  256. 254
  257. 255
  258. 256
  259. 257
  260. 258
  261. 259
  262. 260
  263. 261
  264. 262
  265. 263
  266. 264
  267. 265
  268. 266
  269. 267
  270. 268
  271. 269
  272. 270
  273. 271
  274. 272
  275. 273
  276. 274
  277. 275
  278. 276
  279. 277
  280. 278
  281. 279
  282. 280
  283. 281
  284. 282
  285. 283
  286. 284
  287. 285
  288. 286
  289. 287
  290. 288
  291. 289
  292. 290
  293. 291
  294. 292
  295. 293
  296. 294
  297. 295
  298. 296
  299. 297
  300. 298
  301. 299
  302. 300
  303. 301
  304. 302
  305. 303
  306. 304
  307. 305
  308. 306
  309. 307
  310. 308
  311. 309
  312. 310
  313. 311
  314. 312
  315. 313
  316. 314
  317. 315
  318. 316
  319. 317
  320. 318
  321. 319
  322. 320
  323. 321
  324. 322
  325. 323
  326. 324
  327. 325
  328. 326
  329. 327
  330. 328
  331. 329
  332. 330
  333. 331
  334. 332
  335. 333
  336. 334
  337. 335
  338. 336
  339. 337
  340. 338
  341. 339
  342. 340
  343. 341
  344. 342
  345. 343
  346. 344
  347. 345
  348. 346
  349. 347
  350. 348
  351. 349
  352. 350
  353. 351
  354. 352
  355. 353
  356. 354
  357. 355
  358. 356
  359. 357
  360. 358
  361. 359
  362. 360
  363. 361
  364. 362
  365. 363
  366. 364
  367. 365
  368. 366
  369. 367
  370. 368
  371. 369
  372. 370
  373. 371
  374. 372
  375. 373
  376. 374
  377. 375
  378. 376
  379. 377
  380. 378
  381. 379
  382. 380
  383. 381
  384. 382
  385. 383
  386. 384
  387. 385
  388. 386
  389. 387
  390. 388
  391. 389
  392. 390
  393. 391
  394. 392
  395. 393
  396. 394
  397. 395
  398. 396
  399. 397
  400. 398
  401. 399
  402. 400
  403. 401
  404. 402
  405. 403
  406. 404
  407. 405
  408. 406
  409. 407
  410. 408
  411. 409
  412. 410
  413. 411
  414. 412
  415. 413
  416. 414
  417. 415
  418. 416
  419. 417
  420. 418
  421. 419
  422. 420
  423. 421
  424. 422
  425. 423
  426. 424
  427. 425
  428. 426
  429. 427
  430. 428
  431. 429
  432. 430
  433. 431
  434. 432
  435. 433
  436. 434
  437. 435
  438. 436
  439. 437
  440. 438
  441. 439
  442. 440
  443. 441
  444. 442
  445. 443
  446. 444
  447. 445
  448. 446
  449. 447
  450. 448
  451. 449
  452. 450
  453. 451
  454. 452
  455. 453
  456. 454
  457. 455
  458. 456
  459. 457
  460. 458
  461. 459
  462. 460
  463. 461
  464. 462
  465. 463
  466. 464
  467. 465
  468. 466
  469. 467
  470. 468
  471. 469
  472. 470
  473. 471
  474. 472
  475. 473
  476. 474
  477. 475
  478. 476
  479. 477
  480. 478
  481. 479
  482. 480
  483. 481
  484. 482
  485. 483
  486. 484
  487. 485
  488. 486
  489. 487
  490. 488
  491. 489
  492. 490
  493. 491
  494. 492
  495. 493
  496. 494
  497. 495
  498. 496
  499. 497
  500. 498
  501. 499
  502. 500
  503. 501
  504. 502
  505. 503
  506. 504
  507. 505
  508. 506
  509. 507
  510. 508
  511. 509
  512. 510
  513. 511
  514. 512
  515. 513
  516. 514
  517. 515
  518. 516
  519. 517
  520. 518
  521. 519
  522. 520
  523. 521
  524. 522
  525. 523
  526. 524
  527. 525
  528. 526
  529. 527
  530. 528
  531. 529
  532. 530
  533. 531
  534. 532
  535. 533
  536. 534
  537. 535
  538. 536
  539. 537
  540. 538
  541. 539
  542. 540
  543. 541
  544. 542
  545. 543
  546. 544
  547. 545
  548. 546
  549. 547
  550. 548
  551. 549
  552. 550
  553. 551
  554. 552
  555. 553
  556. 554
  557. 555
  558. 556
  559. 557
  560. 558
  561. 559
  562. 560
  563. 561
  564. 562
  565. 563
  566. 564
  567. 565
  568. 566
  569. 567
  570. 568
  571. 569
  572. 570
  573. 571
  574. 572
  575. 573
  576. 574
  577. 575
  578. 576
  579. 577
  580. 578
  581. 579
  582. 580
  583. 581
  584. 582
  585. 583
  586. 584
  587. 585
  588. 586
  589. 587
  590. 588
  591. 589
  592. 590
  593. 591
  594. 592
  595. 593
  596. 594
  597. 595
  598. 596
  599. 597
  600. 598
  601. 599
  602. 600
  603. 601
  604. 602
  605. 603
  606. 604
  607. 605
  608. 606
  609. 607
  610. 608
  611. 609
  612. 610
  613. 611
  614. 612
  615. 613
  616. 614
  617. 615
  618. 616
  619. 617
  620. 618
  621. 619
  622. 620
  623. 621
  624. 622
  625. 623
  626. 624
  627. 625
  628. 626
  629. 627
  630. 628
  631. 629
  632. 630
  633. 631
  634. 632
  635. 633
  636. 634
  637. 635
  638. 636
  639. 637
  640. 638
  641. 639
  642. 640
  643. 641
  644. 642
  645. 643
  646. 644
  647. 645
  648. 646
  649. 647
  650. 648
  651. 649
  652. 650
  653. 651
  654. 652
  655. 653
  656. 654
  657. 655
  658. 656
  659. 657
  660. 658
  661. 659
  662. 660
  663. 661
  664. 662
  665. 663
  666. 664
  667. 665
  668. 666
  669. 667
  670. 668
  671. 669
  672. 670
  673. 671
  674. 672
  675. 673
  676. 674
  677. 675
  678. 676
  679. 677
  680. 678
  681. 679
  682. 680
  683. 681
  684. 682
  685. 683
  686. 684
  687. 685
  688. 686
  689. 687
  690. 688
  691. 689
  692. 690
  693. 691
  694. 692
  695. 693
  696. 694
  697. 695
  698. 696
  699. 697
  700. 698
  701. 699
  702. 700
  703. 701
  704. 702
  705. 703
  706. 704
  707. 705
  708. 706
  709. 707
  710. 708
  711. 709
  712. 710
  713. 711
  714. 712
  715. 713
  716. 714
  717. 715
  718. 716
  719. 717
  720. 718
  721. 719
  722.  
  723.  
  724.  
  725. -- @Lilith.lua
  726. -- author: lenny
  727. local f_print, printing = print, true
  728. local function print ( ... )
  729. if printing then
  730. f_print("[Lilith] - ", ...)
  731. end
  732. end
  733. print "Version 1.4b, official release;"
  734. print "Aimbot will not work in every game, such as Phantom Forces."
  735.  
  736. -- configuration:
  737. local settings = {
  738. -- hotkeys:
  739. commandbar_Hotkey = "Minus",
  740. esp_Hotkey = "RightAlt",
  741. aimbot_Hotkey = "RightControl";
  742.  
  743. -- defaults:
  744. esp_boxColor = "Bright red",
  745. esp_boxTransparent = true,
  746. esp_useTeamColorIfApplicable = true,
  747. esp_showDistance = true,
  748. esp_holdHotkey = false,
  749. esp_showCharacterEspd = true,
  750. aimbot_clickToLock = true,
  751. aimbot_clickToLockDistanceOverride = true,
  752. aimbot_maxDistance = 250,
  753. aimbot_aimFor = "Head";
  754.  
  755. -- ignores:
  756. esp_ignoreTeam = true,
  757. esp_dont_ignoreSelf = false,
  758. aimbot_ignoreWalls = false,
  759. aimbot_ignoreTeam = false;
  760. }
  761.  
  762. -- mainscript:
  763. local Players = game:GetService("Players")
  764. local Teams = game:GetService("Teams")
  765. local RunService = game:GetService("RunService")
  766. local UserInputService = game:GetService("UserInputService")
  767.  
  768. local localPlayer = Players.LocalPlayer
  769. local Mouse = localPlayer:GetMouse()
  770. local CoreGui = game:GetService("CoreGui")
  771.  
  772. local function findFirstChild (obj, name, sensitive)
  773. local children = obj:GetChildren()
  774. for i = 1, #children do
  775. local objN = children[i].Name
  776. if not sensitive then
  777. objN, name = objN:lower(), name:lower()
  778. end
  779. if objN:sub(1, name:len()) == name then
  780. return children[i]
  781. end
  782. end
  783. end
  784. local function setHotkey (section, keyName)
  785. if Enum.KeyCode[keyName] then
  786. settings[section .. '_Hotkey'] = Enum.KeyCode[keyName]
  787. print ("Sucessfully set " .. section .. "'s hotkey to " .. keyName)
  788. end
  789. end setHotkey("esp", settings.esp_Hotkey); setHotkey("aimbot", settings.aimbot_Hotkey); setHotkey("commandbar", settings.commandbar_Hotkey)
  790. local function splitString (str, delimeter)
  791. local strParts = {}
  792. local pattern = ("([^%s]+)"):format(delimeter)
  793.  
  794. str:gsub(pattern, function(section)
  795. strParts[#strParts + 1] = section
  796. end)
  797. return strParts
  798. end
  799. local function isHumanoidAlive (character)
  800. if character then
  801. local humanoid = character:FindFirstChildOfClass("Humanoid")
  802. if humanoid and humanoid.Health > 0 then
  803. return character, humanoid
  804. end
  805. end
  806. end
  807. local function getCharacterFromPart (obj) -- made this in haste, so its unorganized!
  808. while (obj ~= game and obj ~= workspace) and (obj.Parent and not Players:GetPlayerFromCharacter(obj.Parent)) do
  809. obj = obj.Parent
  810. end
  811. return obj
  812. end
  813. local function viewNotObstructed (lookingAt, parent)
  814. local character, _ = isHumanoidAlive(localPlayer.Character)
  815. if character then
  816. local headPos = character.Head.CFrame.p
  817. local viewRay = Ray.new(headPos, (lookingAt.CFrame.p - headPos).unit *
  818. settings.aimbot_maxDistance)
  819. local object = workspace:FindPartOnRay(viewRay, character, true, true)
  820. if object then
  821. return object:IsDescendantOf(parent)
  822. end
  823. end
  824. end
  825. local function setColor (color)
  826. return select(2, pcall(function()
  827. if typeof(color) == "BrickColor" then
  828. color = color.Color
  829. elseif typeof(color) == "string" then
  830. color = BrickColor.new(color).Color
  831. end
  832. return color
  833. end))
  834. end
  835.  
  836. -- @create objects
  837. local ESPOBJF do
  838. ESPOBJF = findFirstChild(CoreGui, "ESPOBJF")
  839. if not ESPOBJF then
  840. ESPOBJF = Instance.new("Folder", CoreGui)
  841. ESPOBJF.Name = "ESPOBJF"
  842. end
  843. end
  844. local Box, espText, aimbotText
  845. local commandBar do
  846. commandBar = Instance.new("ScreenGui")
  847. commandBar.Name = "%$#@$!&"
  848.  
  849. local frame = Instance.new("Frame", commandBar)
  850. 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
  851.  
  852. local textlabel = Instance.new("TextLabel", frame)
  853. 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]"
  854.  
  855. Box = Instance.new("TextBox", frame)
  856. 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
  857.  
  858. aimbotText = textlabel:Clone()
  859. 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
  860.  
  861. espText = textlabel:Clone()
  862. 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
  863. end
  864. local active_espObjects = {}
  865. local function clear_active_espObjects (ofParent)
  866. if not ofParent then
  867. ESPOBJF:ClearAllChildren()
  868. local a = 1
  869. while active_espObjects[a] do
  870. if active_espObjects[a] then
  871. active_espObjects[a]:Destroy()
  872. end
  873. active_espObjects[a] = nil
  874. a = a + 1
  875. end
  876. else
  877. local j = 1
  878. while active_espObjects[j] do
  879. local espObj = active_espObjects[j]
  880. if espObj and espObj:IsDescendantOf(ofParent) or ((espObj:IsA("BoxHandleAdornment") or espObj:IsA("BillboardGui")) and espObj.Adornee and espObj.Adornee:IsDescendantOf(ofParent)) then
  881. espObj:Destroy()
  882. espObj = nil
  883. end
  884. j = j + 1
  885. end
  886. end
  887. end
  888. local function createEspBoxOnObj (obj, color)
  889. local espBox do
  890. espBox = Instance.new("BoxHandleAdornment")
  891. espBox.AlwaysOnTop = true
  892. espBox.ZIndex = 10
  893. espBox.Color3 = BrickColor.new(settings.esp_boxColor).Color
  894. end
  895.  
  896. local color = setColor(color)
  897. if color then
  898. espBox.Color3 = color
  899. end
  900.  
  901. if settings.esp_boxTransparent then
  902. espBox.Transparency = 0.8
  903. end
  904.  
  905. espBox.Size = obj.Size
  906. espBox.Adornee = obj
  907. espBox.Parent = ESPOBJF
  908. active_espObjects[#active_espObjects + 1] = espBox
  909.  
  910. return espBox
  911. end
  912. local function getDistanceFrom (object)
  913. if localPlayer.Character and localPlayer.Character.Head then
  914. return math.floor((object.Position - localPlayer.Character.Head.Position).magnitude)
  915. else
  916. return "err"
  917. end
  918. end
  919. local function createDistTagOnCharacter (character, removeTag, color)
  920. local _, humanoid = isHumanoidAlive(character)
  921. if humanoid then
  922. humanoid.Died:Connect(function()
  923. clear_active_espObjects(character)
  924. end)
  925. local head = character:FindFirstChild("Head")
  926. if head then
  927. if ESPOBJF:findFirstChild(character.Name) then
  928. ESPOBJF[character.Name]:Destroy()
  929. if removeTag then
  930. return
  931. end
  932. end
  933.  
  934. local textLabel
  935. local distTag do
  936. distTag = Instance.new("BillboardGui")
  937. distTag.AlwaysOnTop = true
  938. distTag.Enabled = true
  939. distTag.Size = UDim2.new(0, 10,0, 50)
  940.  
  941. textLabel = Instance.new("TextLabel", distTag)
  942. textLabel.Size = UDim2.new(0, 75,0, 25)
  943. textLabel.BackgroundColor3 = (color ~= nil and color) or Color3.fromRGB(48, 48, 48)
  944. textLabel.BackgroundTransparency = 0.5
  945. textLabel.Font = Enum.Font.SourceSansBold
  946. textLabel.TextSize = 18
  947. textLabel.TextColor3 = Color3.fromRGB(255, 255 ,255)
  948. textLabel.ClipsDescendants = true
  949. textLabel.BorderSizePixel = 0
  950. end
  951. distTag.Adornee = head
  952. distTag.Parent = ESPOBJF
  953. distTag.Name = character.Name
  954. textLabel.Text = character.Name
  955. active_espObjects[#active_espObjects + 1] = distTag
  956.  
  957. coroutine.resume(coroutine.create(function()
  958. local now = tick()
  959. while isHumanoidAlive(character) and distTag do
  960. local t = tick() - now
  961. if t < 5 then
  962. if textLabel.Text ~= character.Name then
  963. textLabel.Text = character.Name
  964. end
  965. elseif t < 10 and t > 5 then
  966. textLabel.Text = getDistanceFrom(head)
  967. elseif t > 10 then
  968. now = tick()
  969. end
  970. wait()
  971. end
  972. end))
  973. return distTag
  974. end
  975. end
  976. end
  977.  
  978. -- @esp component
  979. local function esp_getPlayers ()
  980. local players = {}
  981. for _, player in next, Players:GetPlayers() do
  982. if (not settings.esp_ignoreTeam and player.Team ~= localPlayer.Team) or settings.esp_ignoreTeam then
  983. if settings.esp_dont_ignoreSelf or player ~= localPlayer then
  984. players[#players + 1] = player
  985. end
  986. end
  987. end
  988. return players
  989. end
  990. function espCharacter (character, color, override)
  991. local alreadyESPdTag = character:FindFirstChild("AESPT")
  992. if alreadyESPdTag then
  993. if override then
  994. clear_active_espObjects(character)
  995. else
  996. return
  997. end
  998. end
  999.  
  1000. local _, humanoid = isHumanoidAlive(character)
  1001. if humanoid then
  1002.  
  1003. humanoid.Died:Connect(function()
  1004. clear_active_espObjects(character)
  1005. end)
  1006. for _, part in next, character:GetChildren() do
  1007. if part:IsA("BasePart") then
  1008. createEspBoxOnObj(part, color)
  1009. end
  1010. end
  1011.  
  1012. alreadyESPdTag = Instance.new("BoolValue", character)
  1013. alreadyESPdTag.Name = "AESPT"
  1014. active_espObjects[#active_espObjects + 1] = alreadyESPdTag
  1015. end
  1016. end
  1017. local espEnabled = false
  1018. local esp_Cache = {}
  1019. function clear_esp_Cache ()
  1020. local a = 1
  1021. while esp_Cache[a] do
  1022. esp_Cache[a]:Disconnect()
  1023. esp_Cache[a] = nil
  1024. a = a + 1
  1025. end
  1026. esp_Cache = {}
  1027. end
  1028. local function handle_Esp (character)
  1029.  
  1030. local timeout = tick()
  1031. if not isHumanoidAlive(character) then
  1032. repeat wait() until isHumanoidAlive(character) or (tick() - timeout) >= 2
  1033. if not isHumanoidAlive(character) then return end
  1034. end
  1035.  
  1036. local teamColor = Players:GetPlayerFromCharacter(character).TeamColor
  1037. local color = (settings.esp_useTeamColorIfApplicable and teamColor) or settings.esp_boxColor
  1038. color = setColor(color)
  1039. if settings.esp_showCharacterEspd then
  1040. espCharacter(character, color)
  1041. end
  1042. if settings.esp_showDistance then
  1043. createDistTagOnCharacter(character, false, color)
  1044. end
  1045.  
  1046. local humanoid = character:FindFirstChildOfClass("Humanoid")
  1047. humanoid.Died:Connect(function()
  1048. clear_active_espObjects(character)
  1049. end)
  1050.  
  1051. end
  1052. local function toggle_Esp (turnOff)
  1053. if turnOff then
  1054. clear_esp_Cache()
  1055. clear_active_espObjects()
  1056. espEnabled = false
  1057. espText.TextColor3 = Color3.fromRGB(48, 48, 48)
  1058. print "ESP successfully disabled"
  1059. return
  1060. elseif not turnOff and not espEnabled then
  1061. print "Attempting to enabled ESP .."
  1062. clear_esp_Cache()
  1063. clear_active_espObjects()
  1064. local players = esp_getPlayers()
  1065. for _, player in next, players do
  1066. local rbxScriptSignal = player.CharacterAdded:Connect(function(character)
  1067. if (not espEnabled and rbxScriptSignal) then rbxScriptSignal:Disconnect(); rbxScriptSignal = nil return end
  1068. handle_Esp(character)
  1069. end); esp_Cache[#esp_Cache + 1] = rbxScriptSignal
  1070. if player.Character and isHumanoidAlive(player.Character) then
  1071. handle_Esp(player.Character)
  1072. end
  1073. end
  1074. espText.TextColor3 = Color3.fromRGB(0, 255, 0)
  1075. print "ESP successfully enabled"
  1076. end
  1077. end
  1078.  
  1079. -- @aimbot component
  1080. local targetPlayer, targetTeam, currentLock
  1081. local function clickToTarget (target, override_maxDistance)
  1082. if target and (override_maxDistance or (not override_maxDistance and getDistanceFrom(target) <= settings.aimbot_maxDistance)) then
  1083. if target.Parent and isHumanoidAlive(target.Parent) then
  1084. targetPlayer = game.Players:GetPlayerFromCharacter(target.Parent)
  1085. return true
  1086. end
  1087. end
  1088. end
  1089. local function getClosestCharacter ()
  1090. if isHumanoidAlive(localPlayer.Character) then
  1091. local closestDist, chrctr
  1092. if targetPlayer then
  1093. chrctr, _ = isHumanoidAlive(targetPlayer.Character)
  1094. if not chrctr then
  1095. chrctr = targetPlayer.CharacterAdded:wait()
  1096. end
  1097. else
  1098. local players = (targetTeam and targetTeam:GetPlayers()) or Players:GetPlayers()
  1099. for i = 1, #players do
  1100. if players[i] ~= localPlayer and (targetTeam or settings.aimbot_ignoreTeam or (not settings.aimbot_ignoreTeam and players[i].Team ~= localPlayer.Team)) then
  1101. local player = players[i]
  1102. if isHumanoidAlive(player.Character) then
  1103. local bodyPart = player.Character:FindFirstChild(settings.aimbot_aimFor)
  1104. if bodyPart then
  1105. local distanceBetween = getDistanceFrom(bodyPart)
  1106. if distanceBetween <= settings.aimbot_maxDistance and (not closestDist or distanceBetween < closestDist) then
  1107. if (settings.aimbot_ignoreWalls or (not settings.aimbot_ignoreWalls and viewNotObstructed(bodyPart, player.Character))) then
  1108. closestDist = distanceBetween
  1109. chrctr = player.character
  1110. end
  1111. end
  1112. end
  1113. end
  1114. end
  1115. end
  1116. end
  1117. return chrctr
  1118. end
  1119. end
  1120. local function targetCamera ()
  1121. if isHumanoidAlive(localPlayer.Character) then
  1122. local head = localPlayer.Character.Head
  1123. local camera = workspace.CurrentCamera
  1124. local character = (targetPlayer and isHumanoidAlive(targetPlayer.Character) and targetPlayer.Character) or getClosestCharacter()
  1125. if character and character:FindFirstChild(settings.aimbot_aimFor) then
  1126. currentLock = Players:GetPlayerFromCharacter(character)
  1127. camera.CFrame = CFrame.new(camera.CFrame.p, character[settings.aimbot_aimFor].CFrame.p)
  1128. end
  1129. end
  1130. end
  1131. aimbotEnabled = false
  1132. local function toggle_Aimbot ()
  1133. aimbotEnabled = not aimbotEnabled
  1134. print ("Aimbot successfully " .. ((aimbotEnabled and "enabled") or "disabled"))
  1135. aimbotText.TextColor3 = (aimbotEnabled and Color3.fromRGB(0, 255, 0)) or Color3.fromRGB(48, 48, 48)
  1136. end
  1137.  
  1138. -- @commandbar component
  1139. local function isSetting (settingName)
  1140. for k in next, settings do
  1141. if k:lower() == settingName:lower() then
  1142. return k
  1143. end
  1144. end
  1145. return nil
  1146. end
  1147. local function changeSetting (settingName, newValue, notBoolean)
  1148. if typeof(newValue) == "string" and not notBoolean then
  1149. if (newValue:lower() == "enable" or newValue:lower() == "true") then newValue = true
  1150. elseif (newValue:lower() == "disable" or newValue:lower() == "false") then newValue = false end
  1151. end
  1152. local k = isSetting(settingName)
  1153. if k then
  1154. settings[k] = newValue
  1155. print("changed", k, newValue)
  1156. end
  1157. end
  1158. function execute_Command (contents)
  1159. local section = contents[1]:lower()
  1160. local command = contents[2] and contents[2]:lower()
  1161.  
  1162. if (section == "enable" or section == "on") or (section == "disable" or section == "off") then
  1163. if command == "aimbot" then
  1164. aimbotEnabled = (section == "enable" or section == "on")
  1165. print ("Aimbot successfully " .. ((aimbotEnabled and "enabled") or "disabled"))
  1166. aimbotText.TextColor3 = (aimbotEnabled and Color3.fromRGB(0, 255, 0)) or Color3.fromRGB(48, 48, 48)
  1167. elseif command == "esp" then
  1168. toggle_Esp((section == "disable" or section == "off") and true)
  1169. espEnabled = (section == "enable" or section == "on")
  1170. end
  1171.  
  1172. --
  1173.  
  1174. elseif section == "esp" then
  1175. if (command == "enable" or command == "on") or (command == "disable" or command == "off") then
  1176. toggle_Esp((command == "disable" or command == "off") and true)
  1177. espEnabled = (command == "enable" or command == "on")
  1178. elseif command == "find" or command == "hide" or command:find("dist") then
  1179. local plyr = findFirstChild(Players, contents[3]:lower())
  1180. local color = (#contents > 4 and table.concat(contents, " ", 4)) or contents[4]
  1181. if color == "" or color == " " then
  1182. color = nil
  1183. end
  1184. if plyr then
  1185. if command == "showdist" or command == "hidedist" then
  1186. createDistTagOnCharacter(plyr.Character, command == "hidedist", color)
  1187. return
  1188. else
  1189. if command == "find" then
  1190. espCharacter(plyr.Character, color, true)
  1191. espEnabled = true
  1192. espText.TextColor3 = Color3.fromRGB(0, 255, 0)
  1193. elseif command == "hide" then
  1194. clear_active_espObjects(plyr.Character)
  1195. end
  1196. end
  1197. end
  1198. elseif command == "boxcolor" then
  1199. local color = (#contents > 3 and table.concat(contents, " ", 3)) or contents[3]
  1200. if color ~= " " and color ~= "" then
  1201. changeSetting("esp_boxColor", color)
  1202. toggle_Esp(true); toggle_Esp()
  1203. print "Esp reset due to setting change."
  1204. end
  1205. elseif command == "ignoreteam" or command == "dontignoreself" or command == "showdistance" or command == "showcharacterespd" or command == "holdhotkey" or command == "useteamcolorifapplicable" or command == "boxtransparent" then
  1206.  
  1207. local value = contents[3]:lower()
  1208. if command ~= "holdhotkey" then
  1209. if command == "ignoreteam" then
  1210. changeSetting("esp_ignoreTeam", value)
  1211. elseif command == "dontignoreself" then
  1212. changeSetting("esp_dont_ignoreSelf", value)
  1213. elseif command == "showdistance" then
  1214. changeSetting("esp_showDistance", value)
  1215. elseif command == "boxtransparent" then
  1216. changeSetting("esp_boxTransparent", value)
  1217. elseif command == "showcharacterespd" then
  1218. changeSetting("esp_showCharacterEspd", value)
  1219. elseif command == "useteamcolorifapplicable" then
  1220. changeSetting("esp_useTeamColorIfApplicable", value)
  1221. end
  1222. toggle_Esp(true); toggle_Esp()
  1223. print "Esp reset due to setting change."
  1224. else
  1225. changeSetting("esp_holdHotkey", value)
  1226. if settings.esp_holdHotkey then
  1227. print "Esp must now be activated by holding the hotkey."
  1228. else
  1229. print "Esp must now be toggled by pressing the hotkey."
  1230. end
  1231. toggle_Esp(true)
  1232. print "Esp turned off due to activation change."
  1233. end
  1234. elseif command == "hotkey" or command == "sethotkey" then
  1235. setHotkey("esp", contents[3])
  1236. toggle_Esp(true)
  1237. print "Esp turned off due to activation change."
  1238. end
  1239.  
  1240. --
  1241.  
  1242. elseif section == "aimbot" then
  1243. if (command == "enable" or command == "on") or (command == "disable" or command == "off") then
  1244. aimbotEnabled = (command == "enable" or command == "on")
  1245. aimbotText.TextColor3 = (aimbotEnabled and Color3.fromRGB(0, 255, 0)) or Color3.fromRGB(48, 48, 48)
  1246. print ("Aimbot successfully " .. ((aimbotEnabled and "enabled") or "disabled"))
  1247. elseif command == "target" then
  1248. local content3 = contents[3]:lower()
  1249. local plyr = findFirstChild(Players, content3)
  1250. if not plyr then
  1251. if content3 == "team" then
  1252. local content4 = (#contents > 4 and table.concat(contents, " ", 4)) or contents[4]
  1253. local team = findFirstChild(Teams, content4)
  1254. if not team and (content4 == "disable" or content4 == "__disable") then
  1255. targetTeam = nil
  1256. aimbotEnabled = false
  1257. aimbotText.TextColor3 = Color3.fromRGB(48, 48, 48)
  1258. print "Aimbot disabled; target team removed."
  1259. else
  1260. targetTeam = team
  1261. if aimbotEnabled then
  1262. aimbotEnabled = false
  1263. end
  1264. aimbotEnabled = true
  1265. aimbotText.TextColor3 = Color3.fromRGB(0, 255, 0)
  1266. print "Aimbot enabled; target team set."
  1267. end
  1268. elseif content3 == "disable" or content3 == "__disable" then
  1269. targetPlayer = nil
  1270. aimbotEnabled = false
  1271. aimbotText.TextColor3 = Color3.fromRGB(48, 48, 48)
  1272. print "Aimbot disabled; target player removed."
  1273. end
  1274. else
  1275. targetPlayer = plyr
  1276. if aimbotEnabled then
  1277. aimbotEnabled = false
  1278. end
  1279. aimbotEnabled = true
  1280. aimbotText.TextColor3 = Color3.fromRGB(0, 255, 0)
  1281. print "Aimbot target enabled; player set."
  1282. end
  1283. else
  1284. if command == "maxdistance" then
  1285. local number = tonumber(contents[3])
  1286. if number then
  1287. changeSetting("aimbot_maxDistance", number)
  1288. end
  1289.  
  1290. elseif (command == "ignorewalls" or command == "ignoreteam" or command == "aimfor" or command == "clicktolock" or command == "clicktolockdistanceoverride") then
  1291. local value = contents[3]
  1292. if command == "ignorewalls" then
  1293. changeSetting("aimbot_ignoreWalls", value)
  1294. elseif command == "ignoreteam" then
  1295. changeSetting("aimbot_ignoreTeam", value)
  1296. elseif command == "clicktolock" then
  1297. changeSetting("aimbot_clickToLock", value)
  1298. elseif command == "clicktolockdistanceoverride" then
  1299. changeSetting("aimbot_clickToLockDistanceOverride", value)
  1300. elseif command == "aimfor" then
  1301. changeSetting("aimbot_aimFor", (#contents > 3 and table.concat(contents, " ", 3) or contents[3]), true)
  1302. end
  1303. aimbotEnabled = false; aimbotEnabled = "true"
  1304. aimbotText.TextColor3 = Color3.fromRGB(0, 255, 0)
  1305. print "Aimbot reset due to setting change."
  1306.  
  1307. elseif command == "hotkey" or command == "sethotkey" then
  1308. setHotkey("aimbot", contents[3])
  1309. aimbotEnabled = false
  1310. aimbotText.TextColor3 = Color3.fromRGB(48, 48, 48)
  1311. print "Aimbot turned off due to activation change."
  1312. end
  1313. end
  1314.  
  1315.  
  1316. -- @some flexiblity
  1317. elseif section == "target" then
  1318. execute_Command({"aimbot", "target", contents[2], contents[3]})
  1319. elseif (section == "find" or section == "hide" or section:find("dist")) then
  1320. execute_Command({"esp", section, contents[2], (#contents > 3 and table.concat(contents, " ", 3) or contents[3])})
  1321.  
  1322.  
  1323. -- @basic fix
  1324. elseif section == "resetcache" then
  1325. clear_active_espObjects()
  1326. elseif section == "terminate" then
  1327. ESP_RBXScriptSignal:Disconnect()
  1328. ESP_RBXScriptSignal = nil
  1329. AIMBOT_RbxScriptSignal:Disconnect()
  1330. AIMBOT_RbxScriptSignal = nil
  1331. KEYS_RbxScriptSignal:Disconnect()
  1332. KEYS_RbxScriptSignal = nil
  1333.  
  1334. clear_esp_Cache()
  1335. clear_active_espObjects()
  1336. ESPOBJF:Destroy()
  1337. commandBar:Destroy()
  1338.  
  1339. end
  1340. end
  1341. local function on_FocusLost (enterPressed)
  1342. local content = Box.Text
  1343. Box.Text = "press `-` to type"
  1344. Box.Font = Enum.Font.SourceSansItalic
  1345. Box.TextTransparency = 0.5
  1346. if enterPressed then
  1347. if content ~= " " or content ~= "" then
  1348. execute_Command(splitString(content, " "))
  1349. end
  1350. end
  1351. end
  1352.  
  1353. -- @endscript
  1354. ESP_RBXScriptSignal = RunService.RenderStepped:Connect(function()
  1355. if not script then
  1356. return
  1357. end
  1358. if not settings.esp_holdHotkey then
  1359. return
  1360. end
  1361. if not espEnabled and UserInputService:IsKeyDown(settings.esp_Hotkey) then
  1362. toggle_Esp()
  1363. espEnabled = true
  1364. elseif espEnabled and not UserInputService:IsKeyDown(settings.esp_Hotkey) then
  1365. toggle_Esp(true)
  1366. end
  1367. end)
  1368. AIMBOT_RbxScriptSignal = RunService.RenderStepped:Connect(function()
  1369. if aimbotEnabled then
  1370. targetCamera()
  1371. end
  1372. end)
  1373. KEYS_RbxScriptSignal = UserInputService.InputBegan:Connect(function(inputObj, gpe)
  1374. local key = inputObj.KeyCode
  1375. if (key == settings.esp_Hotkey) or (key == settings.aimbot_Hotkey) or (key == settings.commandbar_Hotkey) then
  1376. if key == settings.commandbar_Hotkey and not gpe then
  1377. Box:CaptureFocus()
  1378. end
  1379. if key == settings.aimbot_Hotkey then
  1380. toggle_Aimbot()
  1381. end
  1382. if key == settings.esp_Hotkey then
  1383. if espEnabled then
  1384. toggle_Esp(true)
  1385. else
  1386. toggle_Esp()
  1387. espEnabled = true
  1388. end
  1389. end
  1390. end
  1391. end)
  1392. AIMBOTLOCK_RbxScriptSignal = Mouse.Button2Down:Connect(function()
  1393.  
  1394. local t = Mouse.Target
  1395. if not t then
  1396. return
  1397. end
  1398. if not Players:GetPlayerFromCharacter(t.Parent) then
  1399. local character = getCharacterFromPart(t)
  1400. if not character then
  1401. return
  1402. else
  1403. t = character:FindFirstChild("HumanoidRootPart")
  1404. if not t then
  1405. return
  1406. end
  1407. end
  1408. end
  1409.  
  1410. if not aimbotEnabled and settings.aimbot_clickToLock then
  1411. local success = clickToTarget(t, settings.aimbot_clickToLockDistanceOverride)
  1412. if success then
  1413. currentLock = targetPlayer
  1414. aimbotEnabled = true
  1415. aimbotText.TextColor3 = Color3.fromRGB(0, 255, 0)
  1416. print "Aimbot Enabled; target player set. [click to lock method]"
  1417. end
  1418. elseif aimbotEnabled then
  1419. if currentLock and currentLock.Character and t:IsDescendantOf(currentLock.Character) then
  1420. if targetPlayer ~= currentLock then
  1421. targetPlayer = currentLock
  1422. elseif targetPlayer == currentLock then
  1423. targetPlayer, currentLock = nil, nil
  1424. aimbotEnabled = false
  1425. aimbotText.TextColor3 = Color3.fromRGB(48, 48, 48)
  1426. print "Aimbot disabled; target player removed. [click to lock method]"
  1427. end
  1428. end
  1429. end
  1430.  
  1431. end)
  1432. Box.FocusLost:Connect(on_FocusLost)
  1433. Box.Focused:Connect(function()
  1434. Box.Font = Enum.Font.SourceSans
  1435. Box.TextTransparency = 0
  1436. end)
  1437.  
  1438. ESPOBJF.Parent = CoreGui
  1439. commandBar.Parent = CoreGui
Add Comment
Please, Sign In to add comment