Trace2004tyler

aimbshit

Dec 14th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.52 KB | None | 0 0
  1. --Esp made by Equinox/Grogidox
  2. --Aimbot made by Equinox/Grogidox
  3.  
  4. print("Key to toggle esp is V.")
  5. print("Aim-key is Left-Alt.")
  6. ENABLED = false
  7. PLAYER = game.Players.LocalPlayer
  8. MOUSE = PLAYER:GetMouse()
  9. CC = game.Workspace.CurrentCamera
  10. _G.FREE_FOR_ALL = true
  11. _G.BIND = 52
  12. _G.AIM_AT = 'Head'
  13. local player = game.Players.LocalPlayer
  14. local esp = false
  15. local track = false
  16.  
  17.  
  18.  
  19. function Create(base, team)
  20. local bb = Instance.new("BillboardGui",player.PlayerGui)
  21. bb.Adornee = base
  22. bb.ExtentsOffset = Vector3.new(0,1,0)
  23. bb.AlwaysOnTop = true
  24. bb.Size = UDim2.new(0,5,0,5)
  25. bb.StudsOffset = Vector3.new(0,1,0)
  26. bb.Name = "tracker"
  27. local frame = Instance.new("Frame",bb)
  28. frame.ZIndex = 10
  29. frame.BackgroundTransparency = 0.3
  30. frame.Size = UDim2.new(1,0,1,0)
  31. frame.Position = UDim2.new(0,0,0)
  32. frame.Transparency = 1
  33. local txtlbl = Instance.new("TextLabel",bb)
  34. txtlbl.ZIndex = 10
  35. txtlbl.Text = (string.upper(base.Parent.Name))
  36. txtlbl.BackgroundTransparency = 1
  37. txtlbl.Position = UDim2.new(0,0,0,-35)
  38. txtlbl.Size = UDim2.new(1,0,10,0)
  39. txtlbl.Font = "SourceSansBold"
  40. txtlbl.FontSize = "Size10"
  41. txtlbl.TextStrokeTransparency = 0.5
  42.  
  43. local txtlbl2 = Instance.new("TextLabel",bb)
  44. txtlbl2.ZIndex = 10
  45. txtlbl2.Text = (math.floor(base.Parent.Humanoid.Health*100)/100)
  46. txtlbl2.BackgroundTransparency = 1
  47. txtlbl2.Position = UDim2.new(0,0,0,-25)
  48. txtlbl2.Size = UDim2.new(1,0,10,0)
  49. txtlbl2.Font = "SourceSansBold"
  50. txtlbl2.FontSize = "Size10"
  51.  
  52. txtlbl2.TextStrokeTransparency = 0.5
  53. if team then
  54. txtlbl.TextColor3 = Color3.new(0,255,0)
  55. txtlbl2.TextColor3 = Color3.new(255,0,0)
  56. frame.BackgroundColor3 = Color3.new(255,0,0)
  57.  
  58. elseif base.Parent.Name == "whielist kid" or base.Parent.Name == "second whitelist kid here" then
  59. txtlbl.TextColor3 = Color3.new(0,255,0)
  60. txtlbl2.TextColor3 = Color3.new(0,255,0)
  61. frame.BackgroundColor3 = Color3.new(0,255,0)
  62. txtlbl.Text = "FRIEND"
  63. txtlbl.FontSize = "Size14"
  64. txtlbl2.FontSize = "Size14"
  65.  
  66.  
  67.  
  68. elseif base.Parent.Name == game.Players.LocalPlayer.Name then
  69. txtlbl2.Transparency = 1
  70. txtlbl.Transparency = 1
  71. frame.Transparency = 1
  72. else
  73. txtlbl.TextColor3 = Color3.new(255,0,0)
  74. txtlbl2.TextColor3 = Color3.new(255,0,0)
  75. frame.BackgroundColor3 = Color3.new(255,0,0)
  76.  
  77. end
  78. end
  79.  
  80.  
  81. function Find()
  82. Clear()
  83. track = true
  84. spawn(function()
  85. while wait() do
  86. if track then
  87. Clear()
  88. for _,v in pairs(game.Players:players()) do
  89.  
  90. if v.Character and v.Character.Head then
  91. Create(v.Character.Head, false)
  92. end
  93. end
  94. end
  95. end
  96. wait(1)
  97. end)
  98. end
  99. function Clear()
  100. for _,v in pairs(player.PlayerGui:children()) do
  101. if v.Name == "tracker" and v:isA("BillboardGui") then
  102. v:Destroy()
  103. end
  104. end
  105. end
  106. mouse=game.Players.LocalPlayer:GetMouse()
  107. mouse.keyDown:connect(function(key)
  108. if key == "v" then
  109. if not esp then
  110. Find()
  111. print("ESP ENABLED")
  112. esp = true
  113. else
  114. Clear()
  115. track = false
  116. print("ESP DISABLED")
  117. esp = false
  118. end
  119.  
  120.  
  121.  
  122.  
  123. end
  124.  
  125. end)
  126.  
  127.  
  128.  
  129.  
  130. --aimbot
  131.  
  132.  
  133. function GetNearestPlayerToMouse()
  134. local PLAYERS = {}
  135. local PLAYER_HOLD = {}
  136. local DISTANCES = {}
  137. for i, v in pairs(game.Players:GetPlayers()) do
  138. if v ~= PLAYER then
  139. table.insert(PLAYERS, v)
  140. end
  141. end
  142. for i, v in pairs(PLAYERS) do
  143. if _G.FREE_FOR_ALL == false then
  144. if v and (v.Character) ~= nil and v.TeamColor ~= PLAYER.TeamColor then
  145. local AIM = v.Character:FindFirstChild(_G.AIM_AT)
  146. if AIM ~= nil then
  147. local DISTANCE = (AIM.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude
  148. local RAY = Ray.new(game.Workspace.CurrentCamera.CoordinateFrame.p, (MOUSE.Hit.p - CC.CoordinateFrame.p).unit * DISTANCE)
  149. local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
  150. local DIFF = math.floor((POS - AIM.Position).magnitude)
  151. PLAYER_HOLD[v.Name .. i] = {}
  152. PLAYER_HOLD[v.Name .. i].dist = DISTANCE
  153. PLAYER_HOLD[v.Name .. i].plr = v
  154. PLAYER_HOLD[v.Name .. i].diff = DIFF
  155. table.insert(DISTANCES, DIFF)
  156. end
  157. end
  158. elseif _G.FREE_FOR_ALL == true then
  159. local AIM = v.Character:FindFirstChild(_G.AIM_AT)
  160. if AIM ~= nil then
  161. local DISTANCE = (AIM.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude
  162. local RAY = Ray.new(game.Workspace.CurrentCamera.CoordinateFrame.p, (MOUSE.Hit.p - CC.CoordinateFrame.p).unit * DISTANCE)
  163. local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
  164. local DIFF = math.floor((POS - AIM.Position).magnitude)
  165. PLAYER_HOLD[v.Name .. i] = {}
  166. PLAYER_HOLD[v.Name .. i].dist = DISTANCE
  167. PLAYER_HOLD[v.Name .. i].plr = v
  168. PLAYER_HOLD[v.Name .. i].diff = DIFF
  169. table.insert(DISTANCES, DIFF)
  170. end
  171. end
  172. end
  173.  
  174. if unpack(DISTANCES) == nil then
  175. return false
  176. end
  177.  
  178. local L_DISTANCE = math.floor(math.min(unpack(DISTANCES)))
  179. if L_DISTANCE > 20 then
  180. return false
  181. end
  182.  
  183. for i, v in pairs(PLAYER_HOLD) do
  184. if v.diff == L_DISTANCE then
  185. return v.plr
  186. end
  187. end
  188. return false
  189. end
  190.  
  191. local TRACK = false
  192.  
  193.  
  194. MOUSE.KeyDown:connect(function(KEY)
  195. KEY = KEY:lower():byte()
  196. if KEY == _G.BIND then
  197. ENABLED = true
  198. end
  199. end)
  200. MOUSE.KeyUp:connect(function(KEY)
  201. KEY = KEY:lower():byte()
  202. if KEY == _G.BIND then
  203. ENABLED = false
  204. end
  205. end)
  206.  
  207. game:GetService('RunService').RenderStepped:connect(function()
  208. if ENABLED then
  209. local TARGET = GetNearestPlayerToMouse()
  210. if TARGET.Name == "Whitelist kid here" or TARGET.Name == "second whitelist kid here" then
  211. else
  212.  
  213. if (TARGET ~= false) then
  214. local AIM = TARGET.Character:FindFirstChild(_G.AIM_AT)
  215. if AIM then
  216. CC.CoordinateFrame = CFrame.new(CC.CoordinateFrame.p, AIM.CFrame.p)
  217. end
  218. end
  219. end
  220. end
  221. end)
Add Comment
Please, Sign In to add comment