Burkino

FPS Hacks

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