MaxproGlitcher

Test ESP

Nov 30th, 2024
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.50 KB | None | 0 0
  1.  
  2. local Settings = {
  3. Box_Color = Color3.fromRGB(255, 0, 0),
  4. Tracer_Color = Color3.fromRGB(255, 0, 0),
  5. Tracer_Thickness = 1,
  6. Box_Thickness = 1,
  7. Tracer_Origin = "Bottom", -- you'd be pretty stupid to not know what this does...
  8. Tracer_FollowMouse = true, -- turn it off if you dont want the tracers to follow Mouse
  9. Tracers = true
  10. }
  11. local Team_Check = {
  12. TeamCheck = false, -- if TeamColor is on this won't matter...
  13. Green = Color3.fromRGB(0, 255, 0),
  14. Red = Color3.fromRGB(255, 0, 0)
  15. }
  16. local TeamColor = true
  17.  
  18. --// SEPARATION
  19. local player = game:GetService("Players").LocalPlayer
  20. local camera = game:GetService("Workspace").CurrentCamera
  21. local mouse = player:GetMouse()
  22.  
  23. local function NewQuad(thickness, color)
  24. local quad = Drawing.new("Quad")
  25. quad.Visible = false
  26. quad.PointA = Vector2.new(0,0)
  27. quad.PointB = Vector2.new(0,0)
  28. quad.PointC = Vector2.new(0,0)
  29. quad.PointD = Vector2.new(0,0)
  30. quad.Color = color
  31. quad.Filled = false
  32. quad.Thickness = thickness
  33. quad.Transparency = 1
  34. return quad
  35. end
  36.  
  37. local function NewLine(thickness, color)
  38. local line = Drawing.new("Line")
  39. line.Visible = false
  40. line.From = Vector2.new(0, 0)
  41. line.To = Vector2.new(0, 0)
  42. line.Color = color
  43. line.Thickness = thickness
  44. line.Transparency = 1
  45. return line
  46. end
  47.  
  48. local function Visibility(state, lib)
  49. for u, x in pairs(lib) do
  50. x.Visible = state
  51. end
  52. end
  53.  
  54. local function ToColor3(col) --Function to convert, just for giggles
  55. local r = col.r --Red value
  56. local g = col.g --Green value
  57. local b = col.b --Blue value
  58. return Color3.new(r,g,b); --Color3 datatype, made of the RGB inputs
  59. end
  60.  
  61. local black = Color3.fromRGB(0, 0 ,0)
  62. local function ESP(plr)
  63. local library = {
  64. --//Tracer and Black Tracer(black border)
  65. blacktracer = NewLine(Settings.Tracer_Thickness*2, black),
  66. tracer = NewLine(Settings.Tracer_Thickness, Settings.Tracer_Color),
  67. --//Box and Black Box(black border)
  68. black = NewQuad(Settings.Box_Thickness*2, black),
  69. box = NewQuad(Settings.Box_Thickness, Settings.Box_Color),
  70. --//Bar and Green Health Bar (part that moves up/down)
  71. healthbar = NewLine(3, black),
  72. greenhealth = NewLine(1.5, black)
  73. }
  74.  
  75. local function Colorize(color)
  76. for u, x in pairs(library) do
  77. if x ~= library.healthbar and x ~= library.greenhealth and x ~= library.blacktracer and x ~= library.black then
  78. x.Color = color
  79. end
  80. end
  81. end
  82.  
  83. local function Updater()
  84. local connection
  85. connection = game:GetService("RunService").RenderStepped:Connect(function()
  86. if plr.Character ~= nil and plr.Character:FindFirstChild("Humanoid") ~= nil and plr.Character:FindFirstChild("HumanoidRootPart") ~= nil and plr.Character.Humanoid.Health > 0 and plr.Character:FindFirstChild("Head") ~= nil then
  87. local HumPos, OnScreen = camera:WorldToViewportPoint(plr.Character.HumanoidRootPart.Position)
  88. if OnScreen then
  89. local head = camera:WorldToViewportPoint(plr.Character.Head.Position)
  90. local DistanceY = math.clamp((Vector2.new(head.X, head.Y) - Vector2.new(HumPos.X, HumPos.Y)).magnitude, 2, math.huge)
  91.  
  92. local function Size(item)
  93. item.PointA = Vector2.new(HumPos.X + DistanceY, HumPos.Y - DistanceY*2)
  94. item.PointB = Vector2.new(HumPos.X - DistanceY, HumPos.Y - DistanceY*2)
  95. item.PointC = Vector2.new(HumPos.X - DistanceY, HumPos.Y + DistanceY*2)
  96. item.PointD = Vector2.new(HumPos.X + DistanceY, HumPos.Y + DistanceY*2)
  97. end
  98. Size(library.box)
  99. Size(library.black)
  100.  
  101. --//Tracer
  102. if Settings.Tracers then
  103. if Settings.Tracer_Origin == "Middle" then
  104. library.tracer.From = camera.ViewportSize*0.5
  105. library.blacktracer.From = camera.ViewportSize*0.5
  106. elseif Settings.Tracer_Origin == "Bottom" then
  107. library.tracer.From = Vector2.new(camera.ViewportSize.X*0.5, camera.ViewportSize.Y)
  108. library.blacktracer.From = Vector2.new(camera.ViewportSize.X*0.5, camera.ViewportSize.Y)
  109. end
  110. if Settings.Tracer_FollowMouse then
  111. library.tracer.From = Vector2.new(mouse.X, mouse.Y+36)
  112. library.blacktracer.From = Vector2.new(mouse.X, mouse.Y+36)
  113. end
  114. library.tracer.To = Vector2.new(HumPos.X, HumPos.Y + DistanceY*2)
  115. library.blacktracer.To = Vector2.new(HumPos.X, HumPos.Y + DistanceY*2)
  116. else
  117. library.tracer.From = Vector2.new(0, 0)
  118. library.blacktracer.From = Vector2.new(0, 0)
  119. library.tracer.To = Vector2.new(0, 0)
  120. library.blacktracer.To = Vector2.new(0, 02)
  121. end
  122.  
  123. --// Health Bar
  124. local d = (Vector2.new(HumPos.X - DistanceY, HumPos.Y - DistanceY*2) - Vector2.new(HumPos.X - DistanceY, HumPos.Y + DistanceY*2)).magnitude
  125. local healthoffset = plr.Character.Humanoid.Health/plr.Character.Humanoid.MaxHealth * d
  126.  
  127. library.greenhealth.From = Vector2.new(HumPos.X - DistanceY - 4, HumPos.Y + DistanceY*2)
  128. library.greenhealth.To = Vector2.new(HumPos.X - DistanceY - 4, HumPos.Y + DistanceY*2 - healthoffset)
  129.  
  130. library.healthbar.From = Vector2.new(HumPos.X - DistanceY - 4, HumPos.Y + DistanceY*2)
  131. library.healthbar.To = Vector2.new(HumPos.X - DistanceY - 4, HumPos.Y - DistanceY*2)
  132.  
  133. local green = Color3.fromRGB(0, 255, 0)
  134. local red = Color3.fromRGB(255, 0, 0)
  135.  
  136. library.greenhealth.Color = red:lerp(green, plr.Character.Humanoid.Health/plr.Character.Humanoid.MaxHealth);
  137.  
  138. if Team_Check.TeamCheck then
  139. if plr.TeamColor == player.TeamColor then
  140. Colorize(Team_Check.Green)
  141. else
  142. Colorize(Team_Check.Red)
  143. end
  144. else
  145. library.tracer.Color = Settings.Tracer_Color
  146. library.box.Color = Settings.Box_Color
  147. end
  148. if TeamColor == true then
  149. Colorize(plr.TeamColor.Color)
  150. end
  151. Visibility(true, library)
  152. else
  153. Visibility(false, library)
  154. end
  155. else
  156. Visibility(false, library)
  157. if game.Players:FindFirstChild(plr.Name) == nil then
  158. connection:Disconnect()
  159. end
  160. end
  161. end)
  162. end
  163. coroutine.wrap(Updater)()
  164. end
  165.  
  166. for i, v in pairs(game:GetService("Players"):GetPlayers()) do
  167. if v.Name ~= player.Name then
  168. coroutine.wrap(ESP)(v)
  169. end
  170. end
  171.  
  172. game.Players.PlayerAdded:Connect(function(newplr)
  173. if newplr.Name ~= player.Name then
  174. coroutine.wrap(ESP)(newplr)
  175. end
  176. end)
Advertisement
Add Comment
Please, Sign In to add comment