Advertisement
Guest User

Untitled

a guest
Jan 19th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.13 KB | None | 0 0
  1. local toggleKey = "z"
  2. local crashy = true -- CHANGE THIS TO TRUE IF IT CRASHES THIS GAME
  3. local on = false
  4. if game.CoreGui:FindFirstChild('ESP') then
  5. game.CoreGui.ESP:Destroy()
  6. elseif game.CoreGui:FindFirstChild('ESP') then
  7. game.CoreGui.ESP:Destroy()
  8. end
  9.  
  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.  
  62. local gui = Instance.new('ScreenGui')
  63. if crashy == false then
  64. gui.Parent = game.CoreGui
  65. else
  66. gui.Parent = game.CoreGui
  67. end
  68. gui.Name = "ESP"
  69. gui.ResetOnSpawn = false
  70. local frame = Instance.new('Frame',gui)
  71. frame.Size = UDim2.new(0.2,0,0.3,0)
  72. frame.Position = UDim2.new(0,0,0.9,0)
  73. frame.BackgroundTransparency = 0.5
  74. frame.BackgroundColor3 = Color3.fromRGB(131,182,239)
  75. frame.BorderSizePixel = 4
  76. frame.BorderColor3 = Color3.fromRGB(66,134,244)
  77. frame.Active = true
  78. frame.Draggable = true
  79. local txt = Instance.new('TextLabel',frame)
  80. txt.Text = "Mustardfoot's ESP Gui"
  81. txt.TextColor3 = Color3.fromRGB(255,255,255)
  82. txt.Size = UDim2.new(1,0,0.3,0)
  83. txt.TextScaled = true
  84. txt.BackgroundTransparency = 1
  85. local but = Instance.new('TextButton',frame)
  86. but.Text = "ESP On"
  87. but.TextColor3 = Color3.fromRGB(255,255,255)
  88. but.Size = UDim2.new(0.7,0,0.3,0)
  89. but.Position = UDim2.new(0.15,0,0.5,0)
  90. but.BorderSizePixel = 0
  91. but.TextScaled = true
  92. but.BackgroundColor3 = Color3.fromRGB(66,134,244)
  93. but.BackgroundTransparency = 0.4
  94. for i,v in pairs(game.Players:GetChildren()) do
  95. if v.Character ~= nil then
  96. undo(v.Character)
  97. end
  98. end
  99.  
  100. but.MouseButton1Down:connect(function()
  101. if but.Text == "ESP On" then
  102. but.Text = "ESP Off"
  103. on = true
  104. for i,v in pairs(game.Players:GetChildren()) do
  105. if v.Character ~= game.Players.LocalPlayer.Character and v.Character.Head:FindFirstChild('ScreenGui') == nil then
  106. if v.Name ~= game.Players.LocalPlayer.Name then
  107. if v.Character:FindFirstChild('Head') then
  108. local bill = Instance.new('BillboardGui',v.Character.Head)
  109. bill.Name = "thingyye"
  110. bill.AlwaysOnTop = true
  111. bill.Size = UDim2.new(2,1,2)
  112. bill.Adornee = v.Character.Head
  113. local txt = Instance.new('TextLabel',bill)
  114. txt.Text = v.Name
  115. txt.BackgroundTransparency = 1
  116. txt.Size = UDim2.new(1,0,1,0)
  117. txt.TextColor3 = v.TeamColor.Color
  118. end
  119. for a,c in pairs(v.Character:GetChildren()) do
  120. if c.ClassName == "MeshPart" and c.Transparency ~= 1 then
  121. doit(c)
  122. elseif c.ClassName == "Part" and c.Transparency ~= 1 then
  123. doit(c)
  124. end
  125. end
  126. end
  127. end
  128. end
  129. wait()
  130. undo(game.Players.LocalPlayer.Character)
  131. else
  132. but.Text = "ESP On"
  133. on = false
  134. for i,v in pairs(game.Players:GetChildren()) do
  135. if v.Name ~= game.Players.LocalPlayer.Name then
  136. undo(v.Character)
  137. end
  138. end
  139. end
  140. end)
  141.  
  142. for i,v in pairs(game.Players:GetChildren()) do
  143. v.CharacterAdded:connect(function()
  144. if v.Name ~= game.Players.LocalPlayer.Name then
  145. v.Character:WaitForChild('Head')
  146. wait(1)
  147. if on == true then
  148. if v.Character ~= game.Players.LocalPlayer.Character and v.Character.Head:FindFirstChild('ScreenGui') == nil then
  149. if v.Character:FindFirstChild('Head') then
  150. local bill = Instance.new('BillboardGui',v.Character.Head)
  151. bill.Name = "thingyye"
  152. bill.AlwaysOnTop = true
  153. bill.Size = UDim2.new(2,1,2)
  154. bill.Adornee = v.Character.Head
  155. local txt = Instance.new('TextLabel',bill)
  156. txt.Text = v.Name
  157. txt.BackgroundTransparency = 1
  158. txt.Size = UDim2.new(1,0,1,0)
  159. txt.TextColor3 = v.TeamColor.Color
  160. end
  161. for a,c in pairs(v.Character:GetChildren()) do
  162. if c.ClassName == "MeshPart" and c.Transparency ~= 1 then
  163. doit(c)
  164. elseif c.ClassName == "Part" and c.Transparency ~= 1 then
  165. doit(c)
  166. end
  167. end
  168. end
  169. end
  170. end
  171. end)
  172. end
  173.  
  174. game.Players.PlayerAdded:connect(function(v)
  175. v.CharacterAdded:connect(function()
  176. if v.Name ~= game.Players.LocalPlayer.Name then
  177. v.Character:WaitForChild('Head')
  178. wait(1)
  179. if on == true then
  180. if v.Character ~= game.Players.LocalPlayer.Character and v.Character.Head:FindFirstChild('ScreenGui') == nil then
  181. if v.Character:FindFirstChild('Head') then
  182. local bill = Instance.new('BillboardGui',v.Character.Head)
  183. bill.Name = "thingyye"
  184. bill.AlwaysOnTop = true
  185. bill.Size = UDim2.new(2,1,2)
  186. bill.Adornee = v.Character.Head
  187. local txt = Instance.new('TextLabel',bill)
  188. txt.Text = v.Name
  189. txt.BackgroundTransparency = 1
  190. txt.Size = UDim2.new(1,0,1,0)
  191. txt.TextColor3 = v.TeamColor.Color
  192. end
  193. for a,c in pairs(v.Character:GetChildren()) do
  194. if c.ClassName == "MeshPart" and c.Transparency ~= 1 then
  195. doit(c)
  196. elseif c.ClassName == "Part" and c.Transparency ~= 1 then
  197. doit(c)
  198. end
  199. end
  200. end
  201. end
  202. end
  203. end)
  204. end)
  205.  
  206. gui.Enabled = true
  207.  
  208. game.Players.LocalPlayer:GetMouse().KeyDown:Connect(function(input)
  209. if input == toggleKey then
  210. if gui.Enabled == true then
  211. gui.Enabled = false
  212. else
  213. gui.Enabled = true
  214. end
  215. end
  216. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement