
Key Required
HVH and Auto clicker
Lua Script•176 lines (5284 chars)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local VirtualInputManager = game:GetService("VirtualInputManager")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "by RobloxMAN"
screenGui.Parent = player:WaitForChild("PlayerGui")
local mainFrame = Instance.new("Frame")
mainFrame.Size = UDim2.new(0, 200, 0, 150)
mainFrame.Position = UDim2.new(0.5, -100, 0.5, -75)
mainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
mainFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
mainFrame.BorderSizePixel = 2
mainFrame.BorderColor3 = Color3.fromRGB(100, 100, 100)
mainFrame.Active = true
mainFrame.Draggable = true
mainFrame.Selectable = true
mainFrame.Parent = screenGui
local titleBar = Instance.new("Frame")
titleBar.Size = UDim2.new(1, 0, 0, 30)
titleBar.Position = UDim2.new(0, 0, 0, 0)
titleBar.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
titleBar.Parent = mainFrame
local titleLabel = Instance.new("TextLabel")
titleLabel.Size = UDim2.new(1, 0, 1, 0)
titleLabel.Position = UDim2.new(0, 0, 0, 0)
titleLabel.BackgroundTransparency = 1
titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
titleLabel.Text = "by RobloxMAN"
titleLabel.Font = Enum.Font.SourceSansBold
titleLabel.TextSize = 18
titleLabel.Parent = titleBar
local hvhButton = Instance.new("TextButton")
hvhButton.Size = UDim2.new(0.9, 0, 0, 30)
hvhButton.Position = UDim2.new(0.05, 0, 0, 40)
hvhButton.BackgroundColor3 = Color3.fromRGB(80, 80, 200)
hvhButton.TextColor3 = Color3.fromRGB(255, 255, 255)
hvhButton.Text = "HVH (G): OFF"
hvhButton.Font = Enum.Font.SourceSansBold
hvhButton.TextSize = 14
hvhButton.Parent = mainFrame
local autoClickButton = Instance.new("TextButton")
autoClickButton.Size = UDim2.new(0.9, 0, 0, 30)
autoClickButton.Position = UDim2.new(0.05, 0, 0, 80)
autoClickButton.BackgroundColor3 = Color3.fromRGB(80, 80, 200)
autoClickButton.TextColor3 = Color3.fromRGB(255, 255, 255)
autoClickButton.Text = "AutoClick (E): OFF"
autoClickButton.Font = Enum.Font.SourceSansBold
autoClickButton.TextSize = 14
autoClickButton.Parent = mainFrame
local ball = nil
local hvhEnabled = false
local autoClickEnabled = false
local isFollowing = false
local clickConnection = nil
local function findBall()
local ballsFolder = workspace:FindFirstChild("Balls")
if ballsFolder then
for _, obj in pairs(ballsFolder:GetChildren()) do
local foundBall = obj:FindFirstChild("Ball")
if foundBall then
return foundBall
end
end
end
return nil
end
local function followBall()
if not ball or not ball:IsDescendantOf(workspace) or not humanoidRootPart then
isFollowing = false
return
end
isFollowing = true
while isFollowing and ball and ball:IsDescendantOf(workspace) and hvhEnabled do
humanoidRootPart.CFrame = CFrame.new(ball.Position)
RunService.Heartbeat:Wait()
end
isFollowing = false
end
local function startAutoClick()
if autoClickEnabled then
clickConnection = RunService.Heartbeat:Connect(function()
if autoClickEnabled then
VirtualInputManager:SendMouseButtonEvent(0, 0, 0, true, game, 1)
task.wait(0.05)
VirtualInputManager:SendMouseButtonEvent(0, 0, 0, false, game, 1)
end
end)
end
end
local function stopAutoClick()
if clickConnection then
clickConnection:Disconnect()
clickConnection = nil
end
end
local function toggleHVH()
hvhEnabled = not hvhEnabled
if hvhEnabled then
hvhButton.BackgroundColor3 = Color3.fromRGB(200, 80, 80)
hvhButton.Text = "HVH (G): ON"
if ball then
followBall()
end
else
hvhButton.BackgroundColor3 = Color3.fromRGB(80, 80, 200)
hvhButton.Text = "HVH (G): OFF"
isFollowing = false
end
end
local function toggleAutoClick()
autoClickEnabled = not autoClickEnabled
if autoClickEnabled then
autoClickButton.BackgroundColor3 = Color3.fromRGB(200, 80, 80)
autoClickButton.Text = "AutoClick (E): ON"
startAutoClick()
else
autoClickButton.BackgroundColor3 = Color3.fromRGB(80, 80, 200)
autoClickButton.Text = "AutoClick (E): OFF"
stopAutoClick()
end
end
RunService.Heartbeat:Connect(function()
ball = findBall()
if ball and hvhEnabled and not isFollowing then
followBall()
end
end)
hvhButton.MouseButton1Click:Connect(function()
toggleHVH()
end)
autoClickButton.MouseButton1Click:Connect(function()
toggleAutoClick()
end)
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.G then
toggleHVH()
elseif input.KeyCode == Enum.KeyCode.E then
toggleAutoClick()
end
end)
player.CharacterAdded:Connect(function(newChar)
character = newChar
humanoidRootPart = newChar:WaitForChild("HumanoidRootPart")
end)Features & Information
my discord: dualjuja
HVH and Auto clicker
Community Comments (0)
No comments yet for this script.
