What's new
Heapleak - Scripthub

Get the most out of HeapLeak by creating a free account! Once signed in, you’ll gain full access to restricted content, be able to share your own scripts, and participate in our member-only discussions.

Simple fly esp and aimbot

Version / Update: v1.0.0
Download / Script Link
-- INJECTION NOTIFICATION
local StarterGui = game:GetService("StarterGui")
StarterGui:SetCore("ChatMakeSystemMessage", { Text = "[SCRIPT] Injected Successfully"; Color = Color3.fromRGB(0, 255, 0); Font = Enum.Font.GothamSemibold; FontSize = Enum.FontSize.Size18; })

-- SERVICES
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Camera = workspace.CurrentCamera
local Workspace = game:GetService("Workspace")

-- PLAYER
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local Humanoid = Character:WaitForChild("Humanoid")

-- VARIABLES
local FlyEnabled = false
local ESPEnabled = false
local AimbotEnabled = false
local FlySpeed = 100
local AimbotFOV = 150 -- Larger FOV for easier targeting
local FlySmoothness = 50 --Higher value, smoother flight. Tune to your liking

-- FLY SCRIPT
local function toggleFly()
FlyEnabled = not FlyEnabled
if FlyEnabled then
StarterGui:SetCore("ChatMakeSystemMessage", { Text = "[SCRIPT] Fly: ON", Color = Color3.new(0,1,0) })
Humanoid.Changed:Connect(function()
if Humanoid.Health == 0 then
FlyEnabled = false
end
end)
else
StarterGui:SetCore("ChatMakeSystemMessage", { Text = "[SCRIPT] Fly: OFF", Color = Color3.new(1,0,0) })
end
end

-- FLY CONTROLS
local flyControl = {F = 0, B = 0, L = 0, R = 0}
RunService.Heartbeat:Connect(function()
if FlyEnabled and HumanoidRootPart and Humanoid.Health > 0 then
Humanoid.PlatformStand = true
local camCF = Camera.CFrame
local vel = camCF:VectorToWorldSpace(Vector3.new(flyControl.L + flyControl.R, flyControl.F - flyControl.B, 0)) * FlySpeed
HumanoidRootPart.Velocity = vel * (FlySmoothness/100) --Smooths out the flying!
HumanoidRootPart.CFrame = CFrame.new(HumanoidRootPart.Position, HumanoidRootPart.Position + camCF.LookVector)
else
if Humanoid then
Humanoid.PlatformStand = false
end
end
end)

-- ESP SCRIPT
local ESP_Container = Instance.new("Folder")
ESP_Container.Name = "ESP_Container"
ESP_Container.Parent = game.CoreGui

local function createESP(player)
if player == Player or ESP_Container:FindFirstChild(player.Name) then return end
if not player.Character or not player.Character:FindFirstChild("HumanoidRootPart") then return end
local ESP = ESP_Container:FindFirstChild(player.Name)
if not ESP then
ESP = Instance.new("BillboardGui")
ESP.Name = player.Name
ESP.Adornee = player.Character:FindFirstChild("HumanoidRootPart")
ESP.Size = UDim2.new(5, 0, 5, 0)
ESP.StudsOffset = Vector3.new(0, 3, 0)
ESP.Parent = ESP_Container
ESP.AlwaysOnTop = true -- Makes ESP appear on top of walls!
local Frame = Instance.new("Frame")
Frame.Size = UDim2.new(1, 0, 1, 0)
Frame.BackgroundTransparency = 0.5
Frame.BackgroundColor3 = Color3.new(0, 1, 0)
Frame.BorderSizePixel = 0
Frame.Parent = ESP
local NameLabel = Instance.new("TextLabel")
NameLabel.Size = UDim2.new(1, 0, 0, 20)
NameLabel.BackgroundTransparency = 1
NameLabel.Text = player.Name
NameLabel.TextColor3 = Color3.new(1, 1, 1)
NameLabel.TextStrokeTransparency = 0
NameLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
NameLabel.Font = Enum.Font.SourceSansBold
NameLabel.TextSize = 14
NameLabel.Parent = ESP
end
end

local function toggleESP()
ESPEnabled = not ESPEnabled
if ESPEnabled then
StarterGui:SetCore("ChatMakeSystemMessage", { Text = "[SCRIPT] ESP: ON", Color = Color3.new(0,1,0) })
for _, v in pairs(Players:GetPlayers()) do
createESP(v)
end
Players.PlayerAdded:Connect(createESP)
else
StarterGui:SetCore("ChatMakeSystemMessage", { Text = "[SCRIPT] ESP: OFF", Color = Color3.new(1,0,0) })
for _, v in pairs(ESP_Container:GetChildren()) do
v:Destroy()
end
Players.PlayerAdded:Disconnect(createESP)
end
end

-- AIMBOT SCRIPT
local function toggleAimbot()
AimbotEnabled = not AimbotEnabled
if AimbotEnabled then
StarterGui:SetCore("ChatMakeSystemMessage", { Text = "[SCRIPT] Aimbot: ON", Color = Color3.new(0,1,0) })
else
StarterGui:SetCore("ChatMakeSystemMessage", { Text = "[SCRIPT] Aimbot: OFF", Color = Color3.new(1,0,0) })
end
end

local function getClosestTarget()
local closestPlayer = nil
local shortestDist = AimbotFOV
for _, player in pairs(Players:GetPlayers()) do
if player ~= Player and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
local head = player.Character:FindFirstChild("Head")
if head then
local pos, vis = Camera:WorldToScreenPoint(head.Position) -- Target the head!
if vis then
local dist = (Vector2.new(pos.X, pos.Y) - Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)).Magnitude
if dist < shortestDist then
shortestDist = dist
closestPlayer = player
end
end
end
end
end
return closestPlayer
end

RunService.RenderStepped:Connect(function()
if AimbotEnabled and Humanoid and Humanoid.Health > 0 then
local target = getClosestTarget()
if target and target.Character:FindFirstChild("HumanoidRootPart") then
local head = target.Character:FindFirstChild("Head")
if head then
Camera.CFrame = CFrame.new(Camera.CFrame.Position, head.Position) -- Lock onto the head!
end
end
end
end)

-- INPUT HANDLING
UserInputService.InputBegan:Connect(function(input, GPE)
if GPE then return end -- TOGGLES
if input.KeyCode == Enum.KeyCode.F1 then
toggleAimbot()
elseif input.KeyCode == Enum.KeyCode.F2 then
toggleESP()
elseif input.KeyCode == Enum.KeyCode.F3 then
toggleFly()
end -- FLY CONTROLS
if FlyEnabled then
if input.KeyCode == Enum.KeyCode.W then
flyControl.F = 1
elseif input.KeyCode == Enum.KeyCode.S then
flyControl.B = 1
elseif input.KeyCode == Enum.KeyCode.A then
flyControl.L = -1
elseif input.KeyCode == Enum.KeyCode.D then
flyControl.R = 1
end
end
end)

UserInputService.InputEnded:Connect(function(input, GPE)
if GPE then return end -- FLY CONTROLS
if FlyEnabled then
if input.KeyCode == Enum.KeyCode.W then
flyControl.F = 0
elseif input.KeyCode == Enum.KeyCode.S then
flyControl.B = 0
elseif input.KeyCode == Enum.KeyCode.A then
flyControl.L = 0
elseif input.KeyCode == Enum.KeyCode.D then
flyControl.R = 0
end
end
end)
[ View More ]
b904599b-0e57-42ee-8bd0-92fd7b746a7f.webp


This is my first script so its not gona be the best but I worked hard on it simply click f1 to fly f2 for esp and f3 for aimbot and click it again to disable it/enable it I have tested it and it works fine it seems to work the best on the fps game flick and gun grounds ffa, on other games sometimes the esp wont work or the aimbot is a bit laggy but i will try to fix it just try to use it on older games stuff like that. have fun :)
 
Back
Top