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 shit

Version / Update: v1.0.0
Download / Script Link
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local localPlayer = Players.LocalPlayer
local character = localPlayer.Character or localPlayer.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local camera = workspace.CurrentCamera

-- Settings
local aimbotEnabled = false -- controlled by GUI
local espEnabled = true -- starts on, can toggle

-- Camera Lock Function
local function lockCamera(target)
if target then
local lookVector = (target.Position - camera.CFrame.Position).Unit
camera.CFrame = CFrame.new(camera.CFrame.Position, camera.CFrame.Position + lookVector)
end
end

-- Right-click tracking
local rightMouseDown = false

UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.UserInputType == Enum.UserInputType.MouseButton2 then
rightMouseDown = true
end
end)

UserInputService.InputEnded:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.UserInputType == Enum.UserInputType.MouseButton2 then
rightMouseDown = false
end
end)

-- Main camera update loop
RunService.RenderStepped:Connect(function()
if humanoid.Health <= 0 then return end

if aimbotEnabled and rightMouseDown then
local mouseTarget = UserInputService:GetMouseTarget()
lockCamera(mouseTarget)
end
end)

-- ────────────────────────────────────────────────
-- SIMPLE GUI
-- ────────────────────────────────────────────────

local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "CheatMenu"
ScreenGui.ResetOnSpawn = false
ScreenGui.Parent = localPlayer:WaitForChild("PlayerGui")

local Frame = Instance.new("Frame")
Frame.Size = UDim2.new(0, 180, 0, 140)
Frame.Position = UDim2.new(0.5, -90, 0.3, -70)
Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 35)
Frame.BorderSizePixel = 0
Frame.Active = true
Frame.Draggable = true
Frame.Parent = ScreenGui

local UICorner = Instance.new("UICorner")
UICorner.CornerRadius = UDim.new(0, 8)
UICorner.Parent = Frame

local Title = Instance.new("TextLabel")
Title.Size = UDim2.new(1, 0, 0, 30)
Title.BackgroundTransparency = 1
Title.Text = "Cheat Menu"
Title.TextColor3 = Color3.fromRGB(220, 220, 220)
Title.Font = Enum.Font.SourceSansBold
Title.TextSize = 18
Title.Parent = Frame

-- Aimbot Toggle
local AimbotButton = Instance.new("TextButton")
AimbotButton.Size = UDim2.new(0.9, 0, 0, 35)
AimbotButton.Position = UDim2.new(0.05, 0, 0.3, 0)
AimbotButton.BackgroundColor3 = Color3.fromRGB(50, 50, 55)
AimbotButton.Text = "Aimbot: OFF"
AimbotButton.TextColor3 = Color3.fromRGB(255, 80, 80)
AimbotButton.Font = Enum.Font.SourceSans
AimbotButton.TextSize = 16
AimbotButton.Parent = Frame

local AimbotCorner = Instance.new("UICorner")
AimbotCorner.CornerRadius = UDim.new(0, 6)
AimbotCorner.Parent = AimbotButton

AimbotButton.MouseButton1Click:Connect(function()
aimbotEnabled = not aimbotEnabled
if aimbotEnabled then
AimbotButton.Text = "Aimbot: ON"
AimbotButton.TextColor3 = Color3.fromRGB(80, 255, 80)
AimbotButton.BackgroundColor3 = Color3.fromRGB(40, 70, 40)
else
AimbotButton.Text = "Aimbot: OFF"
AimbotButton.TextColor3 = Color3.fromRGB(255, 80, 80)
AimbotButton.BackgroundColor3 = Color3.fromRGB(50, 50, 55)
end
end)

-- ESP Toggle
local ESPButton = Instance.new("TextButton")
ESPButton.Size = UDim2.new(0.9, 0, 0, 35)
ESPButton.Position = UDim2.new(0.05, 0, 0.62, 0)
ESPButton.BackgroundColor3 = Color3.fromRGB(50, 50, 55)
ESPButton.Text = "ESP: ON"
ESPButton.TextColor3 = Color3.fromRGB(80, 255, 80)
ESPButton.Font = Enum.Font.SourceSans
ESPButton.TextSize = 16
ESPButton.Parent = Frame

local ESPCorner = Instance.new("UICorner")
ESPCorner.CornerRadius = UDim.new(0, 6)
ESPCorner.Parent = ESPButton

ESPButton.MouseButton1Click:Connect(function()
espEnabled = not espEnabled
if espEnabled then
ESPButton.Text = "ESP: ON"
ESPButton.TextColor3 = Color3.fromRGB(80, 255, 80)
ESPButton.BackgroundColor3 = Color3.fromRGB(40, 70, 40)
else
ESPButton.Text = "ESP: OFF"
ESPButton.TextColor3 = Color3.fromRGB(255, 80, 80)
ESPButton.BackgroundColor3 = Color3.fromRGB(50, 50, 55)
end

-- Immediately hide/show existing ESP (simple way)
for _, obj in ipairs(workspace.CurrentCamera:GetChildren()) do
if obj:IsA("Highlight") or obj:IsA("BillboardGui") then
obj.Enabled = espEnabled
end
end
end)

-- ────────────────────────────────────────────────
-- ESP Logic
-- ────────────────────────────────────────────────

local ESPOverlays = {} -- track created Billboards per player

local function createESP(player)
if player == localPlayer then return end

local function updateESP()
if not espEnabled then return end

local char = player.Character
if not char then return end

local head = char:FindFirstChild("Head")
if not head then return end

if not ESPOverlays[player] then
local overlay = Instance.new("BillboardGui")
overlay.Name = "NameTag"
overlay.Size = UDim2.new(0, 150, 0, 50)
overlay.StudsOffset = Vector3.new(0, 2.5, 0)
overlay.AlwaysOnTop = true
overlay.Parent = head

local text = Instance.new("TextLabel")
text.Size = UDim2.new(1, 0, 1, 0)
text.BackgroundTransparency = 0.6
text.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
text.TextColor3 = Color3.fromRGB(255, 255, 255)
text.Text = player.Name
text.Font = Enum.Font.SourceSansBold
text.TextSize = 14
text.Parent = overlay

local highlight = Instance.new("Highlight")
highlight.Name = "PlayerHighlight"
highlight.Adornee = char
highlight.FillColor = Color3.fromRGB(255, 0, 0)
highlight.FillTransparency = 0.6
highlight.OutlineColor = Color3.fromRGB(255, 100, 100)
highlight.OutlineTransparency = 0.1
highlight.Parent = workspace.CurrentCamera

ESPOverlays[player] = {Billboard = overlay, Highlight = highlight}
end

ESPOverlays[player].Billboard.Enabled = espEnabled
ESPOverlays[player].Highlight.Enabled = espEnabled
end

-- Initial
if player.Character then updateESP() end

-- Updates
player.CharacterAdded:Connect(updateESP)
player.CharacterRemoving:Connect(function()
if ESPOverlays[player] then
if ESPOverlays[player].Billboard then ESPOverlays[player].Billboard:Destroy() end
if ESPOverlays[player].Highlight then ESPOverlays[player].Highlight:Destroy() end
ESPOverlays[player] = nil
end
end)
end

-- Apply to existing players
for _, plr in ipairs(Players:GetPlayers()) do
createESP(plr)
end

Players.PlayerAdded:Connect(createESP)

-- Cleanup when players leave
Players.PlayerRemoving:Connect(function(plr)
if ESPOverlays[plr] then
if ESPOverlays[plr].Billboard then ESPOverlays[plr].Billboard:Destroy() end
if ESPOverlays[plr].Highlight then ESPOverlays[plr].Highlight:Destroy() end
ESPOverlays[plr] = nil
end
end)

-- Optional: small label saying "Right-click to aim when enabled"
local InfoLabel = Instance.new("TextLabel")
InfoLabel.Size = UDim2.new(0.9, 0, 0, 20)
InfoLabel.Position = UDim2.new(0.05, 0, 0.9, -10)
InfoLabel.BackgroundTransparency = 1
InfoLabel.Text = "(Hold RMB to aim)"
InfoLabel.TextColor3 = Color3.fromRGB(180, 180, 180)
InfoLabel.Font = Enum.Font.SourceSans
InfoLabel.TextSize = 13
InfoLabel.Parent = Frame
[ View More ]
19c805bc-5c11-4656-954e-2b04492c47a9.webp


simple aimlock esp and gui for testing
 
Back
Top