Advertisement
Guest User

esp / chams for roblox XD

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