Advertisement
Vzurxy

Untitled

Jan 10th, 2019
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.98 KB | None | 0 0
  1. warn([[
  2. ESP + Chams Loaded
  3. Changelog:
  4. -------------------
  5.  
  6. v1.2.0 (11/11/2018)
  7. + ESP will now automatically check for every players' team every 20 seconds
  8. -------------------
  9.  
  10. v1.1.0 (11/10/2018)
  11. + Colors in FFA mode now display the TeamColor of each player
  12. -------------------
  13.  
  14. v1.0.1 (11/10/2018)
  15. - Removed display of HumanoidRootPart
  16.  
  17. ]])
  18.  
  19. local settings = {
  20. freeForAll = false,
  21. showTeam = true,
  22. showEnemy = true,
  23. esp = false,
  24. chams = true,
  25. }
  26.  
  27. local player = game:GetService("Players").LocalPlayer
  28.  
  29. local gui = game:GetObjects('rbxassetid://2552846969')[1]
  30. local espGui = game:GetObjects('rbxassetid://2552386986')[1]
  31. local chamText = game:GetObjects('rbxassetid://2552512660')[1]
  32.  
  33. chamText.Text.Visible = false
  34.  
  35. local chamsFolder = Instance.new("Folder", game:GetService("CoreGui"))
  36. chamsFolder.Name = "Chams_Storage"
  37. local espFolder = Instance.new("Folder", game:GetService("CoreGui"))
  38. espFolder.Name = "ESP_Storage"
  39.  
  40. function getColor (bool)
  41. if bool then
  42. return Color3.new(0, 1, 0)
  43. else
  44. return Color3.new(1, 0, 0)
  45. end
  46. end
  47.  
  48. gui.Background.Top.Title.Text = "ESP + Chams v1.2.0"
  49. gui.Parent = game:GetService("CoreGui")
  50.  
  51. local b = gui.Background
  52.  
  53. b.ESP.BackgroundColor3 = getColor(settings.esp)
  54. b.Chams.BackgroundColor3 = getColor(settings.chams)
  55. b.FFA.BackgroundColor3 = getColor(settings.freeForAll)
  56. b.ShowA.BackgroundColor3 = getColor(settings.showTeam)
  57. b.ShowE.BackgroundColor3 = getColor(settings.showEnemy)
  58.  
  59. b.ESP.MouseButton1Click:Connect(function()
  60. settings.esp = not settings.esp
  61. b.ESP.BackgroundColor3 = getColor(settings.esp)
  62. for i,v in pairs (game:GetService("Players"):GetPlayers()) do
  63. if v ~= player then
  64. updateESP(v)
  65. end
  66. end
  67. end)
  68.  
  69. b.Chams.MouseButton1Click:Connect(function()
  70. settings.chams = not settings.chams
  71. b.Chams.BackgroundColor3 = getColor(settings.chams)
  72. end)
  73.  
  74. b.FFA.MouseButton1Click:Connect(function()
  75. settings.freeForAll = not settings.freeForAll
  76. b.FFA.BackgroundColor3 = getColor(settings.freeForAll)
  77. for i,v in pairs (game:GetService("Players"):GetPlayers()) do
  78. if v ~= player then
  79. updateESP(v)
  80. end
  81. end
  82. end)
  83.  
  84. b.ShowA.MouseButton1Click:Connect(function()
  85. settings.showTeam = not settings.showTeam
  86. b.ShowA.BackgroundColor3 = getColor(settings.showTeam)
  87. for i,v in pairs (game:GetService("Players"):GetPlayers()) do
  88. if v ~= player then
  89.  
  90. updateESP(v)
  91. end
  92. end
  93. end)
  94.  
  95. b.ShowE.MouseButton1Click:Connect(function()
  96. settings.showEnemy = not settings.showEnemy
  97. b.ShowE.BackgroundColor3 = getColor(settings.showEnemy)
  98. for i,v in pairs (game:GetService("Players"):GetPlayers()) do
  99. if v ~= player then
  100. updateESP(v)
  101. end
  102. end
  103. end)
  104.  
  105. b.Top.Close.MouseButton1Click:Connect(function()
  106. espGui:Destroy()
  107. chamText:Destroy()
  108. chamsFolder:Destroy()
  109. gui:Destroy()
  110. espFolder:Destroy()
  111. script.Disabled = true
  112. end)
  113.  
  114. local minimized = false
  115. local mButton = b.Top.Minimize
  116. b.Top.Minimize.MouseButton1Click:Connect(function()
  117. minimized = not minimized
  118. if minimized then
  119. mButton.Parent = b
  120. else
  121. mButton.Parent = b.Top
  122. end
  123. for i,v in pairs (b:GetChildren()) do
  124. if v ~= mButton and v ~= b then
  125. v.Visible = not minimized
  126. end
  127. end
  128. if minimized then b.BackgroundTransparency = 1 else b.BackgroundTransparency = 0 end
  129. end)
  130.  
  131. function updateESP (plr)
  132. if not plr.Character or not espFolder:FindFirstChild(plr.Name) then return end
  133. espFolder[plr.Name]:ClearAllChildren()
  134. if not settings.esp then return end
  135. if not settings.freeForAll and plr.Team == player.Team and not settings.showTeam then return end
  136. if not settings.freeForAll and plr.Team ~= player.Team and not settings.showEnemy then return end
  137. if settings.freeForAll and not settings.showEnemy then return end
  138.  
  139. for o,b in pairs (plr.Character:GetChildren()) do
  140. if b:IsA("BasePart") and b.Name ~= "HumanoidRootPart" then
  141. for a,z in pairs (espGui:GetChildren()) do
  142. local c = z:Clone()
  143. c.Parent = espFolder[plr.Name]
  144. c.Adornee = b
  145. end
  146. end
  147. end
  148.  
  149. local color = Color3.new(1, 0, 0)
  150.  
  151. if not settings.freeForAll and plr.Team == player.Team then
  152. color = Color3.new(0, 1, 0)
  153. end
  154. if settings.freeForAll then
  155. color = plr.TeamColor.Color
  156. end
  157. for i,v in pairs (espFolder[plr.Name]:GetChildren()) do
  158. v.Color.BackgroundColor3 = color
  159. end
  160. end
  161.  
  162. function updateChams (plr)
  163. if not settings.freeForAll and plr.Team == player.Team and not settings.showTeam then return end
  164. if not settings.freeForAll and plr.Team ~= player.Team and not settings.showEnemy then return end
  165. if settings.freeForAll and not settings.showEnemy then return end
  166.  
  167. if plr.Character and plr.Character:FindFirstChildOfClass("Humanoid") and plr.Character:FindFirstChild("HumanoidRootPart") and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  168. local c = chamText:Clone()
  169. c.Parent = chamsFolder
  170. if c:FindFirstChild("Text") then
  171. c.Text.Text = plr.Name..[[
  172.  
  173. Health: ]]..tostring(math.floor(plr.Character.Humanoid.Health))..[[
  174.  
  175. Distance: ]]..tostring(math.floor((plr.Character:FindFirstChild("HumanoidRootPart").Position - player.Character.HumanoidRootPart.Position).Magnitude))
  176. c.Adornee = plr.Character:FindFirstChild("Head")
  177. if plr.Team == player.Team and not settings.freeForAll then
  178. c.Text.TextColor3 = Color3.new(0, 1, 0)
  179. end
  180. if settings.freeForAll then
  181. c.Text.TextColor3 = plr.TeamColor.Color
  182. end
  183.  
  184. c.Text.Visible = true
  185. end
  186. end
  187. end
  188.  
  189. for i,v in pairs (game:GetService("Players"):GetPlayers()) do
  190. if v ~= player then
  191. local f = Instance.new("Folder", espFolder)
  192. f.Name = v.Name
  193.  
  194. if v.Character then
  195. for o,b in pairs (v.Character:GetChildren()) do
  196. if b:IsA("BasePart") then
  197. for a,z in pairs (espGui:GetChildren()) do
  198. local c = z:Clone()
  199. c.Parent = espFolder[v.Name]
  200. c.Adornee = b
  201. end
  202. end
  203. end
  204. end
  205.  
  206. v.CharacterAdded:Connect(function()
  207. wait(0.1)
  208. game:GetService("RunService").RenderStepped:Wait()
  209. updateESP(v)
  210. end)
  211. end
  212. end
  213.  
  214. game:GetService("Players").PlayerAdded:Connect(function(p)
  215. local f = Instance.new("Folder", espFolder)
  216. f.Name = p.Name
  217.  
  218. p.CharacterAdded:Connect(function()
  219. wait(0.1)
  220. game:GetService("RunService").RenderStepped:Wait()
  221. updateESP(p)
  222. end)
  223. end)
  224. game:GetService("Players").PlayerRemoving:Connect(function(p)
  225. if espFolder:FindFirstChild(p.Name) then
  226. espFolder[p.Name]:Destroy()
  227. end
  228. end)
  229.  
  230. for i,v in pairs (game:GetService("Players"):GetPlayers()) do
  231. updateESP(v)
  232. end
  233.  
  234. local updateCounter = 0
  235. local doUpdateESP = false
  236.  
  237. while wait(0.1) do
  238. game:GetService("RunService").RenderStepped:Wait()
  239. chamsFolder:ClearAllChildren()
  240. if updateCounter == 200 then
  241. updateCounter = 0
  242. doUpdateESP = true
  243. end
  244. for i,v in pairs (game:GetService("Players"):GetPlayers()) do
  245. if v ~= player then
  246. if settings.chams then
  247. updateChams(v)
  248. end
  249. if doUpdateESP then
  250. doUpdateESP = false
  251. if settings.esp then
  252. updateESP()
  253. end
  254. end
  255. end
  256. end
  257. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement