Advertisement
Xfer1111

Roblox ESP Script

Sep 3rd, 2019
50,132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.19 KB | None | 0 0
  1. crashy = true
  2. on = false
  3. if game.CoreGui:FindFirstChild('ESP') then
  4.     game.CoreGui.ESP:Destroy()
  5. elseif game.Players.LocalPlayer.PlayerGui:FindFirstChild('ESP') then
  6.     game.Players.LocalPlayer.PlayerGui.ESP:Destroy()
  7. end
  8.  
  9. function doit(hey)
  10.     local t1 = Instance.new('SurfaceGui',hey)
  11.     t1.AlwaysOnTop = true
  12.     local t1g = Instance.new('Frame',t1)
  13.     t1g.Size = UDim2.new(1,0,1,0)
  14.     t1g.BackgroundColor3 = t1.Parent.BrickColor.Color
  15.     local t2 = Instance.new('SurfaceGui',hey)      
  16.     t2.AlwaysOnTop = true
  17.     t2.Face = Enum.NormalId.Right
  18.     local t2g = Instance.new('Frame',t2)
  19.     t2g.Size = UDim2.new(1,0,1,0)
  20.     t2g.BackgroundColor3 = t2.Parent.BrickColor.Color
  21.     local t3 = Instance.new('SurfaceGui',hey)
  22.     t3.AlwaysOnTop = true
  23.     t3.Face = Enum.NormalId.Left
  24.     local t3g = Instance.new('Frame',t3)
  25.     t3g.Size = UDim2.new(1,0,1,0)
  26.     t3g.BackgroundColor3 = t3.Parent.BrickColor.Color
  27.     local t4 = Instance.new('SurfaceGui',hey)
  28.     t4.AlwaysOnTop = true
  29.     t4.Face = Enum.NormalId.Back
  30.     local t4g = Instance.new('Frame',t4)
  31.     t4g.Size = UDim2.new(1,0,1,0)
  32.     t4g.BackgroundColor3 = t4.Parent.BrickColor.Color
  33.     local t5 = Instance.new('SurfaceGui',hey)
  34.     t5.AlwaysOnTop = true
  35.     t5.Face = Enum.NormalId.Top
  36.     local t5g = Instance.new('Frame',t5)
  37.     t5g.Size = UDim2.new(1,0,1,0)
  38.     t5g.BackgroundColor3 = t5.Parent.BrickColor.Color
  39.     local t6 = Instance.new('SurfaceGui',hey)
  40.     t6.AlwaysOnTop = true
  41.     t6.Face = Enum.NormalId.Bottom
  42.     local t6g = Instance.new('Frame',t6)
  43.     t6g.Size = UDim2.new(1,0,1,0)
  44.     t6g.BackgroundColor3 = t6.Parent.BrickColor.Color
  45. end
  46. function undo(chr)
  47.     for i,v in pairs(chr:GetChildren()) do
  48.         if v.ClassName == "Part" or v.ClassName == "MeshPart" then
  49.             for a,c in pairs(v:GetChildren()) do
  50.                 if c.ClassName == "SurfaceGui" then
  51.                     c:Destroy()
  52.                 end
  53.                 if c.ClassName == "BillboardGui" and c.Name == "thingyye" then
  54.                     c:Destroy()
  55.                 end
  56.             end
  57.         end
  58.     end
  59. end
  60.  
  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 = "6x6x6x_Xfer's 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.     if v.Character ~= nil then
  95.         undo(v.Character)
  96.     end
  97. end
  98.  
  99. but.MouseButton1Down:connect(function()
  100. if but.Text == "ESP On" then
  101. but.Text = "ESP Off"
  102. on = true
  103. for i,v in pairs(game.Players:GetChildren()) do
  104.     if v.Character ~= game.Players.LocalPlayer.Character and v.Character.Head:FindFirstChild('ScreenGui') == nil then
  105.         if v.Character:FindFirstChild('Head') then
  106.             local bill = Instance.new('BillboardGui',v.Character.Head)
  107.             bill.Name = "thingyye"
  108.             bill.AlwaysOnTop = true
  109.             bill.Size = UDim2.new(2,1,2)
  110.             bill.Adornee = v.Character.Head
  111.             local txt = Instance.new('TextLabel',bill)
  112.             txt.Text = v.Name
  113.             txt.BackgroundTransparency = 1
  114.             txt.Size = UDim2.new(1,0,1,0)
  115.             txt.TextColor3 = v.TeamColor.Color
  116.         end
  117.         for a,c in pairs(v.Character:GetChildren()) do
  118.             if c.ClassName == "MeshPart" and c.Transparency ~= 1 then
  119.                 doit(c)
  120.             elseif c.ClassName == "Part" and c.Transparency ~= 1 then
  121.             doit(c)
  122.             end
  123.         end
  124.     end
  125. end
  126. else
  127.     but.Text = "ESP On"
  128.     on = false
  129.     for i,v in pairs(game.Players:GetChildren()) do
  130.         undo(v.Character)
  131.     end
  132. end
  133. end)
  134.  
  135. for i,v in pairs(game.Players:GetChildren()) do
  136.     v.CharacterAdded:connect(function()
  137.     v.Character:WaitForChild('Head')
  138.     wait(1)
  139.     if on == true then
  140.     if v.Character ~= game.Players.LocalPlayer.Character and v.Character.Head:FindFirstChild('ScreenGui') == nil then
  141.         if v.Character:FindFirstChild('Head') then
  142.             local bill = Instance.new('BillboardGui',v.Character.Head)
  143.             bill.Name = "thingyye"
  144.             bill.AlwaysOnTop = true
  145.             bill.Size = UDim2.new(2,1,2)
  146.             bill.Adornee = v.Character.Head
  147.             local txt = Instance.new('TextLabel',bill)
  148.             txt.Text = v.Name
  149.             txt.BackgroundTransparency = 1
  150.             txt.Size = UDim2.new(1,0,1,0)
  151.             txt.TextColor3 = v.TeamColor.Color
  152.         end
  153.         for a,c in pairs(v.Character:GetChildren()) do
  154.             if c.ClassName == "MeshPart" and c.Transparency ~= 1 then
  155.                 doit(c)
  156.             elseif c.ClassName == "Part" and c.Transparency ~= 1 then
  157.             doit(c)
  158.             end
  159.         end
  160.     end
  161.     end
  162.     end)
  163. end  
  164.  
  165. game.Players.PlayerAdded:connect(function(v)
  166. v.CharacterAdded:connect(function()
  167.     v.Character:WaitForChild('Head')
  168.     wait(1)
  169.     if on == true then
  170.     if v.Character ~= game.Players.LocalPlayer.Character and v.Character.Head:FindFirstChild('ScreenGui') == nil then
  171.         if v.Character:FindFirstChild('Head') then
  172.             local bill = Instance.new('BillboardGui',v.Character.Head)
  173.             bill.Name = "thingyye"
  174.             bill.AlwaysOnTop = true
  175.             bill.Size = UDim2.new(2,1,2)
  176.             bill.Adornee = v.Character.Head
  177.             local txt = Instance.new('TextLabel',bill)
  178.             txt.Text = v.Name
  179.             txt.BackgroundTransparency = 1
  180.             txt.Size = UDim2.new(1,0,1,0)
  181.             txt.TextColor3 = v.TeamColor.Color
  182.         end
  183.         for a,c in pairs(v.Character:GetChildren()) do
  184.             if c.ClassName == "MeshPart" and c.Transparency ~= 1 then
  185.                 doit(c)
  186.             elseif c.ClassName == "Part" and c.Transparency ~= 1 then
  187.             doit(c)
  188.             end
  189.         end
  190.     end
  191.     end
  192.     end)
  193. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement