Guest

roblox script

Oct 25th, 2026
22
0
Never
Not a member of GistPad yet? Sign Up, it unlocks many cool features!
None 24.42 KB | Gaming | 0 0
  1. -- ROCKET Universal ESP & Aimbot (full rewrite)
  2. -- Language: Luau (Roblox)
  3. -- Функционал: ESP (Highlight + имя + дистанция с корректной обработкой респавна и поздних подключений),
  4. -- Aimbot (плавное наведение на ближайшую цель в радиусе FOV)
  5.  
  6. local Players = game:GetService("Players")
  7. local RunService = game:GetService("RunService")
  8. local UserInputService = game:GetService("UserInputService")
  9. local Camera = workspace.CurrentCamera
  10.  
  11. local LocalPlayer = Players.LocalPlayer
  12. local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
  13.  
  14. -- ================= НАСТРОЙКИ =================
  15. local Settings = {
  16. ESP = {
  17. Enabled = true,
  18. Color = Color3.fromRGB(255, 0, 0),
  19. FillTransparency = 0.5,
  20. ShowName = true,
  21. ShowDistance = true,
  22. },
  23. Aimbot = {
  24. Enabled = false,
  25. FOV = 150, -- радиус поиска цели в пикселях
  26. Smoothness = 0.25, -- чем меньше — тем резче
  27. TargetPart = "Head", -- "Head" / "HumanoidRootPart" / "UpperTorso"
  28. TeamCheck = false,
  29. },
  30. }
  31.  
  32. -- ================= ESP =================
  33. local espObjects = {} -- [Player] = { Highlight, BillboardGui, NameLabel, DistanceLabel, Character }
  34.  
  35. local function DestroyESP(player)
  36. local data = espObjects[player]
  37. if data then
  38. if data.Highlight and data.Highlight.Parent then data.Highlight:Destroy() end
  39. if data.BillboardGui and data.BillboardGui.Parent then data.BillboardGui:Destroy() end
  40. espObjects[player] = nil
  41. end
  42. end
  43.  
  44. local function SetupCharacter(player, character)
  45. if player == LocalPlayer then return end
  46. if not character or not character.Parent then return end
  47.  
  48. -- Ждём Head и Humanoid (важно для только что зашедших и для респавна)
  49. local head = character:WaitForChild("Head", 5)
  50. local humanoid = character:WaitForChild("Humanoid", 5)
  51. if not head or not humanoid then return end
  52.  
  53. -- Если уже настроено для этого же персонажа — не пересоздаём
  54. local existing = espObjects[player]
  55. if existing
  56. and existing.Character == character
  57. and existing.Highlight and existing.Highlight.Parent
  58. and existing.BillboardGui and existing.BillboardGui.Parent
  59. then
  60. return
  61. end
  62.  
  63. DestroyESP(player)
  64.  
  65. -- Highlight
  66. local highlight = Instance.new("Highlight")
  67. highlight.Name = "ROCKET_ESP"
  68. highlight.FillColor = Settings.ESP.Color
  69. highlight.FillTransparency = Settings.ESP.FillTransparency
  70. highlight.OutlineColor = Settings.ESP.Color
  71. highlight.OutlineTransparency = 0
  72. highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  73. highlight.Enabled = Settings.ESP.Enabled
  74. highlight.Parent = character
  75.  
  76. -- BillboardGui (имя + дистанция)
  77. local billboard = Instance.new("BillboardGui")
  78. billboard.Name = "ROCKET_ESP_Billboard"
  79. billboard.Adornee = head
  80. billboard.Size = UDim2.new(0, 150, 0, 50)
  81. billboard.StudsOffset = Vector3.new(0, 2.5, 0)
  82. billboard.AlwaysOnTop = true
  83. billboard.Enabled = Settings.ESP.Enabled
  84. billboard.Parent = head
  85.  
  86. local nameLabel = Instance.new("TextLabel")
  87. nameLabel.Name = "NameLabel"
  88. nameLabel.Size = UDim2.new(1, 0, 0.5, 0)
  89. nameLabel.BackgroundTransparency = 1
  90. nameLabel.Text = player.Name
  91. nameLabel.TextColor3 = Settings.ESP.Color
  92. nameLabel.TextStrokeTransparency = 0
  93. nameLabel.TextScaled = true
  94. nameLabel.Font = Enum.Font.SourceSansBold
  95. nameLabel.Parent = billboard
  96.  
  97. local distLabel = Instance.new("TextLabel")
  98. distLabel.Name = "DistanceLabel"
  99. distLabel.Size = UDim2.new(1, 0, 0.5, 0)
  100. distLabel.Position = UDim2.new(0, 0, 0.5, 0)
  101. distLabel.BackgroundTransparency = 1
  102. distLabel.Text = ""
  103. distLabel.TextColor3 = Settings.ESP.Color
  104. distLabel.TextStrokeTransparency = 0
  105. distLabel.TextScaled = true
  106. distLabel.Font = Enum.Font.SourceSans
  107. distLabel.Parent = billboard
  108.  
  109. espObjects[player] = {
  110. Highlight = highlight,
  111. BillboardGui = billboard,
  112. NameLabel = nameLabel,
  113. DistanceLabel = distLabel,
  114. Character = character,
  115. }
  116. end
  117.  
  118. local function CreateESP(player)
  119. if player == LocalPlayer then return end
  120.  
  121. -- Если персонаж уже есть — настраиваем сразу
  122. if player.Character then
  123. task.spawn(SetupCharacter, player, player.Character)
  124. end
  125.  
  126. -- Подписка на появление / респавн персонажа
  127. player.CharacterAdded:Connect(function(character)
  128. SetupCharacter(player, character)
  129. end)
  130. end
  131.  
  132. -- ВАЖНО: сначала подписка, потом обработка существующих
  133. Players.PlayerAdded:Connect(CreateESP)
  134. Players.PlayerRemoving:Connect(DestroyESP)
  135.  
  136. for _, player in ipairs(Players:GetPlayers()) do
  137. if player ~= LocalPlayer then
  138. CreateESP(player)
  139. end
  140. end
  141.  
  142. local function UpdateESP()
  143. for player, data in pairs(espObjects) do
  144. local character = player.Character
  145. if not character or not character.Parent then
  146. DestroyESP(player)
  147. continue
  148. end
  149.  
  150. -- Смена персонажа (респавн) — пересоздаём
  151. if data.Character ~= character then
  152. SetupCharacter(player, character)
  153. continue
  154. end
  155.  
  156. if data.Highlight and data.Highlight.Parent then
  157. data.Highlight.Enabled = Settings.ESP.Enabled
  158. end
  159. if data.BillboardGui and data.BillboardGui.Parent then
  160. data.BillboardGui.Enabled = Settings.ESP.Enabled
  161. end
  162.  
  163. if Settings.ESP.Enabled and Settings.ESP.ShowDistance then
  164. local root = character:FindFirstChild("HumanoidRootPart")
  165. if root and data.DistanceLabel and data.DistanceLabel.Parent then
  166. local dist = (Camera.CFrame.Position - root.Position).Magnitude
  167. data.DistanceLabel.Text = string.format("%d studs", math.floor(dist))
  168. end
  169. end
  170.  
  171. if data.NameLabel and data.NameLabel.Parent then
  172. data.NameLabel.Visible = Settings.ESP.ShowName
  173. end
  174. end
  175. end
  176.  
  177. -- ================= AIMBOT =================
  178. local function GetClosestTarget()
  179. local mousePos = UserInputService:GetMouseLocation()
  180. local closestPart
  181. local shortestDist = Settings.Aimbot.FOV
  182.  
  183. for _, player in ipairs(Players:GetPlayers()) do
  184. if player == LocalPlayer then continue end
  185. if not player.Character then continue end
  186.  
  187. if Settings.Aimbot.TeamCheck and player.Team == LocalPlayer.Team then
  188. continue
  189. end
  190.  
  191. local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
  192. if not humanoid or humanoid.Health <= 0 then continue end
  193.  
  194. local targetPart = player.Character:FindFirstChild(Settings.Aimbot.TargetPart)
  195. if not targetPart then continue end
  196.  
  197. local screenPos, onScreen = Camera:WorldToViewportPoint(targetPart.Position)
  198. if not onScreen then continue end
  199.  
  200. local dist = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude
  201. if dist < shortestDist then
  202. shortestDist = dist
  203. closestPart = targetPart
  204. end
  205. end
  206.  
  207. return closestPart
  208. end
  209.  
  210. local aimbotConnection
  211.  
  212. local function StartAimbot()
  213. if aimbotConnection then return end
  214. aimbotConnection = RunService.RenderStepped:Connect(function()
  215. if not Settings.Aimbot.Enabled then return end
  216.  
  217. local targetPart = GetClosestTarget()
  218. if not targetPart then return end
  219.  
  220. local currentCFrame = Camera.CFrame
  221. local desiredCFrame = CFrame.new(currentCFrame.Position, targetPart.Position)
  222. Camera.CFrame = currentCFrame:Lerp(desiredCFrame, Settings.Aimbot.Smoothness)
  223. end)
  224. end
  225.  
  226. local function StopAimbot()
  227. if aimbotConnection then
  228. aimbotConnection:Disconnect()
  229. aimbotConnection = nil
  230. end
  231. end
  232.  
  233. -- ================= GUI =================
  234. local screenGui = Instance.new("ScreenGui")
  235. screenGui.Name = "ROCKET_GUI"
  236. screenGui.ResetOnSpawn = false
  237. screenGui.Parent = PlayerGui
  238.  
  239. local frame = Instance.new("Frame")
  240. frame.Size = UDim2.new(0, 200, 0, 120)
  241. frame.Position = UDim2.new(0, 10, 0, 10)
  242. frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  243. frame.BorderSizePixel = 0
  244. frame.Parent = screenGui
  245.  
  246. local frameCorner = Instance.new("UICorner")
  247. frameCorner.CornerRadius = UDim.new(0, 8)
  248. frameCorner.Parent = frame
  249.  
  250. local espBtn = Instance.new("TextButton")
  251. espBtn.Size = UDim2.new(1, -20, 0, 40)
  252. espBtn.Position = UDim2.new(0, 10, 0, 10)
  253. espBtn.BackgroundColor3 = Color3.fromRGB(60, 180, 60)
  254. espBtn.Text = "ESP: ON"
  255. espBtn.TextColor3 = Color3.new(1, 1, 1)
  256. espBtn.Font = Enum.Font.SourceSansBold
  257. espBtn.TextSize = 18
  258. espBtn.Parent = frame
  259.  
  260. local espCorner = Instance.new("UICorner")
  261. espCorner.CornerRadius = UDim.new(0, 6)
  262. espCorner.Parent = espBtn
  263.  
  264. espBtn.MouseButton1Click:Connect(function()
  265. Settings.ESP.Enabled = not Settings.ESP.Enabled
  266. espBtn.Text = "ESP: " .. (Settings.ESP.Enabled and "ON" or "OFF")
  267. espBtn.BackgroundColor3 = Settings.ESP.Enabled and Color3.fromRGB(60, 180, 60) or Color3.fromRGB(180, 60, 60)
  268. end)
  269.  
  270. local aimBtn = Instance.new("TextButton")
  271. aimBtn.Size = UDim2.new(1, -20, 0, 40)
  272. aimBtn.Position = UDim2.new(0, 10, 0, 60)
  273. aimBtn.BackgroundColor3 = Color3.fromRGB(180, 60, 60)
  274. aimBtn.Text = "AIMBOT: OFF"
  275. aimBtn.TextColor3 = Color3.new(1, 1, 1)
  276. aimBtn.Font = Enum.Font.SourceSansBold
  277. aimBtn.TextSize = 18
  278. aimBtn.Parent = frame
  279.  
  280. local aimCorner = Instance.new("UICorner")
  281. aimCorner.CornerRadius = UDim.new(0, 6)
  282. aimCorner.Parent = aimBtn
  283.  
  284. aimBtn.MouseButton1Click:Connect(function()
  285. Settings.Aimbot.Enabled = not Settings.Aimbot.Enabled
  286. aimBtn.Text = "AIMBOT: " .. (Settings.Aimbot.Enabled and "ON" or "OFF")
  287. aimBtn.BackgroundColor3 = Settings.Aimbot.Enabled and Color3.fromRGB(60, 180, 60) or Color3.fromRGB(180, 60, 60)
  288.  
  289. if Settings.Aimbot.Enabled then
  290. StartAimbot()
  291. else
  292. StopAimbot()
  293. end
  294. end)
  295.  
  296. -- ================= LOOP =================
  297. RunService.RenderStepped:Connect(UpdateESP)
RAW Paste Data Copied