Advertisement
LynXS_

Esp

May 17th, 2024
458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.44 KB | None | 0 0
  1. --[[
  2.     WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk!
  3. ]]
  4. local lPlayer = game.Players.LocalPlayer;
  5. local lTeam = lPlayer.TeamColor;
  6. local mode = 1;
  7. local speed = .7; -- CFrame interpolation every second.
  8. local aimToggle = false;
  9. local enemyColor = BrickColor.Red();
  10. local friendlyColor = BrickColor.Blue();
  11.  
  12. function onKeyPress(inputObject, gameProcessedEvent)
  13.     if inputObject.KeyCode == Enum.KeyCode.RightAlt then
  14.         if aimToggle == false then
  15.             --aimToggle = true;
  16.         else
  17.             --aimToggle = false;
  18.         end
  19.     end
  20.     if inputObject.KeyCode == Enum.KeyCode.RightControl then
  21.         if mode == 1 then
  22.             mode = 0;
  23.             for i,v in pairs(game.Players:GetChildren()) do
  24.                 if v ~= lPlayer then
  25.                     if game.Workspace:FindFirstChild(v.Name) ~= nil then
  26.                         if v.Character:FindFirstChild("Torso") ~= nil then
  27.                             v.Character.Torso.eP.Frame.Visible = false;
  28.                         end
  29.                         for t,x in pairs(v.Character:GetChildren()) do
  30.                             if x.ClassName == "Part" then
  31.                                 if v.Character:FindFirstChild("Head") ~= nil then
  32.                                     if v.Character.Head:FindFirstChild("1") ~= nil then
  33.                                         for l=1,6 do
  34.                                             x:FindFirstChild(l).Frame.Visible = true;
  35.                                         end
  36.                                     end
  37.                                 end
  38.                             end
  39.                         end
  40.                     end
  41.                 end
  42.             end
  43.         elseif mode == 0 then
  44.             mode = 1;
  45.             for i,v in pairs(game.Players:GetChildren()) do
  46.                 if v ~= lPlayer then
  47.                     if game.Workspace:FindFirstChild(v.Name) ~= nil then
  48.                         if v.Character:FindFirstChild("Torso") ~= nil then
  49.                             v.Character.Torso.eP.Frame.Visible = true;
  50.                         end
  51.                         for t,x in pairs(v.Character:GetChildren()) do
  52.                             if x.ClassName == "Part" then
  53.                                 if v.Character:FindFirstChild("Head") ~= nil then
  54.                                     if v.Character.Head:FindFirstChild("1") ~= nil then
  55.                                         for l=1,6 do
  56.                                             x:FindFirstChild(l).Frame.Visible = false;
  57.                                         end
  58.                                     end
  59.                                 end
  60.                             end
  61.                         end
  62.                     end
  63.                 end
  64.             end
  65.         end
  66.     end
  67. end
  68.  
  69. game:GetService("UserInputService").InputBegan:connect(onKeyPress)
  70.  
  71. local function ClosestPlayer(point)
  72.     local OnTarget = false;
  73.     local CurDis = nil;
  74.     local CurPlayer = nil;
  75.     for i,v in pairs(game.Players:GetChildren()) do
  76.         if v ~= lPlayer then
  77.             if CurDis == nil then
  78.                 CurDis = v:DistanceFromCharacter(lPlayer.Character.Torso.Position);
  79.                 CurPlayer = v;
  80.             else
  81.                 if v:DistanceFromCharacter(lPlayer.Character.Torso.Position) < CurDis then
  82.                     CurDis = v:DistanceFromCharacter(lPlayer.Character.Torso.Position);
  83.                     CurPlayer = v;
  84.                 end
  85.             end
  86.         end
  87.     end
  88.     while aimToggle == true do
  89.         for i = 0, 1, .01 do
  90.             game.Workspace.CurrentCamera.CFrame = CFrame.new(Vector3.new(game.Workspace.CurrentCamera.CFrame.X,game.Workspace.CurrentCamera.CFrame.Y,game.Workspace.CurrentCamera.CFrame.Z), CurPlayer.Character.Torso.Position);
  91.         end
  92.     end
  93. end
  94.  
  95. while true do
  96.     for i,v in pairs(game.Players:GetChildren()) do
  97.         local vChar = game.Workspace:WaitForChild(v.Name);
  98.         if vChar.Torso:FindFirstChild("eP") == nil and v ~= lPlayer then
  99.             local fLayer = Instance.new("BillboardGui");
  100.             fLayer.Name = "eP";
  101.             fLayer.Size = UDim2.new(8,0,8,0);
  102.             fLayer.SizeOffset = Vector2.new(.5,-.55);
  103.             fLayer.LightInfluence = 0;
  104.             fLayer.AlwaysOnTop = true;
  105.             fLayer.Adornee = vChar:WaitForChild("Torso");
  106.             fLayer.Parent = vChar.Torso;
  107.             local sLayer = Instance.new("Frame");
  108.             sLayer.BackgroundTransparency = .5;
  109.             sLayer.AnchorPoint = Vector2.new(.5,.5);
  110.             if v.TeamColor == lTeam then
  111.                 sLayer.BackgroundColor = BrickColor.Blue();
  112.             else
  113.                 sLayer.BackgroundColor = BrickColor.Red();
  114.             end
  115.             sLayer.BorderSizePixel = 0;
  116.             sLayer.Size = UDim2.new(.5,0,.7,0);
  117.             sLayer.Parent = fLayer;
  118.             if mode == 0 then
  119.                 sLayer.Visible = false;
  120.             end
  121.             local fhLayer = Instance.new("BillboardGui");
  122.             fhLayer.Name = "ePh";
  123.             fhLayer.Size = UDim2.new(8,0,8,0);
  124.             fhLayer.SizeOffset = Vector2.new(.25,-.13);
  125.             fhLayer.LightInfluence = 0;
  126.             fhLayer.AlwaysOnTop = true;
  127.             fhLayer.Adornee = vChar:WaitForChild("Torso");
  128.             fhLayer.Parent = vChar.Torso;
  129.             local health = Instance.new("Frame");
  130.             health.AnchorPoint = Vector2.new(0,.5);
  131.             health.Name = "health";
  132.             health.BorderSizePixel = 0;
  133.             health.BackgroundColor3 = Color3.fromRGB(255,0,0);
  134.             health.Size = UDim2.new((v.Character.Humanoid.Health/v.Character.Humanoid.MaxHealth)/2,0,.05,0);
  135.             health.Parent = fhLayer;
  136.             local fnLayer = Instance.new("BillboardGui");
  137.             fnLayer.Name = "ePn";
  138.             fnLayer.Size = UDim2.new(8,0,8,0);
  139.             fnLayer.SizeOffset = Vector2.new(.25,0);
  140.             fnLayer.LightInfluence = 0;
  141.             fnLayer.AlwaysOnTop = true;
  142.             fnLayer.Adornee = vChar:WaitForChild("Torso");
  143.             fnLayer.Parent = vChar.Torso;
  144.             local name = Instance.new("TextLabel");
  145.             name.AnchorPoint = Vector2.new(0,.5);
  146.             name.Name = "txtlabel";
  147.             name.BorderSizePixel = 0;
  148.             name.BackgroundTransparency = 1;
  149.             name.Size = UDim2.new(.5,0,.05,0);
  150.             name.Position = UDim2.new(0,0,0,0);
  151.             name.TextScaled = true;
  152.             name.Text = v.Name;
  153.             name.TextColor3 = Color3.fromRGB(sLayer.BackgroundColor.r,sLayer.BackgroundColor.g,sLayer.BackgroundColor.b);
  154.             name.Parent = fnLayer;
  155.             for x,t in pairs(vChar:GetChildren()) do
  156.                 if t.ClassName == "Part" then
  157.                     for l = 1, 6 do
  158.                         local headLayer = Instance.new("SurfaceGui");
  159.                         headLayer.Name = l;
  160.                         headLayer.LightInfluence = 0;
  161.                         headLayer.AlwaysOnTop = true;
  162.                         headLayer.Adornee = vChar:WaitForChild(t.Name);
  163.                         headLayer.Parent = t;
  164.                         if l==1 then
  165.                             headLayer.Face = "Front";
  166.                         elseif l==2 then
  167.                             headLayer.Face = "Right";
  168.                         elseif l==3 then
  169.                             headLayer.Face = "Left";
  170.                         elseif l==4 then
  171.                             headLayer.Face = "Back";
  172.                         elseif l==5 then
  173.                             headLayer.Face = "Top";
  174.                         elseif l==6 then
  175.                             headLayer.Face = "Bottom";
  176.                         end
  177.                         local xLayer = Instance.new("Frame");
  178.                         xLayer.BackgroundTransparency = .5;
  179.                         xLayer.AnchorPoint = Vector2.new(0,0);
  180.                         if v.TeamColor == lTeam then
  181.                             xLayer.BackgroundColor = BrickColor.Blue();
  182.                         else
  183.                             xLayer.BackgroundColor = BrickColor.Red();
  184.                         end
  185.                         xLayer.BorderSizePixel = 0;
  186.                         xLayer.Size = UDim2.new(1,0,1,0);
  187.                         xLayer.Parent = headLayer;
  188.                         if mode == 1 then
  189.                             xLayer.Visible = false;
  190.                         end
  191.                     end
  192.                 end
  193.             end
  194.         else
  195.             if v ~= lPlayer then
  196.                 v.Character.Torso.ePh.health.Size = UDim2.new((v.Character.Humanoid.Health/v.Character.Humanoid.MaxHealth)/2,0,.05,0);
  197.             end
  198.         end
  199.     end
  200.     wait(.3);
  201. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement