Not a member of GistPad yet?
Sign Up,
it unlocks many cool features!
- -- ROCKET Universal ESP & Aimbot (full rewrite)
- -- Language: Luau (Roblox)
- -- Функционал: ESP (Highlight + имя + дистанция с корректной обработкой респавна и поздних подключений),
- -- Aimbot (плавное наведение на ближайшую цель в радиусе FOV)
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local UserInputService = game:GetService("UserInputService")
- local Camera = workspace.CurrentCamera
- local LocalPlayer = Players.LocalPlayer
- local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
- -- ================= НАСТРОЙКИ =================
- local Settings = {
- ESP = {
- Enabled = true,
- Color = Color3.fromRGB(255, 0, 0),
- FillTransparency = 0.5,
- ShowName = true,
- ShowDistance = true,
- },
- Aimbot = {
- Enabled = false,
- FOV = 150, -- радиус поиска цели в пикселях
- Smoothness = 0.25, -- чем меньше — тем резче
- TargetPart = "Head", -- "Head" / "HumanoidRootPart" / "UpperTorso"
- TeamCheck = false,
- },
- }
- -- ================= ESP =================
- local espObjects = {} -- [Player] = { Highlight, BillboardGui, NameLabel, DistanceLabel, Character }
- local function DestroyESP(player)
- local data = espObjects[player]
- if data then
- if data.Highlight and data.Highlight.Parent then data.Highlight:Destroy() end
- if data.BillboardGui and data.BillboardGui.Parent then data.BillboardGui:Destroy() end
- espObjects[player] = nil
- end
- end
- local function SetupCharacter(player, character)
- if player == LocalPlayer then return end
- if not character or not character.Parent then return end
- -- Ждём Head и Humanoid (важно для только что зашедших и для респавна)
- local head = character:WaitForChild("Head", 5)
- local humanoid = character:WaitForChild("Humanoid", 5)
- if not head or not humanoid then return end
- -- Если уже настроено для этого же персонажа — не пересоздаём
- local existing = espObjects[player]
- if existing
- and existing.Character == character
- and existing.Highlight and existing.Highlight.Parent
- and existing.BillboardGui and existing.BillboardGui.Parent
- then
- return
- end
- DestroyESP(player)
- -- Highlight
- local highlight = Instance.new("Highlight")
- highlight.Name = "ROCKET_ESP"
- highlight.FillColor = Settings.ESP.Color
- highlight.FillTransparency = Settings.ESP.FillTransparency
- highlight.OutlineColor = Settings.ESP.Color
- highlight.OutlineTransparency = 0
- highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
- highlight.Enabled = Settings.ESP.Enabled
- highlight.Parent = character
- -- BillboardGui (имя + дистанция)
- local billboard = Instance.new("BillboardGui")
- billboard.Name = "ROCKET_ESP_Billboard"
- billboard.Adornee = head
- billboard.Size = UDim2.new(0, 150, 0, 50)
- billboard.StudsOffset = Vector3.new(0, 2.5, 0)
- billboard.AlwaysOnTop = true
- billboard.Enabled = Settings.ESP.Enabled
- billboard.Parent = head
- local nameLabel = Instance.new("TextLabel")
- nameLabel.Name = "NameLabel"
- nameLabel.Size = UDim2.new(1, 0, 0.5, 0)
- nameLabel.BackgroundTransparency = 1
- nameLabel.Text = player.Name
- nameLabel.TextColor3 = Settings.ESP.Color
- nameLabel.TextStrokeTransparency = 0
- nameLabel.TextScaled = true
- nameLabel.Font = Enum.Font.SourceSansBold
- nameLabel.Parent = billboard
- local distLabel = Instance.new("TextLabel")
- distLabel.Name = "DistanceLabel"
- distLabel.Size = UDim2.new(1, 0, 0.5, 0)
- distLabel.Position = UDim2.new(0, 0, 0.5, 0)
- distLabel.BackgroundTransparency = 1
- distLabel.Text = ""
- distLabel.TextColor3 = Settings.ESP.Color
- distLabel.TextStrokeTransparency = 0
- distLabel.TextScaled = true
- distLabel.Font = Enum.Font.SourceSans
- distLabel.Parent = billboard
- espObjects[player] = {
- Highlight = highlight,
- BillboardGui = billboard,
- NameLabel = nameLabel,
- DistanceLabel = distLabel,
- Character = character,
- }
- end
- local function CreateESP(player)
- if player == LocalPlayer then return end
- -- Если персонаж уже есть — настраиваем сразу
- if player.Character then
- task.spawn(SetupCharacter, player, player.Character)
- end
- -- Подписка на появление / респавн персонажа
- player.CharacterAdded:Connect(function(character)
- SetupCharacter(player, character)
- end)
- end
- -- ВАЖНО: сначала подписка, потом обработка существующих
- Players.PlayerAdded:Connect(CreateESP)
- Players.PlayerRemoving:Connect(DestroyESP)
- for _, player in ipairs(Players:GetPlayers()) do
- if player ~= LocalPlayer then
- CreateESP(player)
- end
- end
- local function UpdateESP()
- for player, data in pairs(espObjects) do
- local character = player.Character
- if not character or not character.Parent then
- DestroyESP(player)
- continue
- end
- -- Смена персонажа (респавн) — пересоздаём
- if data.Character ~= character then
- SetupCharacter(player, character)
- continue
- end
- if data.Highlight and data.Highlight.Parent then
- data.Highlight.Enabled = Settings.ESP.Enabled
- end
- if data.BillboardGui and data.BillboardGui.Parent then
- data.BillboardGui.Enabled = Settings.ESP.Enabled
- end
- if Settings.ESP.Enabled and Settings.ESP.ShowDistance then
- local root = character:FindFirstChild("HumanoidRootPart")
- if root and data.DistanceLabel and data.DistanceLabel.Parent then
- local dist = (Camera.CFrame.Position - root.Position).Magnitude
- data.DistanceLabel.Text = string.format("%d studs", math.floor(dist))
- end
- end
- if data.NameLabel and data.NameLabel.Parent then
- data.NameLabel.Visible = Settings.ESP.ShowName
- end
- end
- end
- -- ================= AIMBOT =================
- local function GetClosestTarget()
- local mousePos = UserInputService:GetMouseLocation()
- local closestPart
- local shortestDist = Settings.Aimbot.FOV
- for _, player in ipairs(Players:GetPlayers()) do
- if player == LocalPlayer then continue end
- if not player.Character then continue end
- if Settings.Aimbot.TeamCheck and player.Team == LocalPlayer.Team then
- continue
- end
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- if not humanoid or humanoid.Health <= 0 then continue end
- local targetPart = player.Character:FindFirstChild(Settings.Aimbot.TargetPart)
- if not targetPart then continue end
- local screenPos, onScreen = Camera:WorldToViewportPoint(targetPart.Position)
- if not onScreen then continue end
- local dist = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude
- if dist < shortestDist then
- shortestDist = dist
- closestPart = targetPart
- end
- end
- return closestPart
- end
- local aimbotConnection
- local function StartAimbot()
- if aimbotConnection then return end
- aimbotConnection = RunService.RenderStepped:Connect(function()
- if not Settings.Aimbot.Enabled then return end
- local targetPart = GetClosestTarget()
- if not targetPart then return end
- local currentCFrame = Camera.CFrame
- local desiredCFrame = CFrame.new(currentCFrame.Position, targetPart.Position)
- Camera.CFrame = currentCFrame:Lerp(desiredCFrame, Settings.Aimbot.Smoothness)
- end)
- end
- local function StopAimbot()
- if aimbotConnection then
- aimbotConnection:Disconnect()
- aimbotConnection = nil
- end
- end
- -- ================= GUI =================
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "ROCKET_GUI"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = PlayerGui
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0, 200, 0, 120)
- frame.Position = UDim2.new(0, 10, 0, 10)
- frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- frame.BorderSizePixel = 0
- frame.Parent = screenGui
- local frameCorner = Instance.new("UICorner")
- frameCorner.CornerRadius = UDim.new(0, 8)
- frameCorner.Parent = frame
- local espBtn = Instance.new("TextButton")
- espBtn.Size = UDim2.new(1, -20, 0, 40)
- espBtn.Position = UDim2.new(0, 10, 0, 10)
- espBtn.BackgroundColor3 = Color3.fromRGB(60, 180, 60)
- espBtn.Text = "ESP: ON"
- espBtn.TextColor3 = Color3.new(1, 1, 1)
- espBtn.Font = Enum.Font.SourceSansBold
- espBtn.TextSize = 18
- espBtn.Parent = frame
- local espCorner = Instance.new("UICorner")
- espCorner.CornerRadius = UDim.new(0, 6)
- espCorner.Parent = espBtn
- espBtn.MouseButton1Click:Connect(function()
- Settings.ESP.Enabled = not Settings.ESP.Enabled
- espBtn.Text = "ESP: " .. (Settings.ESP.Enabled and "ON" or "OFF")
- espBtn.BackgroundColor3 = Settings.ESP.Enabled and Color3.fromRGB(60, 180, 60) or Color3.fromRGB(180, 60, 60)
- end)
- local aimBtn = Instance.new("TextButton")
- aimBtn.Size = UDim2.new(1, -20, 0, 40)
- aimBtn.Position = UDim2.new(0, 10, 0, 60)
- aimBtn.BackgroundColor3 = Color3.fromRGB(180, 60, 60)
- aimBtn.Text = "AIMBOT: OFF"
- aimBtn.TextColor3 = Color3.new(1, 1, 1)
- aimBtn.Font = Enum.Font.SourceSansBold
- aimBtn.TextSize = 18
- aimBtn.Parent = frame
- local aimCorner = Instance.new("UICorner")
- aimCorner.CornerRadius = UDim.new(0, 6)
- aimCorner.Parent = aimBtn
- aimBtn.MouseButton1Click:Connect(function()
- Settings.Aimbot.Enabled = not Settings.Aimbot.Enabled
- aimBtn.Text = "AIMBOT: " .. (Settings.Aimbot.Enabled and "ON" or "OFF")
- aimBtn.BackgroundColor3 = Settings.Aimbot.Enabled and Color3.fromRGB(60, 180, 60) or Color3.fromRGB(180, 60, 60)
- if Settings.Aimbot.Enabled then
- StartAimbot()
- else
- StopAimbot()
- end
- end)
- -- ================= LOOP =================
- RunService.RenderStepped:Connect(UpdateESP)
RAW Paste Data
Copied
