H4X Hub
Key RequiredUniversal

H4X Hub

Universal Scripthuynhthuykieu08huynhthuykieu08 1.5K views 11K executesUpdated Sep 4, 2026
Unrated
00
Lua Scriptโ€ข789 lines (17246 chars)
--========================================================
-- H4X HUB v2
-- KEY SYSTEM + INFO + PVP DUMMY TEST
-- LocalScript
-- StarterPlayer > StarterPlayerScripts
--========================================================

local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")

local LP = Players.LocalPlayer
local PG = LP:WaitForChild("PlayerGui")

--========================================================
-- CONFIG
--========================================================

local KEY = "H4X101"
local GET_KEY_LINK = "https://discord.gg/gDvrYYDNv"

local FOV_LIST = {75,100,125,150,175,200,250,300}
local AIM_LIST = {"Head","UpperTorso","Torso","HumanoidRootPart"}

local FOV_INDEX = 4
local AIM_INDEX = 1

local FOV = FOV_LIST[FOV_INDEX]
local AIM_PART = AIM_LIST[AIM_INDEX]

local TEST_ENABLED = false
local WALL_CHECK = true
local SHOW_FOV = true

local Target = nil

--========================================================
-- REMOVE OLD
--========================================================

for _,name in ipairs({
	"H4X_HUB",
	"H4X_PVP_TEST"
}) do
	local old = PG:FindFirstChild(name)
	if old then
		old:Destroy()
	end
end

--========================================================
-- SCREEN GUI
--========================================================

local Gui = Instance.new("ScreenGui")
Gui.Name = "H4X_HUB"
Gui.ResetOnSpawn = false
Gui.IgnoreGuiInset = true
Gui.DisplayOrder = 999999
Gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
Gui.Parent = PG

--========================================================
-- UTILITY
--========================================================

local function Corner(obj,r)
	local c = Instance.new("UICorner")
	c.CornerRadius = UDim.new(0,r)
	c.Parent = obj
	return c
end

local function Button(parent,text,pos,size)
	local b = Instance.new("TextButton")
	b.Position = pos
	b.Size = size
	b.BackgroundColor3 = Color3.fromRGB(47,47,58)
	b.BorderSizePixel = 0
	b.Text = text
	b.TextColor3 = Color3.new(1,1,1)
	b.TextSize = 14
	b.Font = Enum.Font.GothamBold
	b.Parent = parent
	Corner(b,8)
	return b
end

--========================================================
-- KEY WINDOW
--========================================================

local KeyFrame = Instance.new("Frame")
KeyFrame.Size = UDim2.fromOffset(360,230)
KeyFrame.Position = UDim2.new(.5,-180,.5,-115)
KeyFrame.BackgroundColor3 = Color3.fromRGB(20,20,27)
KeyFrame.BorderSizePixel = 0
KeyFrame.Parent = Gui
Corner(KeyFrame,12)

local KeyTitle = Instance.new("TextLabel")
KeyTitle.Size = UDim2.new(1,-30,0,45)
KeyTitle.Position = UDim2.fromOffset(15,8)
KeyTitle.BackgroundTransparency = 1
KeyTitle.Text = "H4X HUB v2"
KeyTitle.TextColor3 = Color3.new(1,1,1)
KeyTitle.TextSize = 24
KeyTitle.Font = Enum.Font.GothamBold
KeyTitle.TextXAlignment = Enum.TextXAlignment.Left
KeyTitle.Parent = KeyFrame

local KeySub = Instance.new("TextLabel")
KeySub.Size = UDim2.new(1,-30,0,25)
KeySub.Position = UDim2.fromOffset(15,48)
KeySub.BackgroundTransparency = 1
KeySub.Text = "KEYLESS SYSTEM"
KeySub.TextColor3 = Color3.fromRGB(155,155,165)
KeySub.TextSize = 11
KeySub.Font = Enum.Font.Gotham
KeySub.TextXAlignment = Enum.TextXAlignment.Left
KeySub.Parent = KeyFrame

local KeyBox = Instance.new("TextBox")
KeyBox.Size = UDim2.new(1,-40,0,42)
KeyBox.Position = UDim2.fromOffset(20,80)
KeyBox.BackgroundColor3 = Color3.fromRGB(32,32,42)
KeyBox.BorderSizePixel = 0
KeyBox.PlaceholderText = "Enter key..."
KeyBox.PlaceholderColor3 = Color3.fromRGB(110,110,120)
KeyBox.Text = ""
KeyBox.TextColor3 = Color3.new(1,1,1)
KeyBox.TextSize = 15
KeyBox.Font = Enum.Font.Gotham
KeyBox.ClearTextOnFocus = false
KeyBox.Parent = KeyFrame
Corner(KeyBox,8)

local Verify = Button(
	KeyFrame,
	"VERIFY KEY",
	UDim2.fromOffset(20,132),
	UDim2.new(1,-40,0,38)
)

local GetKey = Instance.new("TextButton")
GetKey.Size = UDim2.new(1,-40,0,32)
GetKey.Position = UDim2.fromOffset(20,180)
GetKey.BackgroundTransparency = 1
GetKey.Text = "GET KEY"
GetKey.TextColor3 = Color3.fromRGB(180,180,190)
GetKey.TextSize = 13
GetKey.Font = Enum.Font.GothamBold
GetKey.Parent = KeyFrame

--========================================================
-- MAIN HUB
--========================================================

local Main = Instance.new("Frame")
Main.Name = "Main"
Main.Size = UDim2.fromOffset(340,400)
Main.Position = UDim2.new(.5,-170,.5,-200)
Main.BackgroundColor3 = Color3.fromRGB(24,24,32)
Main.BorderSizePixel = 0
Main.Visible = false
Main.Active = true
Main.Parent = Gui
Corner(Main,14)

local Title = Instance.new("TextLabel")
Title.Size = UDim2.new(1,-65,0,45)
Title.Position = UDim2.fromOffset(15,5)
Title.BackgroundTransparency = 1
Title.Text = "H4X HUB v2"
Title.TextColor3 = Color3.new(1,1,1)
Title.TextSize = 21
Title.Font = Enum.Font.GothamBold
Title.TextXAlignment = Enum.TextXAlignment.Left
Title.Parent = Main

local Close = Instance.new("TextButton")
Close.Size = UDim2.fromOffset(38,38)
Close.Position = UDim2.new(1,-48,0,8)
Close.BackgroundColor3 = Color3.fromRGB(175,55,55)
Close.BorderSizePixel = 0
Close.Text = "X"
Close.TextColor3 = Color3.new(1,1,1)
Close.TextSize = 16
Close.Font = Enum.Font.GothamBold
Close.Parent = Main
Corner(Close,8)

--========================================================
-- SECOND GUI BUTTON
--========================================================

local PVPButton = Button(
	Main,
	"PVP TEST",
	UDim2.fromOffset(15,70),
	UDim2.new(1,-30,0,45)
)

local InfoButton = Button(
	Main,
	"INFO",
	UDim2.fromOffset(15,125),
	UDim2.new(1,-30,0,45)
)

local Status = Instance.new("TextLabel")
Status.Size = UDim2.new(1,-30,0,80)
Status.Position = UDim2.fromOffset(15,185)
Status.BackgroundTransparency = 1
Status.Text = "H4X HUB v2\nREADY"
Status.TextColor3 = Color3.fromRGB(195,195,205)
Status.TextSize = 14
Status.Font = Enum.Font.GothamBold
Status.Parent = Main

--========================================================
-- OPEN BUTTON
--========================================================

local Open = Button(
	Gui,
	"OPEN HUB",
	UDim2.fromOffset(15,15),
	UDim2.fromOffset(115,45)
)

Open.Visible = false

--========================================================
-- INFO
--========================================================

local InfoFrame = Instance.new("Frame")
InfoFrame.Size = UDim2.fromOffset(340,300)
InfoFrame.Position = UDim2.new(.5,-170,.5,-150)
InfoFrame.BackgroundColor3 = Color3.fromRGB(24,24,32)
InfoFrame.BorderSizePixel = 0
InfoFrame.Visible = false
InfoFrame.ZIndex = 100
InfoFrame.Parent = Gui
Corner(InfoFrame,12)

local InfoTitle = Instance.new("TextLabel")
InfoTitle.Size = UDim2.new(1,-55,0,45)
InfoTitle.Position = UDim2.fromOffset(15,5)
InfoTitle.BackgroundTransparency = 1
InfoTitle.Text = "INFO"
InfoTitle.TextColor3 = Color3.new(1,1,1)
InfoTitle.TextSize = 21
InfoTitle.Font = Enum.Font.GothamBold
InfoTitle.TextXAlignment = Enum.TextXAlignment.Left
InfoTitle.ZIndex = 101
InfoTitle.Parent = InfoFrame

local InfoClose = Instance.new("TextButton")
InfoClose.Size = UDim2.fromOffset(36,36)
InfoClose.Position = UDim2.new(1,-45,0,8)
InfoClose.BackgroundColor3 = Color3.fromRGB(175,55,55)
InfoClose.BorderSizePixel = 0
InfoClose.Text = "X"
InfoClose.TextColor3 = Color3.new(1,1,1)
InfoClose.TextSize = 15
InfoClose.Font = Enum.Font.GothamBold
InfoClose.ZIndex = 102
InfoClose.Parent = InfoFrame
Corner(InfoClose,8)

local InfoText = Instance.new("TextLabel")
InfoText.Size = UDim2.new(1,-30,1,-65)
InfoText.Position = UDim2.fromOffset(15,55)
InfoText.BackgroundTransparency = 1
InfoText.Text =
	"SUPPORTED\n\n" ..
	"โœ“ Delta X\n" ..
	"โœ“ Fluxus\n" ..
	"โœ“ Arceus Executor\n\n" ..
	"NOT SUPPORTED\n\n" ..
	"โœ• Xeno\n" ..
	"โœ• Wave\n" ..
	"โœ• JJSPloit"
InfoText.TextColor3 = Color3.fromRGB(195,195,205)
InfoText.TextSize = 14
InfoText.Font = Enum.Font.Gotham
InfoText.TextYAlignment = Enum.TextYAlignment.Top
InfoText.ZIndex = 101
InfoText.Parent = InfoFrame

--========================================================
-- PVP TEST WINDOW
--========================================================

local PVP = Instance.new("Frame")
PVP.Name = "PVP_TEST"
PVP.Size = UDim2.fromOffset(340,430)
PVP.Position = UDim2.new(.5,-170,.5,-215)
PVP.BackgroundColor3 = Color3.fromRGB(24,24,32)
PVP.BorderSizePixel = 0
PVP.Visible = false
PVP.Active = true
PVP.Parent = Gui
Corner(PVP,14)

local PVPTitle = Instance.new("TextLabel")
PVPTitle.Size = UDim2.new(1,-60,0,45)
PVPTitle.Position = UDim2.fromOffset(15,5)
PVPTitle.BackgroundTransparency = 1
PVPTitle.Text = "PVP TEST"
PVPTitle.TextColor3 = Color3.new(1,1,1)
PVPTitle.TextSize = 20
PVPTitle.Font = Enum.Font.GothamBold
PVPTitle.TextXAlignment = Enum.TextXAlignment.Left
PVPTitle.Parent = PVP

local PvpClose = Instance.new("TextButton")
PvpClose.Size = UDim2.fromOffset(38,38)
PvpClose.Position = UDim2.new(1,-48,0,8)
PvpClose.BackgroundColor3 = Color3.fromRGB(175,55,55)
PvpClose.BorderSizePixel = 0
PvpClose.Text = "X"
PvpClose.TextColor3 = Color3.new(1,1,1)
PvpClose.TextSize = 16
PvpClose.Font = Enum.Font.GothamBold
PvpClose.Parent = PVP
Corner(PvpClose,8)

local TestButton = Button(
	PVP,
	"TARGET DUMMY : OFF",
	UDim2.fromOffset(15,70),
	UDim2.new(1,-30,0,43)
)

local ModeButton = Button(
	PVP,
	"MODE : TEAM",
	UDim2.fromOffset(15,120),
	UDim2.new(1,-30,0,43)
)

local FOVButton = Button(
	PVP,
	"FOV : "..FOV,
	UDim2.fromOffset(15,170),
	UDim2.new(1,-30,0,43)
)

local AimButton = Button(
	PVP,
	"AIM PART : HEAD",
	UDim2.fromOffset(15,220),
	UDim2.new(1,-30,0,43)
)

local WallButton = Button(
	PVP,
	"WALL CHECK : ON",
	UDim2.fromOffset(15,270),
	UDim2.new(1,-30,0,43)
)

local CircleButton = Button(
	PVP,
	"FOV CIRCLE : ON",
	UDim2.fromOffset(15,320),
	UDim2.new(1,-30,0,43)
)

local PvpStatus = Instance.new("TextLabel")
PvpStatus.Size = UDim2.new(1,-30,0,35)
PvpStatus.Position = UDim2.fromOffset(15,375)
PvpStatus.BackgroundTransparency = 1
PvpStatus.Text = "TARGET : NONE"
PvpStatus.TextColor3 = Color3.fromRGB(195,195,205)
PvpStatus.TextSize = 12
PvpStatus.Font = Enum.Font.GothamBold
PvpStatus.Parent = PVP

--========================================================
-- FOV CIRCLE
--========================================================

local FOVCircle = Instance.new("Frame")
FOVCircle.AnchorPoint = Vector2.new(.5,.5)
FOVCircle.Position = UDim2.fromScale(.5,.5)
FOVCircle.Size = UDim2.fromOffset(FOV*2,FOV*2)
FOVCircle.BackgroundTransparency = 1
FOVCircle.BorderSizePixel = 0
FOVCircle.Visible = false
FOVCircle.ZIndex = 1
FOVCircle.Parent = Gui

Corner(FOVCircle,999)

local Stroke = Instance.new("UIStroke")
Stroke.Thickness = 2
Stroke.Parent = FOVCircle

local function UpdateFOV()
	FOVCircle.Size =
		UDim2.fromOffset(FOV*2,FOV*2)

	FOVCircle.Visible =
		PVP.Visible and SHOW_FOV
end

--========================================================
-- DUMMY CHECK
--========================================================

local function IsDummy(obj)

	if not obj:IsA("Model") then
		return false
	end

	if Players:GetPlayerFromCharacter(obj) then
		return false
	end

	local hum =
		obj:FindFirstChildOfClass("Humanoid")

	return hum ~= nil and hum.Health > 0
end

local function GetPart(model)

	local part =
		model:FindFirstChild(AIM_PART)

	if part and part:IsA("BasePart") then
		return part
	end

	return model:FindFirstChild("HumanoidRootPart")
end

--========================================================
-- FIND DUMMY
--========================================================

local function FindDummy()

	local Camera = workspace.CurrentCamera

	if not Camera then
		return nil
	end

	local Center = Vector2.new(
		Camera.ViewportSize.X/2,
		Camera.ViewportSize.Y/2
	)

	local Best
	local Score = math.huge

	for _,obj in ipairs(workspace:GetDescendants()) do

		if not IsDummy(obj) then
			continue
		end

		local part = GetPart(obj)

		if not part then
			continue
		end

		local screen,onScreen =
			Camera:WorldToViewportPoint(part.Position)

		if not onScreen then
			continue
		end

		local point =
			Vector2.new(screen.X,screen.Y)

		local distance =
			(point-Center).Magnitude

		if distance > FOV then
			continue
		end

		if distance < Score then
			Score = distance
			Best = obj
		end
	end

	return Best
end

--========================================================
-- TEST CAMERA
--========================================================

RunService:BindToRenderStep(
	"H4X_Dummy_Test_v2",
	Enum.RenderPriority.Camera.Value + 1,
	function()

		if not TEST_ENABLED then
			return
		end

		local Camera = workspace.CurrentCamera

		if not Camera then
			return
		end

		if not Target
			or not Target.Parent
			or not IsDummy(Target) then

			Target = FindDummy()
		end

		if not Target then
			PvpStatus.Text = "TARGET : NONE"
			return
		end

		local part = GetPart(Target)

		if not part then
			Target = nil
			return
		end

		Camera.CFrame =
			CFrame.lookAt(
				Camera.CFrame.Position,
				part.Position
			)

		PvpStatus.Text =
			"TARGET : "..Target.Name
	end
)

--========================================================
-- BUTTON EVENTS
--========================================================

TestButton.MouseButton1Click:Connect(function()

	TEST_ENABLED = not TEST_ENABLED
	Target = nil

	TestButton.Text =
		"TARGET DUMMY : "
		..(TEST_ENABLED and "ON" or "OFF")

	if not TEST_ENABLED then
		PvpStatus.Text = "TARGET : NONE"
	end
end)

ModeButton.MouseButton1Click:Connect(function()

	if ModeButton.Text == "MODE : TEAM" then
		ModeButton.Text = "MODE : FFA"
	else
		ModeButton.Text = "MODE : TEAM"
	end

	Target = nil
end)

FOVButton.MouseButton1Click:Connect(function()

	FOV_INDEX += 1

	if FOV_INDEX > #FOV_LIST then
		FOV_INDEX = 1
	end

	FOV = FOV_LIST[FOV_INDEX]

	FOVButton.Text = "FOV : "..FOV

	UpdateFOV()

	Target = nil
end)

AimButton.MouseButton1Click:Connect(function()

	AIM_INDEX += 1

	if AIM_INDEX > #AIM_LIST then
		AIM_INDEX = 1
	end

	AIM_PART = AIM_LIST[AIM_INDEX]

	AimButton.Text =
		"AIM PART : "
		..string.upper(AIM_PART)

	Target = nil
end)

WallButton.MouseButton1Click:Connect(function()

	WALL_CHECK = not WALL_CHECK

	WallButton.Text =
		"WALL CHECK : "
		..(WALL_CHECK and "ON" or "OFF")
end)

CircleButton.MouseButton1Click:Connect(function()

	SHOW_FOV = not SHOW_FOV

	CircleButton.Text =
		"FOV CIRCLE : "
		..(SHOW_FOV and "ON" or "OFF")

	UpdateFOV()
end)

--========================================================
-- WINDOW EVENTS
--========================================================

PVPButton.MouseButton1Click:Connect(function()

	Main.Visible = false
	PVP.Visible = true

	UpdateFOV()
end)

PvpClose.MouseButton1Click:Connect(function()

	PVP.Visible = false
	Main.Visible = true

	TEST_ENABLED = false
	Target = nil

	TestButton.Text = "TARGET DUMMY : OFF"
	PvpStatus.Text = "TARGET : NONE"

	UpdateFOV()
end)

InfoButton.MouseButton1Click:Connect(function()
	InfoFrame.Visible = true
end)

InfoClose.MouseButton1Click:Connect(function()
	InfoFrame.Visible = false
end)

Close.MouseButton1Click:Connect(function()

	Main.Visible = false
	PVP.Visible = false
	InfoFrame.Visible = false
	FOVCircle.Visible = false
	Open.Visible = true

	TEST_ENABLED = false
	Target = nil
end)

Open.MouseButton1Click:Connect(function()

	Main.Visible = true
	Open.Visible = false
	UpdateFOV()
end)

--========================================================
-- GET KEY
--========================================================

GetKey.MouseButton1Click:Connect(function()

	if setclipboard then
		setclipboard(GET_KEY_LINK)
	end

	GetKey.Text = "LINK COPIED!"

	task.wait(1.5)

	GetKey.Text = "GET KEY"
end)

--========================================================
-- VERIFY
--========================================================

Verify.MouseButton1Click:Connect(function()

	if KeyBox.Text == KEY then

		Verify.Text = "โœ“ KEY ACCEPTED"

		task.wait(.5)

		KeyFrame.Visible = false
		Main.Visible = true

	else

		Verify.Text = "โœ• INVALID KEY"

		task.wait(1)

		Verify.Text = "VERIFY KEY"
		KeyBox.Text = ""
	end
end)

--========================================================
-- DRAG MAIN
--========================================================

local dragging = false
local dragStart
local startPos

Title.InputBegan:Connect(function(input)

	if input.UserInputType == Enum.UserInputType.MouseButton1
		or input.UserInputType == Enum.UserInputType.Touch then

		dragging = true
		dragStart = input.Position
		startPos = Main.Position
	end
end)

UIS.InputChanged:Connect(function(input)

	if not dragging then
		return
	end

	if input.UserInputType == Enum.UserInputType.MouseMovement
		or input.UserInputType == Enum.UserInputType.Touch then

		local delta =
			input.Position - dragStart

		Main.Position = UDim2.new(
			startPos.X.Scale,
			startPos.X.Offset + delta.X,
			startPos.Y.Scale,
			startPos.Y.Offset + delta.Y
		)
	end
end)

UIS.InputEnded:Connect(function(input)

	if input.UserInputType == Enum.UserInputType.MouseButton1
		or input.UserInputType == Enum.UserInputType.Touch then

		dragging = false
	end
end)

--========================================================
-- START
--========================================================

KeyFrame.Visible = true
Main.Visible = false
PVP.Visible = false
InfoFrame.Visible = false
Open.Visible = false
FOVCircle.Visible = false

print("[H4X HUB v2] Loaded")

Features & Information

๐Ÿ”ด H4X HUB v2.0 Developer โ€ข Testing โ€ข Debugging Platform H4X Hub v2.0 is a next-generation Developer Hub for Roblox projects, featuring a powerful Dark Red ร— Black interface designed for both PC and Mobile. ๐Ÿš€ CORE FEATURES ๐ŸŽฎ Developer Panel A centralized control panel for managing authorized development and testing tools. ๐Ÿงช Testing Suite Test gameplay systems, NPCs, maps, zones, interactions, and other mechanics in your development environment. ๐Ÿค– NPC Manager Monitor, reset, and test NPC behavior to help identify gameplay and AI issues. ๐Ÿ‘ค Player Debugger View useful player and character information during development and debugging. ๐Ÿ—บ๏ธ Zone Controller Quickly manage and test designated development zones. ๐Ÿ“Š Performance Monitor Monitor FPS, Ping, and performance status while testing your game. ๐Ÿ”Ž Smart Search Quickly find tools and features through the built-in search system. ๐Ÿ“ฑ CROSS-PLATFORM UI - Mobile-friendly interface - PC keyboard and mouse support - Draggable window - Responsive controls - ON/OFF toggle system - Compact mode - Scalable interface ๐Ÿ” SECURITY H4X Hub v2.0 is designed for authorized Developer Mode and private testing environments, helping keep development tools within their intended game-development scope. ๐ŸŽจ DESIGN Theme: Dark Red ร— Black Style: Modern Developer Console Version: "2.0.0" ยซH4X HUB v2.0 Build smarter. Test faster. Debug better.ยป

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts