-- ============================================================================
-- DARK HUB v3.1 (LAG FIX + FULLBRIGHT + FPS BOOST + NOTIFICATIONS)
-- Features: MvS Role ESP, Auto Throw Knife, Smooth Aimbot, FPS Booster, Fullbright
-- Credits & Follow: u/darkhubt on ScriptBlox | Gemini | YouTube
-- Keybind: 'G' (PC) or Tap 'DARK' Button (Mobile)
-- ============================================================================
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Workspace = game:GetService("Workspace")
local Lighting = game:GetService("Lighting")
local player = Players.LocalPlayer
local camera = Workspace.CurrentCamera
-- Safe CoreGui Container (Fixes execution & login errors across executors)
local parentContainer = gethui and gethui() or (syn and syn.protect_gui and syn.protect_gui(Instance.new("ScreenGui"))) or game:GetService("CoreGui")
--------------------------------------------------------------------------------
-- 1. SCREEN GUI SETUP & NOTIFICATION CONTAINER
--------------------------------------------------------------------------------
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "DarkHub_MvS_v31"
screenGui.ResetOnSpawn = false
pcall(function()
if syn and syn.protect_gui then
syn.protect_gui(screenGui)
screenGui.Parent = game:GetService("CoreGui")
else
screenGui.Parent = parentContainer
end
end)
-- Notification Frame Container
local notifContainer = Instance.new("Frame")
notifContainer.Name = "NotificationContainer"
notifContainer.Size = UDim2.new(0, 220, 1, -20)
notifContainer.Position = UDim2.new(1, -230, 0, 10)
notifContainer.BackgroundTransparency = 1
notifContainer.Parent = screenGui
local notifLayout = Instance.new("UIListLayout")
notifLayout.VerticalAlignment = Enum.VerticalAlignment.Bottom
notifLayout.Padding = UDim.new(0, 8)
notifLayout.Parent = notifContainer
local function sendNotification(text)
local notifFrame = Instance.new("Frame")
notifFrame.Size = UDim2.new(1, 0, 0, 36)
notifFrame.BackgroundColor3 = Color3.fromRGB(12, 12, 12)
notifFrame.BorderSizePixel = 0
notifFrame.Parent = notifContainer
local notifCorner = Instance.new("UICorner")
notifCorner.CornerRadius = UDim.new(0, 6)
notifCorner.Parent = notifFrame
local notifStroke = Instance.new("UIStroke")
notifStroke.Thickness = 1
notifStroke.Color = Color3.fromRGB(255, 0, 80)
notifStroke.Parent = notifFrame
local notifText = Instance.new("TextLabel")
notifText.Size = UDim2.new(1, -10, 1, 0)
notifText.Position = UDim2.new(0, 8, 0, 0)
notifText.BackgroundTransparency = 1
notifText.RichText = true
notifText.Text = '[DARK HUB] ' .. text
notifText.Font = Enum.Font.GothamMedium
notifText.TextColor3 = Color3.fromRGB(240, 240, 240)
notifText.TextSize = 11
notifText.TextXAlignment = Enum.TextXAlignment.Left
notifText.Parent = notifFrame
task.spawn(function()
task.wait(3)
notifFrame:Destroy()
end)
end
sendNotification("Dark Hub Executed Successfully!")
--------------------------------------------------------------------------------
-- 2. MAIN HUB FRAME (BIG NEON GLOW)
--------------------------------------------------------------------------------
local mainFrame = Instance.new("Frame")
mainFrame.Name = "MainPanel"
mainFrame.Size = UDim2.new(0, 560, 0, 380)
mainFrame.Position = UDim2.new(0.5, -280, 0.5, -190)
mainFrame.BackgroundColor3 = Color3.fromRGB(8, 8, 8)
mainFrame.BorderSizePixel = 0
mainFrame.ClipsDescendants = true
mainFrame.Parent = screenGui
local mainCorner = Instance.new("UICorner")
mainCorner.CornerRadius = UDim.new(0, 10)
mainCorner.Parent = mainFrame
local mainStroke = Instance.new("UIStroke")
mainStroke.Thickness = 3
mainStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
mainStroke.Parent = mainFrame
local strokeGradient = Instance.new("UIGradient")
strokeGradient.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 0, 80)),
ColorSequenceKeypoint.new(0.33, Color3.fromRGB(0, 150, 255)),
ColorSequenceKeypoint.new(0.66, Color3.fromRGB(150, 0, 255)),
ColorSequenceKeypoint.new(1.00, Color3.fromRGB(255, 0, 80))
})
strokeGradient.Parent = mainStroke
task.spawn(function()
while mainFrame and mainFrame.Parent do
strokeGradient.Rotation = (strokeGradient.Rotation + 3) % 360
task.wait(0.02)
end
end)
--------------------------------------------------------------------------------
-- 3. TITLE BAR & DRAGGING MECHANICS
--------------------------------------------------------------------------------
local titleBar = Instance.new("Frame")
titleBar.Size = UDim2.new(1, 0, 0, 42)
titleBar.BackgroundColor3 = Color3.fromRGB(14, 14, 14)
titleBar.BorderSizePixel = 0
titleBar.Parent = mainFrame
local titleCorner = Instance.new("UICorner")
titleCorner.CornerRadius = UDim.new(0, 10)
titleCorner.Parent = titleBar
local titleText = Instance.new("TextLabel")
titleText.Size = UDim2.new(1, -20, 1, 0)
titleText.Position = UDim2.new(0, 15, 0, 0)
titleText.BackgroundTransparency = 1
titleText.RichText = true
titleText.Text = 'DARKHUB v3.1 | Optimized'
titleText.Font = Enum.Font.FredokaOne
titleText.TextSize = 18
titleText.TextXAlignment = Enum.TextXAlignment.Left
titleText.Parent = titleBar
local dragging, dragInput, dragStart, startPos
titleBar.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = mainFrame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then dragging = false end
end)
end
end)
titleBar.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
dragInput = input
end
end)
UserInputService.InputChanged:Connect(function(input)
if input == dragInput and dragging then
local delta = input.Position - dragStart
mainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
end)
--------------------------------------------------------------------------------
-- 4. NAVIGATION TABS SETUP
--------------------------------------------------------------------------------
local tabBar = Instance.new("Frame")
tabBar.Size = UDim2.new(1, -20, 0, 32)
tabBar.Position = UDim2.new(0, 10, 0, 48)
tabBar.BackgroundTransparency = 1
tabBar.Parent = mainFrame
local tabLayout = Instance.new("UIListLayout")
tabLayout.FillDirection = Enum.FillDirection.Horizontal
tabLayout.Padding = UDim.new(0, 6)
tabLayout.Parent = tabBar
local TabFrames = {}
local TabButtons = {}
local TabNames = { "Main", "Combat", "ESP", "MvS Extra", "Settings" }
for i, name in ipairs(TabNames) do
local btn = Instance.new("TextButton")
btn.Size = UDim2.new(0.2, -5, 1, 0)
btn.Text = name
btn.Font = Enum.Font.GothamBold
btn.TextSize = 11
btn.TextColor3 = (i == 1) and Color3.fromRGB(255, 255, 255) or Color3.fromRGB(150, 150, 150)
btn.BackgroundColor3 = (i == 1) and Color3.fromRGB(255, 0, 80) or Color3.fromRGB(18, 18, 18)
btn.BorderSizePixel = 0
btn.Parent = tabBar
local btnCorner = Instance.new("UICorner")
btnCorner.CornerRadius = UDim.new(0, 6)
btnCorner.Parent = btn
local pageScroll = Instance.new("ScrollingFrame")
pageScroll.Size = UDim2.new(1, -20, 1, -95)
pageScroll.Position = UDim2.new(0, 10, 0, 88)
pageScroll.BackgroundTransparency = 1
pageScroll.BorderSizePixel = 0
pageScroll.ScrollBarThickness = 4
pageScroll.ScrollBarImageColor3 = Color3.fromRGB(255, 0, 80)
pageScroll.Visible = (i == 1)
pageScroll.Parent = mainFrame
local grid = Instance.new("UIGridLayout")
grid.CellSize = UDim2.new(0, 260, 0, 42)
grid.CellPadding = UDim2.new(0, 10, 0, 10)
grid.Parent = pageScroll
grid:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
pageScroll.CanvasSize = UDim2.new(0, 0, 0, grid.AbsoluteContentSize.Y + 15)
end)
TabFrames[name] = pageScroll
TabButtons[name] = btn
btn.MouseButton1Click:Connect(function()
for tName, tFrame in pairs(TabFrames) do
tFrame.Visible = (tName == name)
TabButtons[tName].BackgroundColor3 = (tName == name) and Color3.fromRGB(255, 0, 80) or Color3.fromRGB(18, 18, 18)
TabButtons[tName].TextColor3 = (tName == name) and Color3.fromRGB(255, 255, 255) or Color3.fromRGB(150, 150, 150)
end
end)
end
--------------------------------------------------------------------------------
-- 5. TOGGLE BUILDERS & STATES
--------------------------------------------------------------------------------
local Toggles = {
Aimbot = false,
ShowFOV = false,
PlayerESP = false,
PetESP = false,
AutoThrowKnife = false,
SpeedBoost = false,
AimbotSmoothness = true,
TargetHead = true,
Fullbright = false,
FPSBoost = false
}
local FOVRadius = 140
local AimbotSmoothness = 0.25
local SpeedValue = 32
local function createToggle(parentPage, richtextLabel, stateKey, callback)
local btn = Instance.new("TextButton")
btn.RichText = true
btn.Text = richtextLabel .. ' : OFF'
btn.Font = Enum.Font.GothamMedium
btn.TextSize = 12
btn.TextColor3 = Color3.fromRGB(220, 220, 220)
btn.BackgroundColor3 = Color3.fromRGB(18, 18, 18)
btn.BorderSizePixel = 0
btn.Parent = parentPage
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 6)
corner.Parent = btn
local stroke = Instance.new("UIStroke")
stroke.Thickness = 1
stroke.Color = Color3.fromRGB(35, 35, 35)
stroke.Parent = btn
btn.MouseButton1Click:Connect(function()
Toggles[stateKey] = not Toggles[stateKey]
local active = Toggles[stateKey]
btn.Text = richtextLabel .. (active and ' : ON' or ' : OFF')
btn.BackgroundColor3 = active and Color3.fromRGB(30, 20, 25) or Color3.fromRGB(18, 18, 18)
stroke.Color = active and Color3.fromRGB(255, 0, 80) or Color3.fromRGB(35, 35, 35)
sendNotification(richtextLabel:gsub("<[^>]-", ""):gsub(">", "") .. (active and " Enabled" or " Disabled"))
if callback then callback(active) end
end)
end
local function createActionButton(parentPage, richtextLabel, color, callback)
local btn = Instance.new("TextButton")
btn.RichText = true
btn.Text = richtextLabel
btn.Font = Enum.Font.GothamBold
btn.TextSize = 12
btn.TextColor3 = Color3.fromRGB(255, 255, 255)
btn.BackgroundColor3 = color or Color3.fromRGB(22, 22, 22)
btn.BorderSizePixel = 0
btn.Parent = parentPage
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 6)
corner.Parent = btn
local stroke = Instance.new("UIStroke")
stroke.Thickness = 1
stroke.Color = Color3.fromRGB(45, 45, 45)
stroke.Parent = btn
btn.MouseButton1Click:Connect(function()
if callback then callback() end
end)
end
--------------------------------------------------------------------------------
-- 6. FULLBRIGHT & FPS BOOST LOGIC
--------------------------------------------------------------------------------
local origBrightness = Lighting.Brightness
local origClockTime = Lighting.ClockTime
local origFogEnd = Lighting.FogEnd
local origGlobalShadows = Lighting.GlobalShadows
local function toggleFullbright(state)
if state then
Lighting.Brightness = 2
Lighting.ClockTime = 14
Lighting.FogEnd = 100000
Lighting.GlobalShadows = false
else
Lighting.Brightness = origBrightness
Lighting.ClockTime = origClockTime
Lighting.FogEnd = origFogEnd
Lighting.GlobalShadows = origGlobalShadows
end
end
local function applyFPSBoost(state)
if state then
pcall(function()
settings().Rendering.QualityLevel = Enum.QualityLevel.Level01
for _, v in ipairs(Workspace:GetDescendants()) do
if v:IsA("BasePart") then
v.Material = Enum.Material.SmoothPlastic
v.Reflectance = 0
elseif v:IsA("Decal") or v:IsA("Texture") then
v.Transparency = 1
elseif v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Smoke") or v:IsA("Fire") then
v.Enabled = false
end
end
end)
end
end
--------------------------------------------------------------------------------
-- 7. ESP & ROLE CHECKS
--------------------------------------------------------------------------------
local function getMvSRoleColor(targetPlayer)
local char = targetPlayer.Character
if not char then return Color3.fromRGB(255, 255, 255) end
local backpack = targetPlayer:FindFirstChildOfClass("Backpack")
local hasKnife = char:FindFirstChild("Knife") or (backpack and backpack:FindFirstChild("Knife"))
local hasGun = char:FindFirstChild("Gun") or char:FindFirstChild("Revolver") or (backpack and backpack:FindFirstChild("Gun")) or (backpack and backpack:FindFirstChild("Revolver"))
if hasKnife then
return Color3.fromRGB(255, 40, 40)
elseif hasGun then
return Color3.fromRGB(0, 150, 255)
else
return Color3.fromRGB(50, 255, 100)
end
end
local function updateESP()
if not Toggles.PlayerESP then return end
for _, v in ipairs(Players:GetPlayers()) do
if v ~= player and v.Character and v.Character:FindFirstChild("HumanoidRootPart") then
local hl = v.Character:FindFirstChild("MvSHighlight")
if not hl then
hl = Instance.new("Highlight")
hl.Name = "MvSHighlight"
hl.OutlineColor = Color3.fromRGB(255, 255, 255)
hl.Parent = v.Character
end
hl.FillColor = getMvSRoleColor(v)
end
end
end
local function clearESP()
for _, v in ipairs(Players:GetPlayers()) do
if v.Character and v.Character:FindFirstChild("MvSHighlight") then
v.Character.MvSHighlight:Destroy()
end
end
end
--------------------------------------------------------------------------------
-- 8. TAB CONTENT ASSIGNMENTS
--------------------------------------------------------------------------------
-- TAB 1: MAIN
createActionButton(TabFrames["Main"], 'Follow u/darkhubt on ScriptBlox', Color3.fromRGB(25, 15, 20), function()
if setclipboard then setclipboard("https://scriptblox.com/u/darkhubt") end
sendNotification("Copied ScriptBlox Profile Link!")
end)
-- TAB 2: COMBAT
createToggle(TabFrames["Combat"], 'Aimbot Lock-On', "Aimbot", function() end)
createToggle(TabFrames["Combat"], 'Draw FOV Circle', "ShowFOV", function() end)
createToggle(TabFrames["Combat"], 'Smooth Aim Lock', "AimbotSmoothness", function() end)
createToggle(TabFrames["Combat"], 'Target Head (Off = Torso)', "TargetHead", function() end)
-- TAB 3: ESP
createToggle(TabFrames["ESP"], 'Player / MvS Role ESP', "PlayerESP", function(state)
if not state then clearESP() end
end)
createToggle(TabFrames["ESP"], 'Pet ESP', "PetESP", function(state)
for _, obj in ipairs(Workspace:GetDescendants()) do
if obj:IsA("Model") and (string.find(string.lower(obj.Name), "pet") or obj:FindFirstChild("Pet")) then
if state then
if not obj:FindFirstChild("PetHighlight") then
local hl = Instance.new("Highlight")
hl.Name = "PetHighlight"
hl.FillColor = Color3.fromRGB(0, 255, 150)
hl.Parent = obj
end
else
if obj:FindFirstChild("PetHighlight") then obj.PetHighlight:Destroy() end
end
end
end
end)
-- TAB 4: MvS EXTRA
createToggle(TabFrames["MvS Extra"], 'Auto Throw Knife', "AutoThrowKnife", function() end)
createToggle(TabFrames["MvS Extra"], 'Speed Multiplier', "SpeedBoost", function(state)
local hum = player.Character and player.Character:FindFirstChildOfClass("Humanoid")
if hum then hum.WalkSpeed = state and SpeedValue or 16 end
end)
-- TAB 5: SETTINGS (EXPANDED WITH FPS BOOST & FULLBRIGHT)
createToggle(TabFrames["Settings"], 'Fullbright (No Shadows)', "Fullbright", function(state)
toggleFullbright(state)
end)
createToggle(TabFrames["Settings"], 'FPS Booster (Lag Remover)', "FPSBoost", function(state)
applyFPSBoost(state)
end)
createActionButton(TabFrames["Settings"], 'Reset Script', Color3.fromRGB(35, 25, 25), function()
clearESP()
toggleFullbright(false)
screenGui:Destroy()
sendNotification("Script Resetting...")
task.wait(0.2)
loadstring(game:HttpGet("https://raw.githubusercontent.com/DarkHub/main/script.lua", true))()
end)
createActionButton(TabFrames["Settings"], 'Kill GUI', Color3.fromRGB(45, 15, 15), function()
clearESP()
toggleFullbright(false)
screenGui:Destroy()
end)
--------------------------------------------------------------------------------
-- 9. ENGINE LOOP
--------------------------------------------------------------------------------
local fovCircle = Drawing and Drawing.new("Circle") or nil
if fovCircle then
fovCircle.Thickness = 1.5
fovCircle.NumSides = 36
fovCircle.Radius = FOVRadius
fovCircle.Filled = false
fovCircle.Visible = false
fovCircle.Color = Color3.fromRGB(255, 0, 80)
end
local function getClosestPlayerInFOV()
local closestPlayer = nil
local shortestDistance = FOVRadius
for _, v in ipairs(Players:GetPlayers()) do
if v ~= player and v.Character and v.Character:FindFirstChild("HumanoidRootPart") and v.Character:FindFirstChildOfClass("Humanoid").Health > 0 then
local targetPart = Toggles.TargetHead and v.Character:FindFirstChild("Head") or v.Character:FindFirstChild("HumanoidRootPart")
if targetPart then
local pos, onScreen = camera:WorldToViewportPoint(targetPart.Position)
if onScreen then
local mousePos = UserInputService:GetMouseLocation()
local distance = (Vector2.new(pos.X, pos.Y) - mousePos).Magnitude
if distance < shortestDistance then
closestPlayer = v
shortestDistance = distance
end
end
end
end
end
return closestPlayer
end
RunService.RenderStepped:Connect(function()
local mousePos = UserInputService:GetMouseLocation()
if fovCircle then
fovCircle.Position = mousePos
fovCircle.Visible = Toggles.ShowFOV
end
if Toggles.Aimbot then
local target = getClosestPlayerInFOV()
if target and target.Character then
local targetPart = Toggles.TargetHead and target.Character:FindFirstChild("Head") or target.Character:FindFirstChild("HumanoidRootPart")
if targetPart then
if Toggles.AimbotSmoothness then
camera.CFrame = camera.CFrame:Lerp(CFrame.new(camera.CFrame.Position, targetPart.Position), AimbotSmoothness)
else
camera.CFrame = CFrame.new(camera.CFrame.Position, targetPart.Position)
end
end
end
end
if Toggles.PlayerESP then updateESP() end
if Toggles.AutoThrowKnife then
local char = player.Character
if char then
local knife = char:FindFirstChild("Knife")
if knife and knife:FindFirstChild("Throw") then
knife.Throw:FireServer()
end
end
end
if Toggles.SpeedBoost then
local hum = player.Character and player.Character:FindFirstChildOfClass("Humanoid")
if hum and hum.WalkSpeed ~= SpeedValue then hum.WalkSpeed = SpeedValue end
end
end)
--------------------------------------------------------------------------------
-- 10. TOGGLES & INPUT
--------------------------------------------------------------------------------
local mobileToggle = Instance.new("TextButton")
mobileToggle.Name = "MobileToggle"
mobileToggle.Size = UDim2.new(0, 65, 0, 32)
mobileToggle.Position = UDim2.new(0, 12, 0.2, 0)
mobileToggle.BackgroundColor3 = Color3.fromRGB(12, 12, 12)
mobileToggle.RichText = true
mobileToggle.Text = 'DARK'
mobileToggle.Font = Enum.Font.FredokaOne
mobileToggle.TextSize = 13
mobileToggle.Parent = screenGui
local mobileCorner = Instance.new("UICorner")
mobileCorner.CornerRadius = UDim.new(0, 8)
mobileCorner.Parent = mobileToggle
local mobileStroke = Instance.new("UIStroke")
mobileStroke.Thickness = 1.5
mobileStroke.Color = Color3.fromRGB(255, 0, 80)
mobileStroke.Parent = mobileToggle
mobileToggle.MouseButton1Click:Connect(function()
mainFrame.Visible = not mainFrame.Visible
end)
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if not gameProcessed and input.KeyCode == Enum.KeyCode.G then
mainFrame.Visible = not mainFrame.Visible
end
end)