Advertisement
UnknownExploiter

ESP

Jun 2nd, 2020
740
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.91 KB | None | 0 0
  1. --< press x to toggle gui on/off >--
  2.  
  3. crashy = false
  4. on = true
  5. if game.CoreGui:FindFirstChild('ESP') then
  6.     game.CoreGui.ESP:Destroy()
  7. elseif game.Players.LocalPlayer.PlayerGui:FindFirstChild('ESP') then
  8.     game.Players.LocalPlayer.PlayerGui.ESP:Destroy()
  9. end
  10. function doit(hey)
  11.     local t1 = Instance.new('SurfaceGui',hey)
  12.     t1.AlwaysOnTop = true
  13.     local t1g = Instance.new('Frame',t1)
  14.     t1g.Size = UDim2.new(1,0,1,0)
  15.     t1g.BackgroundColor3 = t1.Parent.BrickColor.Color
  16.     local t2 = Instance.new('SurfaceGui',hey)      
  17.     t2.AlwaysOnTop = true
  18.     t2.Face = Enum.NormalId.Right
  19.     local t2g = Instance.new('Frame',t2)
  20.     t2g.Size = UDim2.new(1,0,1,0)
  21.     t2g.BackgroundColor3 = t2.Parent.BrickColor.Color
  22.     local t3 = Instance.new('SurfaceGui',hey)
  23.     t3.AlwaysOnTop = true
  24.     t3.Face = Enum.NormalId.Left
  25.     local t3g = Instance.new('Frame',t3)
  26.     t3g.Size = UDim2.new(1,0,1,0)
  27.     t3g.BackgroundColor3 = t3.Parent.BrickColor.Color
  28.     local t4 = Instance.new('SurfaceGui',hey)
  29.     t4.AlwaysOnTop = true
  30.     t4.Face = Enum.NormalId.Back
  31.     local t4g = Instance.new('Frame',t4)
  32.     t4g.Size = UDim2.new(1,0,1,0)
  33.     t4g.BackgroundColor3 = t4.Parent.BrickColor.Color
  34.     local t5 = Instance.new('SurfaceGui',hey)
  35.     t5.AlwaysOnTop = true
  36.     t5.Face = Enum.NormalId.Top
  37.     local t5g = Instance.new('Frame',t5)
  38.     t5g.Size = UDim2.new(1,0,1,0)
  39.     t5g.BackgroundColor3 = t5.Parent.BrickColor.Color
  40.     local t6 = Instance.new('SurfaceGui',hey)
  41.     t6.AlwaysOnTop = true
  42.     t6.Face = Enum.NormalId.Bottom
  43.     local t6g = Instance.new('Frame',t6)
  44.     t6g.Size = UDim2.new(1,0,1,0)
  45.     t6g.BackgroundColor3 = t6.Parent.BrickColor.Color
  46. end
  47. function undo(chr)
  48.     for i,v in pairs(chr:GetChildren()) do
  49.         if v.ClassName == "Part" or v.ClassName == "MeshPart" then
  50.             for a,c in pairs(v:GetChildren()) do
  51.                 if c.ClassName == "SurfaceGui" then
  52.                     c:Destroy()
  53.                 end
  54.                 if c.ClassName == "BillboardGui" and c.Name == "thingyye" then
  55.                     c:Destroy()
  56.                 end
  57.             end
  58.         end
  59.     end
  60. end
  61. local gui = Instance.new('ScreenGui')
  62. if crashy == false then
  63.     gui.Parent = game.CoreGui
  64. else
  65.     gui.Parent = game.Players.LocalPlayer.PlayerGui
  66. end
  67. gui.Name = "ESP"
  68. gui.ResetOnSpawn = false
  69. local frame = Instance.new('Frame',gui)
  70. frame.Size = UDim2.new(0.2,0,0.3,0)
  71. frame.Position = UDim2.new(0,0,0.9,0)
  72. frame.BackgroundTransparency = 0.5
  73. frame.BackgroundColor3 = Color3.fromRGB(131,182,239)
  74. frame.BorderSizePixel = 4
  75. frame.BorderColor3 = Color3.fromRGB(66,134,244)
  76. frame.Active = true
  77. frame.Draggable = true
  78. local txt = Instance.new('TextLabel',frame)
  79. txt.Text = "ESP Gui"
  80. txt.TextColor3 = Color3.fromRGB(255,255,255)
  81. txt.Size = UDim2.new(1,0,0.3,0)
  82. txt.TextScaled = true
  83. txt.BackgroundTransparency = 1
  84. local but = Instance.new('TextButton',frame)
  85. but.Text = "ESP On"
  86. but.TextColor3 = Color3.fromRGB(255,255,255)
  87. but.Size = UDim2.new(0.7,0,0.3,0)
  88. but.Position = UDim2.new(0.15,0,0.5,0)
  89. but.BorderSizePixel = 0
  90. but.TextScaled = true
  91. but.BackgroundColor3 = Color3.fromRGB(66,134,244)
  92. but.BackgroundTransparency = 0.4
  93. for i,v in pairs(game.Players:GetChildren()) do
  94.     undo(v.Character)
  95. end
  96. but.MouseButton1Down:connect(function()
  97. if but.Text == "ESP On" then
  98. but.Text = "ESP Off"
  99. on = true
  100. for i,v in pairs(game.Players:GetChildren()) do
  101.     if v.Character ~= game.Players.LocalPlayer.Character and v.Character.Head:FindFirstChild('ScreenGui') == nil then
  102.         if v.Character:FindFirstChild('Head') then
  103.             local bill = Instance.new('BillboardGui',v.Character.Head)
  104.             bill.Name = "thingyye"
  105.             bill.AlwaysOnTop = true
  106.             bill.Size = UDim2.new(2,1,2)
  107.             bill.Adornee = v.Character.Head
  108.             local txt = Instance.new('TextLabel',bill)
  109.             txt.Text = v.Name
  110.             txt.BackgroundTransparency = 1
  111.             txt.Size = UDim2.new(1,0,1,0)
  112.             txt.TextColor3 = v.TeamColor.Color
  113.         end
  114.         for a,c in pairs(v.Character:GetChildren()) do
  115.             if c.ClassName == "MeshPart" and c.Transparency ~= 1 then
  116.                 doit(c)
  117.             elseif c.ClassName == "Part" and c.Transparency ~= 1 then
  118.             doit(c)
  119.             end
  120.         end
  121.     end
  122. end
  123. else
  124.     but.Text = "ESP On"
  125.     on = false
  126.     for i,v in pairs(game.Players:GetChildren()) do
  127.         undo(v.Character)
  128.     end
  129. end
  130. end)
  131. for i,v in pairs(game.Players:GetChildren()) do
  132.     v.CharacterAdded:connect(function()
  133.     v.Character:WaitForChild('Head')
  134.     wait(1)
  135.     if on == true then
  136.     if v.Character ~= game.Players.LocalPlayer.Character and v.Character.Head:FindFirstChild('ScreenGui') == nil then
  137.         if v.Character:FindFirstChild('Head') then
  138.             local bill = Instance.new('BillboardGui',v.Character.Head)
  139.             bill.Name = "thingyye"
  140.             bill.AlwaysOnTop = true
  141.             bill.Size = UDim2.new(2,1,2)
  142.             bill.Adornee = v.Character.Head
  143.             local txt = Instance.new('TextLabel',bill)
  144.             txt.Text = v.Name
  145.             txt.BackgroundTransparency = 1
  146.             txt.Size = UDim2.new(1,0,1,0)
  147.             txt.TextColor3 = v.TeamColor.Color
  148.         end
  149.         for a,c in pairs(v.Character:GetChildren()) do
  150.             if c.ClassName == "MeshPart" and c.Transparency ~= 1 then
  151.                 doit(c)
  152.             elseif c.ClassName == "Part" and c.Transparency ~= 1 then
  153.             doit(c)
  154.             end
  155.         end
  156.     end
  157.     end
  158.     end)
  159. end  
  160. game.Players.PlayerAdded:connect(function(v)
  161. v.CharacterAdded:connect(function()
  162.     v.Character:WaitForChild('Head')
  163.     wait(1)
  164.     if on == true then
  165.     if v.Character ~= game.Players.LocalPlayer.Character and v.Character.Head:FindFirstChild('ScreenGui') == nil then
  166.         if v.Character:FindFirstChild('Head') then
  167.             local bill = Instance.new('BillboardGui',v.Character.Head)
  168.             bill.Name = "thingyye"
  169.             bill.AlwaysOnTop = true
  170.             bill.Size = UDim2.new(2,1,2)
  171.             bill.Adornee = v.Character.Head
  172.             local txt = Instance.new('TextLabel',bill)
  173.             txt.Text = v.Name
  174.             txt.BackgroundTransparency = 1
  175.             txt.Size = UDim2.new(1,0,1,0)
  176.             txt.TextColor3 = v.TeamColor.Color
  177.         end
  178.         for a,c in pairs(v.Character:GetChildren()) do
  179.             if c.ClassName == "MeshPart" and c.Transparency ~= 1 then
  180.                 doit(c)
  181.             elseif c.ClassName == "Part" and c.Transparency ~= 1 then
  182.             doit(c)
  183.             end
  184.         end
  185.     end
  186.     end
  187.     end)
  188. end)
  189. local player = game:GetService("Players").LocalPlayer
  190. local mouse = player:GetMouse()
  191. mouse.KeyDown:Connect(function(key)
  192.     if(key == "x") then
  193.         if frame.Visible == true then
  194.             frame.Visible = false
  195.         elseif frame.Visible == false then
  196.             frame.Visible = true
  197.         end
  198.     end
  199. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement