Xxploitboi

phantom forces exploit gui

Apr 24th, 2018
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.04 KB | None | 0 0
  1. local World = game:GetService('Workspace');
  2. local Input = game:GetService('UserInputService');
  3. local Lighting = game:GetService("Lighting");
  4. local Players = game:GetService('Players');
  5. local Player = Players['LocalPlayer'];
  6.  
  7. local Keys = {}
  8. local Misc = {
  9. CharFunctions = getmetatable(newproxy(true));
  10. GUIColors = {
  11. On = Color3.fromRGB(46, 105, 132);
  12. Off = Color3.new(.38, .38, .38);
  13. };
  14.  
  15. ChamsColors = {
  16. {'White', Color3.new(1, 1, 1)};
  17. {'Black', Color3.new(0, 0, 0)};
  18. {'Red', Color3.new(1, 0, 0)};
  19. {'Green', Color3.new(0, 1, 0)};
  20. {'Blue', Color3.new(0, 0, 1)};
  21. {'Purple', Color3.new(0.65, 0, 0.65)};
  22. {'Yellow', Color3.new(1, 1, 0)};
  23. {'Grey', Color3.new(0.8, 0.8, 0.8)};
  24. }
  25. }
  26.  
  27. local function GetFunc(t, i)
  28. for __, ___ in next, (t) do
  29. if string.lower(i):match(__:lower()) then
  30. return ___, __
  31. end
  32. end
  33. end
  34.  
  35. local function GetColor(t, i)
  36. for __, ___ in next, (t) do
  37. if (___[1] == i) then
  38. return ___, __
  39. elseif (___[2] == i) then
  40. return ___, __
  41. end
  42. end
  43. end
  44.  
  45. local Settings = {
  46. {'Menu', false, Enum.KeyCode.Delete};
  47. {'Team Chams [\'COLOR\']', true, 'Toggle'};
  48. {'Enemy Chams [\'COLOR\']', true, 'Toggle'};
  49. {'Chams Transparency', false, '0'};
  50. {'Fullbright', true, 'MAX'};
  51. -- {'ESP', true, 'N/A'};
  52. {'Aimbot [Not PF]', true, 'Toggle'};
  53. }
  54.  
  55. ------------ [[ GUI SPAWN ]] ------------
  56. FormAssets = function()
  57. ------ ERROR MAGIC ------
  58. local __ERROR__ = Instance.new('BindableEvent')
  59. __ERROR__['Event']:Connect(error)
  60.  
  61. --------- CREATE FUNCTION ---------
  62. local create = function(class, parent)
  63. local instance = Instance.new(class);
  64. return function(props)
  65. for property, value in next, (props) do
  66. if (property ~= 'Parent') and (typeof(value) ~= 'Instance') then
  67. local suc, err = pcall(function()
  68. instance[property] = value
  69. end)
  70. if not suc then __ERROR__:Fire('[Script->Asset]: ' .. err) end
  71.  
  72. elseif (property == 'Parent') then
  73. parent = value
  74. end
  75. end
  76.  
  77. if parent and (typeof(parent) == 'Instance') then
  78. instance['Parent'] = parent
  79. end
  80.  
  81. return instance
  82. end
  83. end
  84.  
  85. -------------------------------------
  86. -------------------------------------
  87. -- SOME THINGS MAY BE OUT OF ORDER --
  88. ----(INSTANCE RELATED PROPERTIES)----
  89. -------------(UNLIKELY)--------------
  90. -------------------------------------
  91. -------------------------------------
  92.  
  93. local Main = create('ScreenGui'){
  94. Name = "FPS Hacks - Menu"
  95. }
  96.  
  97. local Folder = create('Folder', Main){
  98. Name = 'Chams'
  99. }
  100.  
  101. local Folder1 = create('Folder', Folder){
  102. Name = 'Team'
  103. }
  104.  
  105. local Folder2 = create('Folder', Folder){
  106. Name = 'Enemy'
  107. }
  108.  
  109. local Frame = create('Frame', Main){
  110. Name = "Main";
  111. BackgroundColor3 = Color3.new(1, 1, 1);
  112. BackgroundTransparency = 1;
  113. Position = UDim2.new(0.5, 0, 0.5, 0);
  114. Size = UDim2.new(0, 250, 0, 190);
  115. Draggable = true;
  116. Active = true;
  117. AnchorPoint = Vector2.new(0.5, 0.5);
  118. Transparency = 1
  119. }
  120.  
  121. local TextLabel = create('TextLabel', Frame){
  122. Name = "Title";
  123. BackgroundColor3 = Color3.new(0.180392, 0.411765, 0.517647);
  124. BorderSizePixel = 0;
  125. Size = UDim2.new(1, 0, 0, 35);
  126. Text = "FPS Hacks";
  127. TextColor3 = Color3.new(0.866667, 0.843137, 0.843137);
  128. Font = Enum.Font.SciFi;
  129. FontSize = Enum.FontSize.Size28;
  130. TextWrapped = true
  131. }
  132.  
  133. local ScrollingFrame = create('ScrollingFrame', Frame){
  134. Name = "Buttons";
  135. BackgroundColor3 = Color3.new(1, 1, 1);
  136. BackgroundTransparency = 1;
  137. BorderSizePixel = 0;
  138. Position = UDim2.new(0.5, 0, 0, 40);
  139. CanvasSize = UDim2.new(0, 0, 0, 0);
  140. Size = UDim2.new(1, 0, 0, 260);
  141. AnchorPoint = Vector2.new(0.5, 0);
  142. Transparency = 1
  143. }
  144.  
  145. local Frame1 = create('Frame'){
  146. BackgroundColor3 = Color3.new(1, 1, 1);
  147. BackgroundTransparency = 1;
  148. BorderSizePixel = 0;
  149. Position = UDim2.new(0, 0, 0, 1);
  150. Selectable = true;
  151. Size = UDim2.new(1, 0, 0, 25);
  152. ClipsDescendants = true;
  153. Transparency = 1
  154. }
  155.  
  156. local TextLabel1 = create('TextButton', Frame1){
  157. Name = "Text";
  158. BackgroundColor3 = Color3.new(1, 1, 1);
  159. BorderColor3 = Color3.new(0.180392, 0.411765, 0.517647);
  160. Position = UDim2.new(0.100000001, 0, 0, 0);
  161. Size = UDim2.new(0.600000024, 0, 1, 0);
  162. Text = "Example";
  163. TextColor3 = Color3.new(0.180392, 0.411765, 0.517647);
  164. Font = Enum.Font.SciFi;
  165. FontSize = Enum.FontSize.Size14
  166. }
  167.  
  168. local Frame2 = create('Frame', Frame1){
  169. Name = "Status";
  170. BackgroundColor3 = Color3.new(0, 1, 0);
  171. BorderSizePixel = 0;
  172. Position = UDim2.new(0.0250000004, 0, 0.5, 0);
  173. Size = UDim2.new(0, 7, 0, 7);
  174. Style = Enum.FrameStyle.DropShadow;
  175. AnchorPoint = Vector2.new(0, 0.5)
  176. }
  177.  
  178. local TextButton = create('TextButton', Frame1){
  179. Name = "Key";
  180. BackgroundColor3 = Color3.new(0.180392, 0.411765, 0.517647);
  181. BackgroundTransparency = 0.5;
  182. BorderSizePixel = 0;
  183. Position = UDim2.new(0.699999988, 0, 0, 0);
  184. Size = UDim2.new(0.300000012, 0, 1, 0);
  185. Text = "[EXAMPLE]";
  186. TextColor3 = Color3.new(0.839216, 0.839216, 0.839216);
  187. Font = Enum.Font.SciFi;
  188. FontSize = Enum.FontSize.Size14;
  189. TextStrokeColor3 = Color3.new(0.380392, 0.380392, 0.380392);
  190. TextStrokeTransparency = 0;
  191. Transparency = 0.5
  192. }
  193.  
  194. local UIListLayout = create('UIListLayout', ScrollingFrame){
  195. Padding = UDim.new(0, 4);
  196. HorizontalAlignment = Enum.HorizontalAlignment.Center
  197. }
  198.  
  199. local UIPadding = create('UIPadding', ScrollingFrame){}
  200.  
  201.  
  202. return create, Main, Frame1, Folder
  203. end
  204.  
  205. local Create, Menu, Button, Chams = FormAssets()
  206. local TDB = false
  207. local EDB = false
  208. local Functions = {
  209. ['Menu'] = function()
  210. Menu['Enabled'] = not (Menu['Enabled']);
  211. end;
  212.  
  213. ['Team Chams'] = function()
  214. if TDB then return end
  215. TDB = true
  216. Settings['TCO'] = not (Settings['TCO'])
  217. if Settings['TCO'] then
  218. Misc['CharFunctions']
  219. ['TCCH'] = function(char)
  220. local Target = Players:GetPlayerFromCharacter(char)
  221. if (Target == Player) or (Target.TeamColor ~= Player.TeamColor) then return end
  222.  
  223. local Folder = Chams['Team']:FindFirstChild(Target['Name'])
  224. or Create('Folder', Chams['Team']){Name = Target['Name']}
  225.  
  226. for __, part in next, (char:GetChildren()) do
  227. if part:IsA('BasePart') then
  228. Create('BoxHandleAdornment', Folder)
  229. {
  230. Name = part.Name .. '_CHAM';
  231. Color3 = Settings['TCC'][2];
  232. AlwaysOnTop = true;
  233. Transparency = Settings['CT'];
  234. Visible = true;
  235. ZIndex = 10;
  236.  
  237. Size = (part['Name'] == 'Head' and Vector3.new(1.25, 1.3, 1.25))
  238. or (Vector3.new(.5, .5, .5) + part.Size)
  239. }['Adornee'] = part
  240. end
  241. end
  242. end
  243. elseif Misc['CharFunctions']['TCCH'] then
  244. Misc['CharFunctions']['TCCH'] = nil
  245. Chams['Team']:ClearAllChildren()
  246. end
  247. TDB = false
  248. end;
  249.  
  250. ['Enemy Chams'] = function()
  251. if EDB then return end
  252. EDB = true
  253. Settings['ECO'] = not (Settings['ECO'])
  254. if Settings['ECO'] then
  255. Misc['CharFunctions']
  256. ['ECCH'] = function(char)
  257. local Target = Players:GetPlayerFromCharacter(char)
  258. if (Target == Player) or (Target.TeamColor == Player.TeamColor) then return end
  259.  
  260. local Folder = Chams['Enemy']:FindFirstChild(Target['Name'])
  261. or Create('Folder', Chams['Enemy']){Name = Target['Name']}
  262.  
  263. for __, part in next, (char:GetChildren()) do
  264. if part:IsA('BasePart') then
  265. Create('BoxHandleAdornment', Folder)
  266. {
  267. Name = part.Name .. '_CHAM';
  268. Color3 = Settings['ECC'][2];
  269. AlwaysOnTop = true;
  270. Transparency = Settings['CT'];
  271. Visible = true;
  272. ZIndex = 10;
  273.  
  274. Size = (part['Name'] == 'Head' and Vector3.new(1.25, 1.3, 1.25))
  275. or (Vector3.new(.5, .5, .5) + part.Size)
  276. }['Adornee'] = part
  277. end
  278. end
  279. end
  280. elseif Misc['CharFunctions']['ECCH'] then
  281. Misc['CharFunctions']['ECCH'] = nil
  282. Chams['Enemy']:ClearAllChildren()
  283. end
  284. EDB = false
  285. end;
  286.  
  287. ['Chams Transparency'] = function(t)
  288. if t then
  289. local Trans = Settings['CT']
  290. Settings['CT'] = (Trans < .8 and Trans + (1/10)) or 0
  291. end
  292.  
  293. local TeamCham = Chams['Team']:GetChildren()
  294. local EnemyCham = Chams['Enemy']:GetChildren()
  295.  
  296. for __, object in next, (TeamCham) do
  297. for __, bha in next, (object:GetChildren()) do
  298. bha.Transparency = Settings['CT']
  299. bha.Color3 = Settings['TCC'][2]
  300. end
  301. end
  302.  
  303. for __, object in next, (EnemyCham) do
  304. for __, bha in next, (object:GetChildren()) do
  305. bha.Transparency = Settings['CT']
  306. bha.Color3 = Settings['ECC'][2]
  307. end
  308. end
  309.  
  310. Menu['Main']['Buttons']['Frans']['Key'].Text = '[' .. tostring(Settings['CT']) .. ']'
  311. end;
  312.  
  313. ['Fullbright'] = function(Toggle, TextBox)
  314. local Fullbright = Settings.Fullbright
  315. if Toggle then Fullbright.On = not (Fullbright.On); end
  316.  
  317. local function Handle()
  318. local Setting = Fullbright.Options[Fullbright.Current]
  319. local Settings = Fullbright.OptionDefs[Setting]
  320.  
  321.  
  322. TextBox['Text'] = '[' .. Setting .. ']'
  323. Lighting.Ambient = Settings.InAmbience;
  324. Lighting.OutdoorAmbient = Settings.OutAmbience;
  325. Lighting.Brightness = Settings.Brightness;
  326. Lighting.FogStart = Settings.Fog;
  327. Lighting.FogEnd = Settings.Fog;
  328. end
  329.  
  330. if (not Fullbright.On) then
  331. Fullbright.Current = 3
  332. end
  333.  
  334. Handle()
  335. end;
  336.  
  337. ['Aimbot'] = function(l)
  338. l:Destroy()
  339.  
  340. local IgnorePlayersNamed = {NAME=true} -- Name = true or false
  341. --[[
  342. [J] - To go down the list.
  343. [U] - To go up the list.
  344. [H] - To toggle that item in the list.
  345. [RMB] - To aim at your target using the current settings. (THIS UPDATES IN LIVE TIME SO YOU DON'T HAVE TO STOP AIMING FOR IT TO TAKE EFFECT)
  346. --]]
  347.  
  348. local services = setmetatable({
  349. World = game:GetService('Workspace');
  350. Players = game:GetService('Players');
  351. Input = game:GetService('UserInputService');
  352. Run = game:GetService('RunService');
  353. UI = game:GetService('StarterGui');
  354. },{
  355. __index = function(tab,index)
  356. local serv
  357. local ran,err = pcall(function() serv=game:service(index) end)
  358. if ran then
  359. tab[index] = serv
  360. return serv
  361. end
  362. end
  363. })
  364.  
  365. local cre = Create
  366. local ResizeUI = function(ui,downscale,byclass)
  367. if not rawequal(ui['ClassName'],'ScrollingFrame') then return end
  368.  
  369. local count = 0;
  370. for __, asset in next, (ui:GetChildren()) do
  371. if rawequal(asset['ClassName'],byclass) then
  372. count = count + 1
  373. end
  374. end
  375.  
  376. ui['CanvasSize'] = UDim2.new(ui.CanvasSize.X.Scale,ui.CanvasSize.X.Offset,ui.CanvasSize.Y.Scale,downscale*count)
  377. end
  378.  
  379. local wfc, ffc, ffoc, cast, ray = services.World.WaitForChild, services.World.FindFirstChild, services.World.FindFirstChildOfClass, services.World.FindPartOnRayWithIgnoreList, Ray.new
  380. local wfcoc = function(p,class)
  381. local obj
  382. repeat services.Run.RenderStepped:wait()
  383. obj = p:FindFirstChildOfClass(class)
  384. until obj
  385. return obj
  386. end
  387.  
  388. local Client = services.Players.LocalPlayer
  389. local ClientUI = wfc(Client,'PlayerGui')
  390. local ClientMouse = Client:GetMouse()
  391. local ClientModel = Client.Character or Client.CharacterAdded:wait()
  392. local ClientCamera = services.World.CurrentCamera
  393. local ClientHumanoid = wfcoc(ClientModel,'Humanoid')
  394. local ClientActiveUI;
  395.  
  396. local status = {
  397. Enabled = false,
  398. TeamCheck = false,
  399. HeadsOnly = false,
  400. RayCheck = true,
  401. AutoAim = false,
  402. }
  403.  
  404. local function toggle(button)
  405. local option, val = button['Text']:match('(.*):%s*(.*)')
  406. status[option] = not status[option]
  407.  
  408. if status[option] then
  409. button.TextColor3 = Color3.fromRGB(0,255,0)
  410. else
  411. button.TextColor3 = Color3.fromRGB(255,0,0)
  412. end
  413. button.Text = option .. ': ' .. tostring(status[option])
  414. end
  415.  
  416. local selection = {}
  417. local select_pos = 1
  418. local current_pos = 0
  419. local __ = function()
  420. if ffc(game.CoreGui, '___') then return end
  421.  
  422. local GUI = cre('ScreenGui',game:GetService('CoreGui')){
  423. Name = '___';
  424. }
  425.  
  426. local Frame = cre('ScrollingFrame',GUI){
  427. BackgroundTransparency = 1,
  428. BorderSizePixel = 0,
  429.  
  430. Name = 'Options',
  431. Position = UDim2.new(.8,0,.915,0),
  432. Size = UDim2.new(.2,0,0,30),
  433. ZIndex = 10,
  434. ClipsDescendants = true,
  435. CanvasSize = UDim2.new(0,0,0,0),
  436. ScrollBarThickness = 0,
  437. ScrollingEnabled = false,
  438. }
  439.  
  440. local UILL = cre('UIListLayout',Frame){
  441. Name = 'LayoutHandler',
  442. FillDirection = 'Vertical',
  443. HorizontalAlignment = 'Center',
  444. SortOrder = 'LayoutOrder',
  445. VerticalAlignment = 'Top'
  446. }
  447.  
  448. local Template = cre('TextButton',nil){
  449. BackgroundTransparency = 1,
  450. BorderSizePixel = 0,
  451.  
  452. Name = 'Template',
  453. Size = UDim2.new(.9,0,0,30),
  454. Font = 'SciFi',
  455. Text = '',
  456. TextColor3 = Color3.fromRGB(255,255,255),
  457. TextScaled = true,
  458. TextWrapped = true,
  459. }
  460.  
  461. local TSC = cre('UISizeConstraint',Template){
  462. Name = 'TemplateSizeConstraint',
  463. MaxSize = Vector2.new(math.huge,30),
  464. }
  465.  
  466. Frame['ChildAdded']:connect(function()
  467. ResizeUI(Frame,30,'TextButton')
  468. end)
  469.  
  470. local sel_pos = 0
  471. for option, val in next, status do
  472. local tp = Template:Clone()
  473.  
  474. tp.Name = option
  475. tp.Text = option .. ': ' .. tostring(val)
  476.  
  477. if status[option] then
  478. tp.TextColor3 = Color3.fromRGB(0,255,0)
  479. else
  480. tp.TextColor3 = Color3.fromRGB(255,0,0)
  481. end
  482.  
  483. sel_pos = sel_pos + 1
  484. selection[sel_pos] = tp
  485. tp.Parent = Frame
  486. end
  487.  
  488. Frame.CanvasPosition = Vector2.new(0, current_pos)
  489. return Frame
  490. end
  491.  
  492. Client['CharacterAdded']:connect(function(c)
  493. ClientModel = c
  494. ClientHumanoid = wfcoc(ClientModel,'Humanoid')
  495. ClientActiveUI.Parent.Parent = nil
  496. ClientActiveUI = coroutine.wrap(__)()
  497. end)
  498. ClientActiveUI = coroutine.wrap(__)()
  499.  
  500. local right_down, keylogs, inputlogs = nil, {}, {}
  501. services.Input.InputBegan:connect(function(input, procc)
  502. keylogs[input.KeyCode],inputlogs[input.UserInputType] = true, true;
  503.  
  504. if not ClientActiveUI then return end
  505. if keylogs[Enum.KeyCode.U] and current_pos >= 30 then
  506. select_pos = select_pos - 1
  507. current_pos = current_pos - 30
  508. ClientActiveUI.CanvasPosition = Vector2.new(0,current_pos)
  509.  
  510. elseif keylogs[Enum.KeyCode.J] and current_pos < ClientActiveUI.CanvasSize.Y.Offset - 30 then
  511. select_pos = select_pos + 1
  512. current_pos = current_pos + 30
  513. ClientActiveUI.CanvasPosition = Vector2.new(0,current_pos)
  514.  
  515. elseif keylogs[Enum.KeyCode.H] then
  516. if selection[select_pos] then
  517. toggle(selection[select_pos])
  518. end
  519. end
  520. end)
  521. services.Input.InputEnded:connect(function(input, procc)
  522. keylogs[input.KeyCode],inputlogs[input.UserInputType] = false, false;
  523. end)
  524.  
  525. local function GetPlayerFromCharacter(mod)
  526. if not mod:IsA('Model') then return end
  527.  
  528. for __, client in next, services.Players:GetPlayers() do
  529. if rawequal(string.lower(client['Name']):sub(1,#mod['Name']),mod['Name']:lower()) then
  530. return client, client['Name']
  531. end
  532. end
  533. return nil, 'N/A'
  534. end
  535.  
  536. local function Search()
  537. local t = {}
  538. for __, child in next, services.World:GetChildren() do
  539. local UserFromCharacter = GetPlayerFromCharacter(child)
  540. if UserFromCharacter then
  541. if child:IsA('Model') and not rawequal(UserFromCharacter,Client) then
  542. local h = ffoc(child,'Humanoid')
  543. if h and h.Health > 0 then
  544. table.insert(t, {child,UserFromCharacter})
  545. end
  546. end
  547. end
  548. end
  549. return t
  550. end
  551.  
  552. local function cast_ray(p0,p1,blacklist)
  553. local Part
  554. local __=0
  555. repeat
  556. __=__+1
  557. local cond=(p1-p0).magnitude < 999
  558. Part,p0=cast(workspace,ray(p0,cond and p1-p0 or (p1-p0).unit*999),blacklist)
  559. if Part then
  560. if Part.CanCollide==false or Part.Transparency==1 then
  561. blacklist[#blacklist+1]=Part
  562. Part=nil
  563. end
  564. elseif cond or __ > 15 then
  565. break
  566. end
  567. until Part
  568. return Part,p0
  569. end
  570.  
  571. services.Run.RenderStepped:connect(function()
  572. local Storage = {}
  573. if status['Enabled'] and (inputlogs[Enum.UserInputType.MouseButton2] or status['AutoAim']) then
  574. Storage = Search()
  575.  
  576. local dot, face = -1
  577. for __, info in next, (Storage) do
  578. local h = ffc(info[1],'Humanoid')
  579. local skip;
  580.  
  581. if not inputlogs[Enum.UserInputType.MouseButton2] and not status['AutoAim'] then return end
  582. if not info[1] or not info[2] or IgnorePlayersNamed[info[2]['Name']] or ffoc(info[1],'ForceField') then skip = true end
  583. if not ffc(info[1],'HumanoidRootPart') then skip = true end
  584.  
  585. if h and h['Health'] > 0 then
  586. if status['TeamCheck'] then
  587. if Client['TeamColor'] == info[2]['TeamColor'] then
  588. skip = true
  589. end
  590. end
  591.  
  592. if not skip then
  593. local cc = ClientCamera.CFrame
  594. local pos = status['HeadsOnly'] and info[1]['Head'].CFrame.p or info[1]['HumanoidRootPart'].Position
  595. local HitPart=cast_ray(cc.p,pos,{ClientCamera,ClientModel})
  596.  
  597. if not (status['RayCheck'] and HitPart) or info[1]:IsAncestorOf(HitPart) then
  598. local m = (pos-cc.p).unit:Dot(cc.lookVector)
  599. if rawequal(m,m) and m > dot then
  600. dot, face= m, pos
  601. end
  602. end
  603. end
  604. end
  605. end
  606. if face then
  607. ClientCamera.CFrame = CFrame.new(ClientCamera.CFrame.p,face) * CFrame.new(0,0,0.5)
  608. end
  609. end
  610. end)
  611.  
  612. end
  613. }
  614.  
  615. Settings = (function()
  616. local NewSettings = {
  617. --- Chams ---
  618. CT = 0; -- Transparency
  619. TCO = false; -- Team Chams On
  620. ECO = false; -- Enemy Chams On
  621. TCC = GetColor(Misc.ChamsColors, 'Grey'); -- Current Team Chams Color
  622. ECC = GetColor(Misc.ChamsColors, 'Red'); -- Current Enemy Chams Color
  623.  
  624. --- Fullbright ---
  625. Fullbright = {
  626. On = false;
  627. Current = 1;
  628. Options = {'Max','Half','Default'};
  629. OptionDefs = {
  630. Max = {
  631. Fog = 1000000;
  632. Brightness = 10;
  633. InAmbience = Color3.new(1, 1, 1);
  634. OutAmbience = Color3.new(1, 1, 1);
  635. };
  636. Half = {
  637. Fog = 250;
  638. Brightness = 1.5;
  639. InAmbience = Color3.new(0.6, 0.6, 0.6);
  640. OutAmbience = Color3.new(0.6, 0.6, 0.6);
  641. };
  642. Default = {
  643. Fog = Lighting.FogEnd;
  644. Brightness = Lighting.Brightness;
  645. InAmbience = Lighting.Ambient;
  646. OutAmbience = Lighting.OutdoorAmbient;
  647. }
  648. }
  649. }
  650. }
  651.  
  652. for __, option in next, (Settings) do
  653. local NewOption = Button:Clone()
  654. if option[1] == 'Menu' or option[1] == 'Chams Transparency' then
  655. NewOption['Status']['Style'] = 'Custom';
  656. NewOption['Key']['TextStrokeColor3'] = Misc.GUIColors.On
  657. end
  658.  
  659. NewOption['Text'].Text = option[1]:match('COLOR') and (
  660. (option[1]:match('Team') and option[1]:gsub('COLOR', NewSettings.TCC[1])) or
  661. (option[1]:match('Enemy') and option[1]:gsub('COLOR', NewSettings.ECC[1]))
  662. ) or option[1]
  663. NewOption['Key'].Text = '['.. ((typeof(option[3]) == 'EnumItem' and option[3].Name) or option[3]) .. ']'
  664. NewOption.Parent = Menu['Main']['Buttons']
  665.  
  666. if option[1] == 'Chams Transparency' then
  667. NewOption['Name'] = 'Frans'
  668. end
  669.  
  670. local Func, Name = GetFunc(Functions, option[1])
  671. if Func then
  672. NewOption['Text']['MouseButton1Down']:connect(function()
  673. if not option[2] then return end
  674. if NewOption.Status.Style.Name == 'DropShadow' then
  675. NewOption.Status.Style = 'Custom'
  676. elseif NewOption.Status.Style.Name == 'Custom' then
  677. NewOption.Status.Style = 'DropShadow'
  678. end
  679.  
  680. if option[1]:match('Aimbot') then
  681. Func(NewOption)
  682.  
  683. elseif option[1]:match('Fullbright') then
  684. Func(true, NewOption['Key'])
  685.  
  686. else
  687. Func()
  688. end
  689. end)
  690. if option[3] == 'Toggle' then
  691. if Name:match('Team') then
  692. NewOption['Key']['MouseButton1Down']:connect(function()
  693. local Tab, Pos = GetColor(Misc.ChamsColors, NewSettings.TCC[2])
  694. if (Pos + 1) < #Misc.ChamsColors then
  695. NewOption['Text'].Text = NewOption['Text'].Text:gsub(NewSettings.TCC[1], Misc.ChamsColors[Pos + 1][1])
  696. NewSettings.TCC = Misc.ChamsColors[Pos + 1]
  697. else
  698. NewOption['Text'].Text = NewOption['Text'].Text:gsub(NewSettings.TCC[1], Misc.ChamsColors[1][1])
  699. NewSettings.TCC = Misc.ChamsColors[1]
  700. end
  701.  
  702. GetFunc(Functions, 'Chams Transparency')()
  703. end)
  704. elseif Name:match('Enemy') then
  705. NewOption['Key']['MouseButton1Down']:connect(function()
  706. local Tab, Pos = GetColor(Misc.ChamsColors, NewSettings.ECC[2])
  707. if (Pos + 1) < #Misc.ChamsColors then
  708. NewOption['Text'].Text = NewOption['Text'].Text:gsub(NewSettings.ECC[1], Misc.ChamsColors[Pos + 1][1])
  709. NewSettings.ECC = Misc.ChamsColors[Pos + 1]
  710. else
  711. NewOption['Text'].Text = NewOption['Text'].Text:gsub(NewSettings.ECC[1], Misc.ChamsColors[1][1])
  712. NewSettings.ECC = Misc.ChamsColors[1]
  713. end
  714.  
  715. GetFunc(Functions, 'Chams Transparency')()
  716. end)
  717. end
  718.  
  719. elseif option[1] == 'Chams Transparency' then
  720. NewOption['Key']['MouseButton1Down']:connect(function()
  721. GetFunc(Functions, 'Chams Transparency')(true)
  722. end)
  723.  
  724. elseif option[1] == 'Fullbright' then
  725. NewOption['Key']['MouseButton1Down']:connect(function()
  726. local Fullbright = Settings.Fullbright
  727. if not Fullbright.On then return end
  728. if Fullbright.Current < #Fullbright.Options then
  729. Fullbright.Current = Fullbright.Current + 1
  730. else
  731. Fullbright.Current = 1
  732. end
  733. GetFunc(Functions, 'Fullbright')(false, NewOption['Key'])
  734. end)
  735.  
  736. end
  737. end
  738. end
  739. return NewSettings
  740. end)()
  741.  
  742. setmetatable(Misc['CharFunctions'], {
  743. __newindex = function(s, i, v)
  744. rawset(Misc['CharFunctions'], i, v)
  745. for __, player in next, (Players:GetPlayers()) do
  746. if player.Character then
  747. v(player.Character)
  748. end
  749. end
  750. end
  751. })
  752.  
  753. local CharFix = function(char)
  754. local Target = Players:GetPlayerFromCharacter(char)
  755. local Team = Chams['Team']:FindFirstChild(Target['Name'])
  756. local Enemy = Chams['Enemy']:FindFirstChild(Target['Name'])
  757.  
  758. if Team then
  759. for __, handle in next, (Team:GetChildren()) do
  760. if handle['Adornee'] and not handle['Adornee']:IsDescendantOf(game) then
  761. handle['Parent'] = nil
  762. end
  763. end
  764. end
  765.  
  766. if Enemy then
  767. for __, handle in next, (Enemy:GetChildren()) do
  768. if handle['Adornee'] and not handle['Adornee']:IsDescendantOf(game) then
  769. handle['Parent'] = nil
  770. end
  771. end
  772. end
  773. end
  774.  
  775. local CharAbuse = function(char) wait()
  776. for __, func in next, (Misc['CharFunctions']) do
  777. coroutine.wrap(func)(char)
  778. end
  779.  
  780. char['Changed']:connect(function(prop)
  781. if (prop == 'Parent') then
  782. CharFix(char)
  783. end
  784. end)
  785. end
  786.  
  787. for __, player in next, (Players:GetPlayers()) do
  788. player['CharacterAdded']:connect(CharAbuse)
  789. end
  790.  
  791. Players.PlayerAdded:connect(function(Client)
  792. Client['CharacterAdded']:connect(CharAbuse)
  793. end)
  794.  
  795. Players.PlayerRemoving:connect(function(Client)
  796. local Team = Chams['Team']:FindFirstChild(Client['Name'])
  797. local Enemy = Chams['Enemy']:FindFirstChild(Client['Name'])
  798.  
  799. if Team then Team['Parent'] = nil end
  800. if Enemy then Enemy['Parent'] = nil end
  801. end)
  802.  
  803. Input['InputBegan']:connect(function(input, og)
  804. if og then return end
  805.  
  806. if input.UserInputType == Enum.UserInputType.Keyboard then
  807. if input.KeyCode == Enum.KeyCode.Delete then
  808. Functions['Menu']()
  809. end
  810. end
  811. end)
  812.  
  813. Menu.Parent = game.CoreGui
Add Comment
Please, Sign In to add comment