Aimbot/Lock + ESP - Pastebin.com (2024)

  1. --Made By SirMeme (For Making The ESP And Finishing The Script)

  2. --Credit To: Bditt (For Making The Base Of The Aimbot)

  3. --

  4. --If you change your camera sensitivity in the Roblox Setting (Press ESC), you are basically changing how smooth the aimbot looks.

  5. --The lower the sensitivity, the more legit it looks and more work you have to do to aim.

  6. --THEY NEED TO BE VISIBLE TO LOCK ONTO THEM!

  7. --

  8. --T = Toggles aimbot.

  9. --Right Click = Locks on.

  10. --M = Toggles teamcheck.

  11. --O = Toggles visibility check.

  12. --

  13. --

  14. --Hold Right Click to lock on.

  15. --

  16. --THIS ONLY WORKS FOR PROTOSMASHER, VISENYA, ELYSIAN, Synapse, AND HEXUS

  17. --

  18. --If they are directly behind you, it will make you aim lock in the wrong direction.

  19. local safe = setmetatable({}, { __index = function(_, k)

  20. return game:GetService(k)

  21. end

  22. })

  23. local movethemouse = mousemoverel or Input.MoveMouse --Mouse Move Function.

  24. local leftclickme = nil --Auto Shoot Key Press Thingy.

  25. local aimbotting = true -- Toggles.

  26. local autoshoot = false

  27. local teamcheck = true

  28. local visiblecheck = true

  29. _G.xaimoffset = 0 --_G.xaimoffset = -25

  30. _G.maxdistfromcross = 100

  31. local cam = safe.Workspace.CurrentCamera -- Current Camera

  32. local lp = safe.Players.LocalPlayer -- Local Player

  33. local lpc = safe.Players.LocalPlayer.Character -- Local Player Character

  34. local wtos = function(v) -- World To Screen

  35. return cam:WorldToScreenPoint(v)

  36. end

  37. local distFromCenter = function(x, y)

  38. local vps = cam.ViewportSize -- Get ViewPortSize.

  39. local vpsx = vps.X

  40. local vpsy = vps.Y

  41. local screencenterx = vpsx/2

  42. local screencentery = vpsy/2

  43. local xdist = (x - screencenterx) -- X Distance From Mid Screen.

  44. local ydist = (y - screencentery) -- Y Distance From Mid Screen.

  45. local Hypotenuse = math.sqrt(math.pow(xdist, 2) + math.pow(ydist, 2))

  46. return Hypotenuse

  47. end

  48. local function inlos(p, ...) -- In line of site?

  49. return #cam:GetPartsObscuringTarget({p}, {cam, lp.Character, ...}) == 0

  50. end

  51. local getclosestPlayer = function() -- Checks the closest player based on Hypotenuse.

  52. local plrs, v = safe.Players:GetPlayers()

  53. local maxdist = 75

  54. local dist = math.huge

  55. local plr = "none"

  56. for i = 1, #plrs do

  57. v = plrs[i]

  58. if v ~= safe.Players.LocalPlayer then

  59. if v.Character then

  60. if v.TeamColor ~= safe.Players.LocalPlayer.TeamColor and teamcheck then

  61. local hpos = wtos(v.Character.Head.Position)

  62. local idist = distFromCenter(hpos.X, hpos.Y)

  63. if idist < dist and idist < _G.maxdistfromcross then

  64. dist = idist

  65. plr = v

  66. end

  67. elseif not teamcheck then

  68. local hpos = wtos(v.Character.Head.Position)

  69. local idist = distFromCenter(hpos.X, hpos.Y)

  70. if idist < dist and idist < _G.maxdistfromcross then

  71. dist = idist

  72. plr = v

  73. end

  74. end

  75. end

  76. end

  77. end

  78. return plr, dist

  79. end

  80. local AimAt = function(x, y)

  81. local vps = cam.ViewportSize

  82. local vpsx = vps.X

  83. local vpsy = vps.Y

  84. local screencenterx = vpsx/2

  85. local screencentery = vpsy/2

  86. local aimspeed = 5

  87. local aimatx

  88. local aimaty

  89. if x ~= 0 then

  90. if x > screencenterx then

  91. aimatx = -(screencenterx - x)

  92. aimatx = aimatx/aimspeed

  93. if aimatx + screencenterx > screencenterx * 2 then

  94. aimatx = 0

  95. end

  96. end

  97. if x < screencenterx then

  98. aimatx = x - screencenterx

  99. aimatx = aimatx/aimspeed

  100. if aimatx + screencenterx < 0 then

  101. aimatx = 0

  102. end

  103. end

  104. end

  105. if y ~= 0 then

  106. if y > screencentery then

  107. aimaty = -(screencentery - y)

  108. aimaty = aimaty/aimspeed

  109. if aimaty + screencentery > screencentery * 2 then

  110. aimaty = 0

  111. end

  112. end

  113. if y < screencentery then

  114. aimaty = y - screencentery

  115. aimaty = aimaty/aimspeed

  116. if aimaty + screencentery < 0 then

  117. aimaty = 0

  118. end

  119. end

  120. end

  121. return aimatx, aimaty

  122. end

  123. local MouseTests = function()

  124. local player = safe.Players.LocalPlayer

  125. local mouse = player:GetMouse()

  126. local screensizex = mouse.ViewSizeX

  127. local screensizey = mouse.ViewSizeY

  128. local midx = screensizex/2

  129. local midy = screensizey/2

  130. local mousex = mouse.X

  131. local mousey = mouse.Y

  132. local moveamountx = midx - mousex

  133. local moveamounty = midy - mousey

  134. movethemouse(moveamountx, moveamounty)

  135. local camera = safe.Workspace.Camera

  136. local newmousex = safe.Players.LocalPlayer:GetMouse().X

  137. local newmousey = safe.Players.LocalPlayer:GetMouse().Y

  138. local closestplayer = getclosestPlayer()

  139. if player.Character.Humanoid.Health > 0 then

  140. if closestplayer ~= "none" then

  141. if inlos(closestplayer.Character.Head.Position, closestplayer.Character) and visiblecheck then

  142. local closesthead = closestplayer.Character.Head

  143. local p = camera:WorldToScreenPoint(closesthead.Position)

  144. local xdistancetohead, ydistancetohead = AimAt(p.X + _G.xaimoffset, p.Y + 32)

  145. movethemouse(xdistancetohead, ydistancetohead)

  146. if autoshoot then

  147. movethemouse(xdistancetohead, ydistancetohead)

  148. wait(1)

  149. Input.LeftClick(MOUSE_DOWN)

  150. wait()

  151. end

  152. elseif not visiblecheck then

  153. local closesthead = closestplayer.Character.Head

  154. local p = camera:WorldToScreenPoint(closesthead.Position)

  155. local xdistancetohead, ydistancetohead = AimAt(p.X + _G.xaimoffset, p.Y + 32)

  156. movethemouse(xdistancetohead, ydistancetohead)

  157. end

  158. end

  159. end

  160. end

  161. game:GetService('RunService').Stepped:connect(function()

  162. if aimbotting then

  163. --MouseTests()

  164. end

  165. end)

  166. local plr = safe.Players.LocalPlayer

  167. local mouse = plr:GetMouse()

  168. mouse.KeyDown:connect(function(key)

  169. if key == "t" then

  170. aimbotting = not aimbotting

  171. print("Aimbotting: " .. tostring(aimbotting))

  172. MouseTests()

  173. end

  174. if key == "o" then

  175. visiblecheck = not visiblecheck

  176. print("Visible Check: " .. tostring(visiblecheck))

  177. end

  178. if key == "m" then

  179. teamcheck = not teamcheck

  180. print("Team Check: " .. tostring(teamcheck))

  181. end

  182. end)

  183. print("Pixel Aimbot Loaded!")

  184. MB2Held = false

  185. function onKeyPress(inputObject,gameProcessed)

  186. if inputObject.UserInputType == Enum.UserInputType.MouseButton2 then

  187. MB2Held = true

  188. while MB2Held do

  189. if aimbotting then

  190. MouseTests()

  191. end

  192. wait()

  193. end

  194. end

  195. end

  196. function onKeyRelease(inputObject,gameProcessed)

  197. if inputObject.UserInputType == Enum.UserInputType.MouseButton2 then

  198. MB2Held = false

  199. end

  200. end

  201. game:GetService("UserInputService").InputBegan:connect(onKeyPress)

  202. game:GetService("UserInputService").InputEnded:connect(onKeyRelease)

  203. trans = 0.5

  204. --team1 = BackgroundColor3.new("Institutional white")

  205. --team2 = BackgroundColor3.new("Really red")

  206. while true do

  207. for i,l in pairs(game:GetService("Players"):GetChildren()) do

  208. print (game:GetService("Players").LocalPlayer.Team)

  209. if l ~= game:GetService("Players").LocalPlayer then

  210. for i,v in pairs(l.Character:GetChildren()) do

  211. if v.ClassName == "MeshPart" or "Part" and v.Name ~= "HumanoidRootPart" then

  212. --

  213. xd = Instance.new("SurfaceGui")

  214. xd.Face = Enum.NormalId.Back

  215. xd.Parent = v

  216. xd.AlwaysOnTop = true

  217. Frame = Instance.new("Frame")

  218. Frame.Parent = xd

  219. Frame.BackgroundColor3 = Color3.new(1, 1, 1)

  220. Frame.Size = UDim2.new(1, 0, 1, 0)

  221. Frame.BackgroundTransparency = trans

  222. if l.Team ~= game:GetService("Players").LocalPlayer.Team then

  223. Frame.BackgroundColor3 = Color3.new(17,17 ,17)

  224. else Frame.BackgroundColor3 = Color3.new(0, 255, 255)

  225. end

  226. --

  227. xd = Instance.new("SurfaceGui")

  228. xd.Face = Enum.NormalId.Bottom

  229. xd.Parent = v

  230. xd.AlwaysOnTop = true

  231. Frame = Instance.new("Frame")

  232. Frame.Parent = xd

  233. Frame.BackgroundColor3 = Color3.new(1, 1, 1)

  234. Frame.Size = UDim2.new(1, 0, 1, 0)

  235. Frame.BackgroundTransparency = trans

  236. if l.Team ~= game:GetService("Players").LocalPlayer.Team then

  237. Frame.BackgroundColor3 = Color3.new(17,17 ,17)

  238. else Frame.BackgroundColor3 = Color3.new(0, 255, 255)

  239. end

  240. --

  241. xd = Instance.new("SurfaceGui")

  242. xd.Face = Enum.NormalId.Front

  243. xd.Parent = v

  244. xd.AlwaysOnTop = true

  245. Frame = Instance.new("Frame")

  246. Frame.Parent = xd

  247. Frame.BackgroundColor3 = Color3.new(1, 1, 1)

  248. Frame.Size = UDim2.new(1, 0, 1, 0)

  249. Frame.BackgroundTransparency = trans

  250. if l.Team ~= game:GetService("Players").LocalPlayer.Team then

  251. Frame.BackgroundColor3 = Color3.new(17,17 ,17)

  252. else Frame.BackgroundColor3 = Color3.new(0, 255, 255)

  253. end

  254. --

  255. xd = Instance.new("SurfaceGui")

  256. xd.Face = Enum.NormalId.Left

  257. xd.Parent = v

  258. xd.AlwaysOnTop = true

  259. Frame = Instance.new("Frame")

  260. Frame.Parent = xd

  261. Frame.BackgroundColor3 = Color3.new(1, 1, 1)

  262. Frame.Size = UDim2.new(1, 0, 1, 0)

  263. Frame.BackgroundTransparency = trans

  264. if l.Team ~= game:GetService("Players").LocalPlayer.Team then

  265. Frame.BackgroundColor3 = Color3.new(17,17 ,17)

  266. else Frame.BackgroundColor3 = Color3.new(0, 255, 255)

  267. end

  268. --

  269. xd = Instance.new("SurfaceGui")

  270. xd.Face = Enum.NormalId.Right

  271. xd.Parent = v

  272. xd.AlwaysOnTop = true

  273. Frame = Instance.new("Frame")

  274. Frame.Parent = xd

  275. Frame.BackgroundColor3 = Color3.new(1, 1, 1)

  276. Frame.Size = UDim2.new(1, 0, 1, 0)

  277. Frame.BackgroundTransparency = trans

  278. if l.Team ~= game:GetService("Players").LocalPlayer.Team then

  279. Frame.BackgroundColor3 = Color3.new(17,17 ,17)

  280. else Frame.BackgroundColor3 = Color3.new(0, 255, 255)

  281. end

  282. --

  283. xd = Instance.new("SurfaceGui")

  284. xd.Face = Enum.NormalId.Top

  285. xd.Parent = v

  286. xd.AlwaysOnTop = true

  287. Frame = Instance.new("Frame")

  288. Frame.Parent = xd

  289. Frame.BackgroundColor3 = Color3.new(1, 1, 1)

  290. Frame.Size = UDim2.new(1, 0, 1, 0)

  291. Frame.BackgroundTransparency = trans

  292. if l.Team ~= game:GetService("Players").LocalPlayer.Team then

  293. Frame.BackgroundColor3 = Color3.new(17,17 ,17)

  294. else Frame.BackgroundColor3 = Color3.new(0, 255, 255)

  295. end

  296. print (v.Name)

  297. end

  298. end

  299. end

  300. end

  301. wait (5)

  302. for i,v in pairs (game:GetService("Players"):GetChildren()) do

  303. for i,k in pairs(v.Character:GetChildren()) do

  304. for i,l in pairs(k:GetChildren()) do

  305. if l.ClassName == "SurfaceGui" then

  306. l:Remove()

  307. end

  308. end

  309. end

  310. end

  311. end

Aimbot/Lock + ESP - Pastebin.com (2024)
Top Articles
Latest Posts
Article information

Author: Aron Pacocha

Last Updated:

Views: 5744

Rating: 4.8 / 5 (68 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Aron Pacocha

Birthday: 1999-08-12

Address: 3808 Moen Corner, Gorczanyport, FL 67364-2074

Phone: +393457723392

Job: Retail Consultant

Hobby: Jewelry making, Cooking, Gaming, Reading, Juggling, Cabaret, Origami

Introduction: My name is Aron Pacocha, I am a happy, tasty, innocent, proud, talented, courageous, magnificent person who loves writing and wants to share my knowledge and understanding with you.