--========================================================-- -- XENFREN HUB V5 -- -- DEVELOPED BY HAZE -- --========================================================-- -- LocalScript --========================================================-- --// SERVICES local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local Lighting = game:GetService("Lighting") local TeleportService = game:GetService("TeleportService") local Stats = game:GetService("Stats") local SoundService = game:GetService("SoundService") local Debris = game:GetService("Debris") local StarterGui = game:GetService("StarterGui") local LocalPlayer = Players.LocalPlayer --========================================================-- -- STATE / SETTINGS -- --========================================================-- local State = { Speed = false, SpeedValue = 50, JumpPower = false, JumpPowerValue = 50, InfiniteJump = false, NoClip = false, Fly = false, Fling = false, FullBright = false, NoFog = false, NoShadows = false, Crosshair = false, FPSCounter = false, PingCounter = false, MM2ESP = false, MM2GunESP = false, MM2Distance = true, MM2RoleNames = true, MM2AutoRefresh = true, Aura = false, RainbowAura = false, Trail = false, AntiKill = false, AntiVoid = false, AntiAFK = false, Spin = false, SpinSpeed = 10, ClickSounds = true, Notifications = true, Theme = "Purple", UIVisible = true, SelectedTarget = nil } local Character local Humanoid local Root local ESPFolder = Instance.new("Folder") ESPFolder.Name = "XenFrenESP" ESPFolder.Parent = workspace local VFXFolder = Instance.new("Folder") VFXFolder.Name = "XenFrenVFX" VFXFolder.Parent = workspace local MM2ESPObjects = {} local Connections = {} --========================================================-- -- UTILITY FUNCTIONS -- --========================================================-- local function GetCharacter() Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait() Humanoid = Character:FindFirstChildOfClass("Humanoid") Root = Character:FindFirstChild("HumanoidRootPart") end GetCharacter() local function Notify(Text) if not State.Notifications then return end pcall(function() StarterGui:SetCore("SendNotification", { Title = "XenFren Hub", Text = tostring(Text), Duration = 3 }) end) end local function PlayClick() if not State.ClickSounds then return end local Sound = Instance.new("Sound") Sound.SoundId = "rbxassetid://6026984224" Sound.Volume = 0.25 Sound.Parent = SoundService Sound:Play() Debris:AddItem(Sound, 2) end local function SafeDestroy(Object) if Object then pcall(function() Object:Destroy() end) end end local function GetRoot(Player) if not Player or not Player.Character then return nil end return Player.Character:FindFirstChild("HumanoidRootPart") end local function GetDistance(Player) local OtherRoot = GetRoot(Player) if Root and OtherRoot then return math.floor((Root.Position - OtherRoot.Position).Magnitude) end return 0 end local function ClampNumber(Value, Minimum, Maximum, Default) local Number = tonumber(Value) if not Number then return Default end return math.clamp(Number, Minimum, Maximum) end --========================================================-- -- GUI -- --========================================================-- local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "XenFrenHub" ScreenGui.ResetOnSpawn = false ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui") local Main = Instance.new("Frame") Main.Name = "Main" Main.Size = UDim2.new(0, 720, 0, 500) Main.Position = UDim2.new(0.5, -360, 0.5, -250) Main.BackgroundColor3 = Color3.fromRGB(22, 22, 30) Main.BorderSizePixel = 0 Main.ClipsDescendants = true Main.Parent = ScreenGui local MainCorner = Instance.new("UICorner") MainCorner.CornerRadius = UDim.new(0, 12) MainCorner.Parent = Main local MainStroke = Instance.new("UIStroke") MainStroke.Color = Color3.fromRGB(85, 55, 130) MainStroke.Thickness = 1.5 MainStroke.Parent = Main --========================================================-- -- TOP BAR -- --========================================================-- local TopBar = Instance.new("Frame") TopBar.Size = UDim2.new(1, 0, 0, 48) TopBar.BackgroundColor3 = Color3.fromRGB(29, 29, 40) TopBar.BorderSizePixel = 0 TopBar.Parent = Main local Title = Instance.new("TextLabel") Title.BackgroundTransparency = 1 Title.Position = UDim2.new(0, 15, 0, 5) Title.Size = UDim2.new(0, 350, 0, 38) Title.Font = Enum.Font.GothamBold Title.Text = "XENFREN HUB V5" Title.TextColor3 = Color3.fromRGB(220, 200, 255) Title.TextSize = 18 Title.TextXAlignment = Enum.TextXAlignment.Left Title.Parent = TopBar local SubTitle = Instance.new("TextLabel") SubTitle.BackgroundTransparency = 1 SubTitle.Position = UDim2.new(0, 155, 0, 6) SubTitle.Size = UDim2.new(0, 250, 0, 36) SubTitle.Font = Enum.Font.Gotham SubTitle.Text = "LOCAL HUB" SubTitle.TextColor3 = Color3.fromRGB(125, 125, 145) SubTitle.TextSize = 11 SubTitle.TextXAlignment = Enum.TextXAlignment.Left SubTitle.Parent = TopBar local Minimize = Instance.new("TextButton") Minimize.Size = UDim2.new(0, 42, 0, 32) Minimize.Position = UDim2.new(1, -90, 0, 8) Minimize.BackgroundColor3 = Color3.fromRGB(45, 45, 60) Minimize.BorderSizePixel = 0 Minimize.Font = Enum.Font.GothamBold Minimize.Text = "—" Minimize.TextColor3 = Color3.new(1, 1, 1) Minimize.TextSize = 18 Minimize.Parent = TopBar local MinCorner = Instance.new("UICorner") MinCorner.CornerRadius = UDim.new(0, 7) MinCorner.Parent = Minimize local Close = Instance.new("TextButton") Close.Size = UDim2.new(0, 42, 0, 32) Close.Position = UDim2.new(1, -45, 0, 8) Close.BackgroundColor3 = Color3.fromRGB(80, 35, 45) Close.BorderSizePixel = 0 Close.Font = Enum.Font.GothamBold Close.Text = "X" Close.TextColor3 = Color3.new(1, 1, 1) Close.TextSize = 14 Close.Parent = TopBar local CloseCorner = Instance.new("UICorner") CloseCorner.CornerRadius = UDim.new(0, 7) CloseCorner.Parent = Close --========================================================-- -- SIDEBAR -- --========================================================-- local Sidebar = Instance.new("Frame") Sidebar.Size = UDim2.new(0, 145, 1, -48) Sidebar.Position = UDim2.new(0, 0, 0, 48) Sidebar.BackgroundColor3 = Color3.fromRGB(25, 25, 34) Sidebar.BorderSizePixel = 0 Sidebar.Parent = Main local SideLayout = Instance.new("UIListLayout") SideLayout.Padding = UDim.new(0, 4) SideLayout.SortOrder = Enum.SortOrder.LayoutOrder SideLayout.Parent = Sidebar local SidePadding = Instance.new("UIPadding") SidePadding.PaddingTop = UDim.new(0, 8) SidePadding.PaddingLeft = UDim.new(0, 7) SidePadding.PaddingRight = UDim.new(0, 7) SidePadding.Parent = Sidebar --========================================================-- -- PAGE CONTAINER -- --========================================================-- local PageContainer = Instance.new("Frame") PageContainer.Size = UDim2.new(1, -145, 1, -48) PageContainer.Position = UDim2.new(0, 145, 0, 48) PageContainer.BackgroundColor3 = Color3.fromRGB(20, 20, 28) PageContainer.BorderSizePixel = 0 PageContainer.Parent = Main local Pages = {} local Tabs = {} local function CreatePage(Name) local Page = Instance.new("ScrollingFrame") Page.Name = Name Page.Size = UDim2.new(1, 0, 1, 0) Page.BackgroundTransparency = 1 Page.BorderSizePixel = 0 Page.ScrollBarThickness = 4 Page.ScrollBarImageColor3 = Color3.fromRGB(100, 65, 150) Page.CanvasSize = UDim2.new(0, 0, 0, 0) Page.AutomaticCanvasSize = Enum.AutomaticSize.Y Page.Visible = false Page.Parent = PageContainer local Padding = Instance.new("UIPadding") Padding.PaddingTop = UDim.new(0, 10) Padding.PaddingBottom = UDim.new(0, 15) Padding.PaddingLeft = UDim.new(0, 12) Padding.PaddingRight = UDim.new(0, 12) Padding.Parent = Page local Layout = Instance.new("UIListLayout") Layout.Padding = UDim.new(0, 7) Layout.SortOrder = Enum.SortOrder.LayoutOrder Layout.Parent = Page Pages[Name] = Page return Page end local function CreateTab(Name) local Button = Instance.new("TextButton") Button.Size = UDim2.new(1, 0, 0, 34) Button.BackgroundColor3 = Color3.fromRGB(34, 34, 46) Button.BorderSizePixel = 0 Button.Font = Enum.Font.GothamSemibold Button.Text = Name Button.TextColor3 = Color3.fromRGB(190, 190, 205) Button.TextSize = 12 Button.Parent = Sidebar local Corner = Instance.new("UICorner") Corner.CornerRadius = UDim.new(0, 7) Corner.Parent = Button Tabs[Name] = Button Button.MouseButton1Click:Connect(function() PlayClick() for PageName, Page in pairs(Pages) do Page.Visible = PageName == Name end for TabName, Tab in pairs(Tabs) do if TabName == Name then Tab.BackgroundColor3 = Color3.fromRGB(65, 45, 100) Tab.TextColor3 = Color3.fromRGB(255, 255, 255) else Tab.BackgroundColor3 = Color3.fromRGB(34, 34, 46) Tab.TextColor3 = Color3.fromRGB(190, 190, 205) end end end) return Button end --========================================================-- -- CONTROLS -- --========================================================-- local function AddButton(Page, Text, Callback) local Button = Instance.new("TextButton") Button.Size = UDim2.new(1, 0, 0, 38) Button.BackgroundColor3 = Color3.fromRGB(35, 35, 48) Button.BorderSizePixel = 0 Button.Font = Enum.Font.GothamSemibold Button.Text = Text Button.TextColor3 = Color3.fromRGB(230, 230, 240) Button.TextSize = 12 Button.AutoButtonColor = false Button.Parent = Page local Corner = Instance.new("UICorner") Corner.CornerRadius = UDim.new(0, 7) Corner.Parent = Button Button.MouseEnter:Connect(function() if not Button:GetAttribute("Enabled") then Button.BackgroundColor3 = Color3.fromRGB(45, 45, 60) end end) Button.MouseLeave:Connect(function() if not Button:GetAttribute("Enabled") then Button.BackgroundColor3 = Color3.fromRGB(35, 35, 48) end end) Button.MouseButton1Click:Connect(function() PlayClick() local Original = Button.Size TweenService:Create( Button, TweenInfo.new(0.08), {Size = UDim2.new(1, -5, 0, 36)} ):Play() task.delay(0.08, function() if Button.Parent then TweenService:Create( Button, TweenInfo.new(0.08), {Size = Original} ):Play() end end) if Callback then Callback() end end) return Button end local function AddToggle(Page, Text, Default, Callback) local Enabled = Default == true local Button Button = AddButton( Page, Text .. " : " .. (Enabled and "ON" or "OFF"), function() Enabled = not Enabled Button:SetAttribute("Enabled", Enabled) Button.Text = Text .. " : " .. (Enabled and "ON" or "OFF") Button.BackgroundColor3 = Enabled and Color3.fromRGB(65, 45, 100) or Color3.fromRGB(35, 35, 48) if Callback then Callback(Enabled) end end ) Button:SetAttribute("Enabled", Enabled) if Enabled then Button.BackgroundColor3 = Color3.fromRGB(65, 45, 100) end return Button end local function AddLabel(Page, Text) local Label = Instance.new("TextLabel") Label.Size = UDim2.new(1, 0, 0, 30) Label.BackgroundTransparency = 1 Label.Font = Enum.Font.GothamBold Label.Text = Text Label.TextColor3 = Color3.fromRGB(175, 150, 220) Label.TextSize = 13 Label.TextXAlignment = Enum.TextXAlignment.Left Label.Parent = Page return Label end local function AddTextbox(Page, Placeholder, Default) local Box = Instance.new("TextBox") Box.Size = UDim2.new(1, 0, 0, 38) Box.BackgroundColor3 = Color3.fromRGB(31, 31, 42) Box.BorderSizePixel = 0 Box.Font = Enum.Font.Gotham Box.PlaceholderText = Placeholder Box.PlaceholderColor3 = Color3.fromRGB(120, 120, 135) Box.Text = Default or "" Box.TextColor3 = Color3.fromRGB(235, 235, 240) Box.TextSize = 12 Box.ClearTextOnFocus = false Box.Parent = Page local Corner = Instance.new("UICorner") Corner.CornerRadius = UDim.new(0, 7) Corner.Parent = Box return Box end --========================================================-- -- PAGES -- --========================================================-- local Home = CreatePage("Home") local MM2 = CreatePage("MM2") local Movement = CreatePage("Movement") local Fling = CreatePage("Fling") local Visuals = CreatePage("Visuals") local VFX = CreatePage("VFX") local TSB = CreatePage("TSB") local Protection = CreatePage("Protection") local PlayerPage = CreatePage("Player") local Sounds = CreatePage("Sounds") local Animations = CreatePage("Animations") local AdminPanel = CreatePage("Admin Panel") local Settings = CreatePage("Settings") local Credits = CreatePage("Credits") local TabNames = { "Home", "MM2", "Movement", "Fling", "Visuals", "VFX", "TSB", "Protection", "Player", "Sounds", "Animations", "Admin Panel", "Settings", "Credits" } for _, Name in ipairs(TabNames) do CreateTab(Name) end --========================================================-- -- HOME -- --========================================================-- AddLabel(Home, "XenFren Hub V5") AddLabel(Home, "Local utility hub") AddButton(Home, "Rejoin Server", function() TeleportService:Teleport(game.PlaceId, LocalPlayer) end) AddButton(Home, "Server Hop", function() Notify("Server hopping requires a public server list.") end) AddButton(Home, "Reset Character", function() if Humanoid then Humanoid.Health = 0 end end) AddButton(Home, "Respawn Character", function() if Character then Humanoid.Health = 0 end end) AddButton(Home, "Copy JobId", function() Notify("JobId: " .. game.JobId) end) AddLabel(Home, "Quick Toggles") AddToggle(Home, "Click Sounds", true, function(Value) State.ClickSounds = Value end) AddToggle(Home, "Notifications", true, function(Value) State.Notifications = Value end) --========================================================-- -- MM2 -- --========================================================-- AddLabel(MM2, "MM2 ROLE ESP") local MM2Color = { Murderer = Color3.fromRGB(255, 55, 55), Sheriff = Color3.fromRGB(70, 130, 255), Innocent = Color3.fromRGB(80, 255, 100), Hero = Color3.fromRGB(255, 220, 60), Gun = Color3.fromRGB(255, 220, 60) } local function MM2HasTool(Player, ToolName) if not Player then return false end local Backpack = Player:FindFirstChildOfClass("Backpack") if Backpack then for _, Object in ipairs(Backpack:GetChildren()) do if Object:IsA("Tool") and string.lower(Object.Name) == string.lower(ToolName) then return true end end end if Player.Character then for _, Object in ipairs(Player.Character:GetChildren()) do if Object:IsA("Tool") and string.lower(Object.Name) == string.lower(ToolName) then return true end end end return false end local function MM2GetRole(Player) if MM2HasTool(Player, "Knife") then return "Murderer" end if MM2HasTool(Player, "Gun") then return "Sheriff" end if Player.Character then local Role = Player.Character:GetAttribute("Role") if typeof(Role) == "string" then if Role == "Murderer" or Role == "Sheriff" or Role == "Hero" or Role == "Innocent" then return Role end end end local RoleAttribute = Player:GetAttribute("Role") if typeof(RoleAttribute) == "string" then if RoleAttribute == "Murderer" or RoleAttribute == "Sheriff" or RoleAttribute == "Hero" or RoleAttribute == "Innocent" then return RoleAttribute end end return "Innocent" end local function MM2ClearPlayer(Player) local Object = MM2ESPObjects[Player] if Object then SafeDestroy(Object.Highlight) SafeDestroy(Object.Billboard) MM2ESPObjects[Player] = nil end end local function MM2CreatePlayerESP(Player) if Player == LocalPlayer then return end if not State.MM2ESP then return end if not Player.Character then return end local RootPart = Player.Character:FindFirstChild("HumanoidRootPart") if not RootPart then return end MM2ClearPlayer(Player) local Role = MM2GetRole(Player) local Color = MM2Color[Role] or MM2Color.Innocent local Highlight = Instance.new("Highlight") Highlight.Name = "XenFrenMM2Highlight" Highlight.Adornee = Player.Character Highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop Highlight.FillColor = Color Highlight.OutlineColor = Color Highlight.FillTransparency = 0.72 Highlight.OutlineTransparency = 0 Highlight.Parent = ESPFolder local Billboard = Instance.new("BillboardGui") Billboard.Name = "XenFrenMM2Info" Billboard.Adornee = RootPart Billboard.AlwaysOnTop = true Billboard.Size = UDim2.new(0, 220, 0, 70) Billboard.StudsOffset = Vector3.new(0, 3.5, 0) Billboard.MaxDistance = math.huge Billboard.Parent = ESPFolder local Label = Instance.new("TextLabel") Label.BackgroundTransparency = 1 Label.Size = UDim2.new(1, 0, 1, 0) Label.Font = Enum.Font.GothamBold Label.TextColor3 = Color Label.TextStrokeTransparency = 0.25 Label.TextSize = 13 Label.TextWrapped = true Label.Parent = Billboard local DistanceText = "" if State.MM2Distance then DistanceText = "\n[" .. GetDistance(Player) .. " studs]" end if State.MM2RoleNames then Label.Text = Player.Name .. "\n" .. Role .. DistanceText else Label.Text = Player.Name .. DistanceText end MM2ESPObjects[Player] = { Highlight = Highlight, Billboard = Billboard, Label = Label } end local function MM2IsInsideCharacter(Object) if not Object then return false end for _, Player in ipairs(Players:GetPlayers()) do if Player.Character and Object:IsDescendantOf(Player.Character) then return true end end return false end local GunESPObject local function MM2ClearGunESP() SafeDestroy(GunESPObject) GunESPObject = nil end local function MM2FindGunDrop() local Direct = workspace:FindFirstChild("GunDrop") if Direct and not MM2IsInsideCharacter(Direct) then return Direct end for _, Object in ipairs(workspace:GetDescendants()) do if Object.Name == "GunDrop" and not MM2IsInsideCharacter(Object) then return Object end end return nil end local function MM2CreateGunESP() MM2ClearGunESP() if not State.MM2GunESP then return end local GunDrop = MM2FindGunDrop() if not GunDrop then return end local Adornee = GunDrop if not Adornee:IsA("BasePart") then Adornee = GunDrop:FindFirstChildWhichIsA("BasePart", true) end if not Adornee then return end local Highlight = Instance.new("Highlight") Highlight.Name = "XenFrenGunDropHighlight" Highlight.Adornee = GunDrop Highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop Highlight.FillColor = MM2Color.Gun Highlight.OutlineColor = MM2Color.Gun Highlight.FillTransparency = 0.55 Highlight.Parent = ESPFolder local Billboard = Instance.new("BillboardGui") Billboard.Name = "XenFrenGunDropInfo" Billboard.Adornee = Adornee Billboard.AlwaysOnTop = true Billboard.Size = UDim2.new(0, 150, 0, 45) Billboard.StudsOffset = Vector3.new(0, 2.5, 0) Billboard.MaxDistance = math.huge Billboard.Parent = ESPFolder local Label = Instance.new("TextLabel") Label.Size = UDim2.new(1, 0, 1, 0) Label.BackgroundTransparency = 1 Label.Font = Enum.Font.GothamBold Label.Text = "DROPPED GUN" Label.TextColor3 = MM2Color.Gun Label.TextStrokeTransparency = 0.25 Label.TextSize = 13 Label.Parent = Billboard GunESPObject = Highlight GunESPObject = { Highlight = Highlight, Billboard = Billboard } end local function MM2ClearESP() for Player in pairs(MM2ESPObjects) do MM2ClearPlayer(Player) end MM2ClearGunESP() for _, Object in ipairs(ESPFolder:GetChildren()) do if Object.Name:find("XenFrenMM2") then SafeDestroy(Object) end if Object.Name:find("XenFrenGunDrop") then SafeDestroy(Object) end end end local function RefreshMM2ESP() if not State.MM2ESP and not State.MM2GunESP then MM2ClearESP() return end if State.MM2ESP then for _, Player in ipairs(Players:GetPlayers()) do if Player ~= LocalPlayer then MM2CreatePlayerESP(Player) end end end if State.MM2GunESP then MM2CreateGunESP() else MM2ClearGunESP() end end AddToggle(MM2, "ESP Players", false, function(Value) State.MM2ESP = Value if not Value then for Player in pairs(MM2ESPObjects) do MM2ClearPlayer(Player) end else RefreshMM2ESP() end end) AddToggle(MM2, "Murderer / Sheriff / Innocent", true, function(Value) State.MM2RoleNames = Value RefreshMM2ESP() end) AddToggle(MM2, "Distance ESP", true, function(Value) State.MM2Distance = Value RefreshMM2ESP() end) AddToggle(MM2, "Dropped Gun ESP", false, function(Value) State.MM2GunESP = Value RefreshMM2ESP() end) AddToggle(MM2, "Auto Refresh", true, function(Value) State.MM2AutoRefresh = Value end) AddButton(MM2, "Refresh ESP", function() RefreshMM2ESP() Notify("MM2 ESP refreshed.") end) AddButton(MM2, "Clear ESP", function() MM2ClearESP() end) AddLabel(MM2, "ROLE COLOURS") AddLabel(MM2, "Murderer = RED") AddLabel(MM2, "Sheriff = BLUE") AddLabel(MM2, "Innocent = GREEN") AddLabel(MM2, "Dropped Gun = YELLOW") --========================================================-- -- MM2 LIVE LISTENERS -- --========================================================-- local function SetupMM2Player(Player) if Player == LocalPlayer then return end Player.CharacterAdded:Connect(function() task.wait(0.4) if State.MM2ESP then RefreshMM2ESP() end end) local Backpack = Player:FindFirstChildOfClass("Backpack") if Backpack then Backpack.ChildAdded:Connect(function() task.wait(0.1) if State.MM2ESP then RefreshMM2ESP() end end) Backpack.ChildRemoved:Connect(function() task.wait(0.1) if State.MM2ESP then RefreshMM2ESP() end end) end Player.CharacterAdded:Connect(function(CharacterModel) CharacterModel.ChildAdded:Connect(function() task.wait(0.1) if State.MM2ESP then RefreshMM2ESP() end end) CharacterModel.ChildRemoved:Connect(function() task.wait(0.1) if State.MM2ESP then RefreshMM2ESP() end end) end) end for _, Player in ipairs(Players:GetPlayers()) do SetupMM2Player(Player) end Players.PlayerAdded:Connect(function(Player) SetupMM2Player(Player) task.wait(0.5) if State.MM2ESP then RefreshMM2ESP() end end) Players.PlayerRemoving:Connect(function(Player) MM2ClearPlayer(Player) end) workspace.DescendantAdded:Connect(function(Object) if Object.Name == "GunDrop" then task.wait(0.1) if State.MM2GunESP then MM2CreateGunESP() end end end) workspace.DescendantRemoving:Connect(function(Object) if Object.Name == "GunDrop" then MM2ClearGunESP() end end) --========================================================-- -- MOVEMENT -- --========================================================-- AddLabel(Movement, "MOVEMENT") local SpeedBox = AddTextbox(Movement, "Speed value", "50") AddToggle(Movement, "Speed", false, function(Value) State.Speed = Value State.SpeedValue = ClampNumber(SpeedBox.Text, 1, 100000, 50) end) AddButton(Movement, "Apply Speed", function() State.SpeedValue = ClampNumber(SpeedBox.Text, 1, 100000, 50) if Humanoid then Humanoid.WalkSpeed = State.Speed and State.SpeedValue or 16 end end) local JumpBox = AddTextbox(Movement, "JumpPower", "50") AddToggle(Movement, "JumpPower", false, function(Value) State.JumpPower = Value State.JumpPowerValue = ClampNumber(JumpBox.Text, 1, 100000, 50) if Humanoid then Humanoid.UseJumpPower = true Humanoid.JumpPower = Value and State.JumpPowerValue or 50 end end) AddToggle(Movement, "Infinite Jump", false, function(Value) State.InfiniteJump = Value end) AddToggle(Movement, "NoClip", false, function(Value) State.NoClip = Value end) AddToggle(Movement, "Fly", false, function(Value) State.Fly = Value end) AddToggle(Movement, "Spin", false, function(Value) State.Spin = Value end) local SpinBox = AddTextbox(Movement, "Spin speed", "10") AddButton(Movement, "Apply Spin Speed", function() State.SpinSpeed = ClampNumber(SpinBox.Text, 1, 1000, 10) end) --========================================================-- -- FLING -- --========================================================-- AddLabel(Fling, "FLING") local FlingTargetBox = AddTextbox(Fling, "Target player name", "") AddButton(Fling, "Fling Target", function() local Name = string.lower(FlingTargetBox.Text) if Name == "" then Notify("Enter a player name.") return end local Target for _, Player in ipairs(Players:GetPlayers()) do if Player ~= LocalPlayer then if string.lower(Player.Name):sub(1, #Name) == Name then Target = Player break end end end if not Target then Notify("Player not found.") return end State.SelectedTarget = Target State.Fling = true Notify("Fling target: " .. Target.Name) end) AddToggle(Fling, "Fling Mode", false, function(Value) State.Fling = Value end) AddButton(Fling, "Stop Fling", function() State.Fling = false if Root then Root.AssemblyAngularVelocity = Vector3.zero end end) AddButton(Fling, "Fling Random Player", function() local List = {} for _, Player in ipairs(Players:GetPlayers()) do if Player ~= LocalPlayer and GetRoot(Player) then table.insert(List, Player) end end if #List > 0 then State.SelectedTarget = List[math.random(1, #List)] State.Fling = true Notify("Flinging " .. State.SelectedTarget.Name) end end) --========================================================-- -- VISUALS -- --========================================================-- AddLabel(Visuals, "VISUALS") AddToggle(Visuals, "FullBright", false, function(Value) State.FullBright = Value if Value then Lighting.Brightness = 3 Lighting.ClockTime = 14 Lighting.GlobalShadows = false Lighting.FogEnd = 100000 else Lighting.Brightness = 1 Lighting.GlobalShadows = true end end) AddToggle(Visuals, "No Fog", false, function(Value) State.NoFog = Value if Value then Lighting.FogEnd = 100000 Lighting.FogStart = 100000 else Lighting.FogStart = 0 Lighting.FogEnd = 100000 end end) AddToggle(Visuals, "No Shadows", false, function(Value) State.NoShadows = Value Lighting.GlobalShadows = not Value end) AddToggle(Visuals, "Crosshair", false, function(Value) State.Crosshair = Value end) AddToggle(Visuals, "FPS Counter", false, function(Value) State.FPSCounter = Value end) AddToggle(Visuals, "Ping Counter", false, function(Value) State.PingCounter = Value end) --========================================================-- -- VFX -- --========================================================-- AddLabel(VFX, "LOCAL VFX") AddToggle(VFX, "Aura", false, function(Value) State.Aura = Value end) AddToggle(VFX, "Rainbow Aura", false, function(Value) State.RainbowAura = Value end) AddToggle(VFX, "Trail", false, function(Value) State.Trail = Value end) AddButton(VFX, "Clear VFX", function() for _, Object in ipairs(VFXFolder:GetChildren()) do SafeDestroy(Object) end end) --========================================================-- -- TSB -- --========================================================-- AddLabel(TSB, "THE STRONGEST BATTLEGROUNDS") AddToggle(TSB, "Local Combat Aura", false, function(Value) State.TSBAura = Value end) AddToggle(TSB, "Movement Indicator", false, function(Value) State.TSBMovement = Value end) AddToggle(TSB, "Awakening Indicator", false, function(Value) State.TSBAwakening = Value end) AddToggle(TSB, "Ult Indicator", false, function(Value) State.TSBUlt = Value end) AddButton(TSB, "Refresh TSB Indicators", function() Notify("TSB indicators refreshed.") end) AddLabel(TSB, "Most combat mechanics are server-authoritative.") --========================================================-- -- PROTECTION -- --========================================================-- AddLabel(Protection, "PROTECTION") AddToggle(Protection, "Anti-Kill", false, function(Value) State.AntiKill = Value end) AddToggle(Protection, "Anti-Void", false, function(Value) State.AntiVoid = Value end) AddToggle(Protection, "Anti-AFK", false, function(Value) State.AntiAFK = Value end) AddToggle(Protection, "Disable Falling Reset", false, function(Value) State.NoFallReset = Value end) AddButton(Protection, "Reset Protection", function() State.AntiKill = false State.AntiVoid = false State.AntiAFK = false State.NoFallReset = false Notify("Protection reset.") end) --========================================================-- -- PLAYER -- --========================================================-- AddLabel(PlayerPage, "PLAYER") AddButton(PlayerPage, "Reset Character", function() if Humanoid then Humanoid.Health = 0 end end) AddButton(PlayerPage, "Sit", function() if Humanoid then Humanoid.Sit = true end end) AddButton(PlayerPage, "Jump", function() if Humanoid then Humanoid.Jump = true end end) local TargetBox = AddTextbox(PlayerPage, "Player name", "") AddButton(PlayerPage, "Teleport To Player", function() local Search = string.lower(TargetBox.Text) for _, Player in ipairs(Players:GetPlayers()) do if Player ~= LocalPlayer and string.lower(Player.Name):sub(1, #Search) == Search then local TargetRoot = GetRoot(Player) if TargetRoot and Root then Root.CFrame = TargetRoot.CFrame + Vector3.new(0, 3, 0) end break end end end) AddButton(PlayerPage, "View Player", function() local Search = string.lower(TargetBox.Text) for _, Player in ipairs(Players:GetPlayers()) do if Player ~= LocalPlayer and string.lower(Player.Name):sub(1, #Search) == Search then local TargetHumanoid = Player.Character and Player.Character:FindFirstChildOfClass("Humanoid") if TargetHumanoid then workspace.CurrentCamera.CameraSubject = TargetHumanoid end break end end end) AddButton(PlayerPage, "View Self", function() if Humanoid then workspace.CurrentCamera.CameraSubject = Humanoid end end) --========================================================-- -- SOUNDS -- --========================================================-- AddLabel(Sounds, "SOUNDS") local SoundIdBox = AddTextbox( Sounds, "Sound ID", "" ) local SoundVolumeBox = AddTextbox( Sounds, "Volume", "1" ) AddButton(Sounds, "Play Sound", function() local ID = SoundIdBox.Text if ID == "" then Notify("Enter a sound ID.") return end local Sound = Instance.new("Sound") Sound.SoundId = "rbxassetid://" .. ID Sound.Volume = ClampNumber(SoundVolumeBox.Text, 0, 10, 1) Sound.Parent = SoundService Sound:Play() Sound.Ended:Connect(function() Sound:Destroy() end) end) AddButton(Sounds, "Stop XenFren Sounds", function() for _, Object in ipairs(SoundService:GetChildren()) do if Object:IsA("Sound") then Object:Stop() end end end) --========================================================-- -- ANIMATIONS -- --========================================================-- AddLabel(Animations, "ANIMATION PLAYER") local AnimationBox = AddTextbox( Animations, "Animation ID", "" ) AddButton(Animations, "Play Animation", function() local ID = AnimationBox.Text if ID == "" then Notify("Enter an Animation ID.") return end if not Humanoid then return end local Animator = Humanoid:FindFirstChildOfClass("Animator") if not Animator then Animator = Instance.new("Animator") Animator.Parent = Humanoid end local Animation = Instance.new("Animation") Animation.AnimationId = "rbxassetid://" .. ID local Track pcall(function() Track = Animator:LoadAnimation(Animation) end) if Track then Track:Play() Notify("Animation playing.") else Notify("Animation could not be loaded.") end end) AddButton(Animations, "Stop Animations", function() if Humanoid then local Animator = Humanoid:FindFirstChildOfClass("Animator") if Animator then for _, Track in ipairs(Animator:GetPlayingAnimationTracks()) do Track:Stop() end end end end) --========================================================-- -- ADMIN PANEL -- --========================================================-- AddLabel(AdminPanel, "ADMIN PANEL") local AdminTarget = AddTextbox( AdminPanel, "Target player", "" ) local function FindPlayer(Text) local Search = string.lower(Text) if Search == "" then return nil end for _, Player in ipairs(Players:GetPlayers()) do if Player ~= LocalPlayer then if string.lower(Player.Name):sub(1, #Search) == Search or string.lower(Player.DisplayName):sub(1, #Search) == Search then return Player end end end return nil end AddButton(AdminPanel, "Bring Target", function() local Target = FindPlayer(AdminTarget.Text) if not Target then Notify("Player not found.") return end local TargetRoot = GetRoot(Target) if TargetRoot and Root then TargetRoot.CFrame = Root.CFrame + Vector3.new(3, 0, 0) end end) AddButton(AdminPanel, "Teleport To Target", function() local Target = FindPlayer(AdminTarget.Text) if not Target then Notify("Player not found.") return end local TargetRoot = GetRoot(Target) if TargetRoot and Root then Root.CFrame = TargetRoot.CFrame + Vector3.new(3, 0, 0) end end) AddButton(AdminPanel, "View Target", function() local Target = FindPlayer(AdminTarget.Text) if Target and Target.Character then local TargetHumanoid = Target.Character:FindFirstChildOfClass("Humanoid") if TargetHumanoid then workspace.CurrentCamera.CameraSubject = TargetHumanoid end end end) AddButton(AdminPanel, "View Self", function() if Humanoid then workspace.CurrentCamera.CameraSubject = Humanoid end end) --========================================================-- -- SETTINGS -- --========================================================-- AddLabel(Settings, "THEMES") local Themes = { Purple = Color3.fromRGB(65, 45, 100), Blue = Color3.fromRGB(40, 70, 120), Red = Color3.fromRGB(120, 40, 45), Green = Color3.fromRGB(40, 105, 65), Orange = Color3.fromRGB(125, 75, 35), White = Color3.fromRGB(90, 90, 95) } local function ApplyTheme(Name) local Color = Themes[Name] if not Color then return end State.Theme = Name for _, Tab in pairs(Tabs) do if Tab:GetAttribute("Selected") then Tab.BackgroundColor3 = Color end end MainStroke.Color = Color Title.TextColor3 = Color3.fromRGB( math.min(Color.R * 255 + 100, 255), math.min(Color.G * 255 + 100, 255), math.min(Color.B * 255 + 100, 255) ) for _, Object in ipairs(PageContainer:GetDescendants()) do if Object:IsA("TextLabel") then if Object.Text == "XenFren Hub V5" then Object.TextColor3 = Color end end end end for Name in pairs(Themes) do AddButton(Settings, Name, function() ApplyTheme(Name) end) end AddLabel(Settings, "UI") AddToggle(Settings, "Notifications", true, function(Value) State.Notifications = Value end) AddToggle(Settings, "Click Sounds", true, function(Value) State.ClickSounds = Value end) AddButton(Settings, "Reset Theme", function() ApplyTheme("Purple") end) --========================================================-- -- CREDITS -- --========================================================-- AddLabel(Credits, "XENFREN HUB V5") AddLabel(Credits, "Developed by Haze") AddLabel(Credits, "Code helpers: Sccccarffs + Renji") AddLabel(Credits, "VFX: ChatGPT (bc im too lazy)") AddLabel(Credits, "GUI helpers: Haze") AddLabel(Credits, "Thank you for using XenFren Hub.") --========================================================-- -- CROSSHAIR UI -- --========================================================-- local CrosshairFrame = Instance.new("Frame") CrosshairFrame.Name = "Crosshair" CrosshairFrame.Size = UDim2.new(0, 40, 0, 40) CrosshairFrame.Position = UDim2.new(0.5, -20, 0.5, -20) CrosshairFrame.BackgroundTransparency = 1 CrosshairFrame.Visible = false CrosshairFrame.Parent = ScreenGui local CrossVertical = Instance.new("Frame") CrossVertical.Size = UDim2.new(0, 2, 0, 18) CrossVertical.Position = UDim2.new(0.5, -1, 0.5, -9) CrossVertical.BackgroundColor3 = Color3.new(1, 1, 1) CrossVertical.BorderSizePixel = 0 CrossVertical.Parent = CrosshairFrame local CrossHorizontal = Instance.new("Frame") CrossHorizontal.Size = UDim2.new(0, 18, 0, 2) CrossHorizontal.Position = UDim2.new(0.5, -9, 0.5, -1) CrossHorizontal.BackgroundColor3 = Color3.new(1, 1, 1) CrossHorizontal.BorderSizePixel = 0 CrossHorizontal.Parent = CrosshairFrame --========================================================-- -- FPS / PING UI -- --========================================================-- local StatsLabel = Instance.new("TextLabel") StatsLabel.Name = "Stats" StatsLabel.Size = UDim2.new(0, 180, 0, 45) StatsLabel.Position = UDim2.new(0, 12, 0, 12) StatsLabel.BackgroundTransparency = 1 StatsLabel.Font = Enum.Font.GothamBold StatsLabel.TextColor3 = Color3.new(1, 1, 1) StatsLabel.TextSize = 13 StatsLabel.TextXAlignment = Enum.TextXAlignment.Left StatsLabel.Visible = false StatsLabel.Parent = ScreenGui local LastTime = os.clock() local Frames = 0 local FPS = 60 --========================================================-- -- DRAGGING -- --========================================================-- local Dragging = false local DragStart local StartPosition TopBar.InputBegan:Connect(function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then Dragging = true DragStart = Input.Position StartPosition = Main.Position Input.Changed:Connect(function() if Input.UserInputState == Enum.UserInputState.End then Dragging = false end end) end end) UserInputService.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( StartPosition.X.Scale, StartPosition.X.Offset + Delta.X, StartPosition.Y.Scale, StartPosition.Y.Offset + Delta.Y ) end end) --========================================================-- -- MINIMIZE -- --========================================================-- local NormalSize = Main.Size Minimize.MouseButton1Click:Connect(function() State.UIVisible = not State.UIVisible Sidebar.Visible = State.UIVisible PageContainer.Visible = State.UIVisible if State.UIVisible then Main.Size = NormalSize Minimize.Text = "—" else Main.Size = UDim2.new(0, 720, 0, 48) Minimize.Text = "+" end end) Close.MouseButton1Click:Connect(function() ScreenGui.Enabled = false end) --========================================================-- -- INFINITE JUMP -- --========================================================-- UserInputService.JumpRequest:Connect(function() if State.InfiniteJump and Humanoid then Humanoid:ChangeState(Enum.HumanoidStateType.Jumping) end end) --========================================================-- -- CHARACTER -- --========================================================-- local function CharacterLoaded(NewCharacter) Character = NewCharacter Humanoid = NewCharacter:WaitForChild("Humanoid", 5) Root = NewCharacter:WaitForChild("HumanoidRootPart", 5) if Humanoid then Humanoid.UseJumpPower = true if State.Speed then Humanoid.WalkSpeed = State.SpeedValue end if State.JumpPower then Humanoid.JumpPower = State.JumpPowerValue end end end LocalPlayer.CharacterAdded:Connect(CharacterLoaded) --========================================================-- -- MAIN LOOP -- --========================================================-- RunService.RenderStepped:Connect(function(DeltaTime) -- Character refresh if not Character or not Character.Parent or not Humanoid or not Root then GetCharacter() end -- SPEED if Humanoid then if State.Speed then Humanoid.WalkSpeed = State.SpeedValue end if State.JumpPower then Humanoid.UseJumpPower = true Humanoid.JumpPower = State.JumpPowerValue end end -- NOCLIP if Character then for _, Part in ipairs(Character:GetDescendants()) do if Part:IsA("BasePart") then Part.CanCollide = not State.NoClip end end end -- FLY if State.Fly and Root then local Camera = workspace.CurrentCamera local Direction = Vector3.zero if UserInputService:IsKeyDown(Enum.KeyCode.W) then Direction += Camera.CFrame.LookVector end if UserInputService:IsKeyDown(Enum.KeyCode.S) then Direction -= Camera.CFrame.LookVector end if UserInputService:IsKeyDown(Enum.KeyCode.A) then Direction -= Camera.CFrame.RightVector end if UserInputService:IsKeyDown(Enum.KeyCode.D) then Direction += Camera.CFrame.RightVector end if UserInputService:IsKeyDown(Enum.KeyCode.Space) then Direction += Vector3.new(0, 1, 0) end if UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) then Direction -= Vector3.new(0, 1, 0) end if Direction.Magnitude > 0 then Direction = Direction.Unit end Root.AssemblyLinearVelocity = Direction * 70 end -- SPIN if State.Spin and Root then Root.AssemblyAngularVelocity = Vector3.new(0, State.SpinSpeed, 0) elseif not State.Fling then Root.AssemblyAngularVelocity = Vector3.zero end -- FLING if State.Fling and Root then Root.AssemblyAngularVelocity = Vector3.new( State.SpinSpeed * 50, State.SpinSpeed * 50, State.SpinSpeed * 50 ) local Target = State.SelectedTarget if Target and GetRoot(Target) then Root.CFrame = GetRoot(Target).CFrame * CFrame.new(0, 0, -2) end end -- ANTI VOID if State.AntiVoid and Root then if Root.Position.Y < -50 then Root.CFrame = CFrame.new( Root.Position.X, 50, Root.Position.Z ) end end -- FULLBRIGHT if State.FullBright then Lighting.Brightness = 3 Lighting.ClockTime = 14 Lighting.GlobalShadows = false Lighting.FogEnd = 100000 end -- CROSSHAIR CrosshairFrame.Visible = State.Crosshair and State.UIVisible -- STATS Frames += 1 if os.clock() - LastTime >= 1 then FPS = Frames Frames = 0 LastTime = os.clock() end local Ping = 0 pcall(function() Ping = math.floor( LocalPlayer:GetNetworkPing() * 1000 ) end) local StatsText = "" if State.FPSCounter then StatsText ..= "FPS: " .. FPS .. "\n" end if State.PingCounter then StatsText ..= "Ping: " .. Ping .. "ms" end StatsLabel.Text = StatsText StatsLabel.Visible = State.FPSCounter or State.PingCounter end) --========================================================-- -- MM2 LOOP -- --========================================================-- task.spawn(function() while ScreenGui.Parent do task.wait(0.75) if State.MM2AutoRefresh then if State.MM2ESP or State.MM2GunESP then RefreshMM2ESP() end end end end) --========================================================-- -- AURA -- --========================================================-- local AuraPart local function CreateAura() if AuraPart then SafeDestroy(AuraPart) AuraPart = nil end if not State.Aura and not State.RainbowAura then return end if not Root then return end AuraPart = Instance.new("Part") AuraPart.Name = "XenFrenAura" AuraPart.Shape = Enum.PartType.Ball AuraPart.Size = Vector3.new(8, 8, 8) AuraPart.Material = Enum.Material.Neon AuraPart.Transparency = 0.8 AuraPart.CanCollide = false AuraPart.CanTouch = false AuraPart.CanQuery = false AuraPart.Anchored = false AuraPart.Parent = VFXFolder local Weld = Instance.new("WeldConstraint") Weld.Part0 = Root Weld.Part1 = AuraPart Weld.Parent = AuraPart AuraPart.CFrame = Root.CFrame end task.spawn(function() while ScreenGui.Parent do task.wait(0.1) if State.Aura or State.RainbowAura then if not AuraPart or not AuraPart.Parent then CreateAura() end if AuraPart and State.RainbowAura then AuraPart.Color = Color3.fromHSV( (os.clock() % 5) / 5, 1, 1 ) elseif AuraPart then AuraPart.Color = Color3.fromRGB(150, 70, 255) end else if AuraPart then SafeDestroy(AuraPart) AuraPart = nil end end end end) --========================================================-- -- TRAIL -- --========================================================-- local TrailObject local function CreateTrail() if TrailObject then SafeDestroy(TrailObject) TrailObject = nil end if not State.Trail or not Character then return end local RootPart = Character:FindFirstChild("HumanoidRootPart") if not RootPart then return end local A0 = Instance.new("Attachment") A0.Position = Vector3.new(0, 1, 0) A0.Parent = RootPart local A1 = Instance.new("Attachment") A1.Position = Vector3.new(0, -1, 0) A1.Parent = RootPart local Trail = Instance.new("Trail") Trail.Name = "XenFrenTrail" Trail.Attachment0 = A0 Trail.Attachment1 = A1 Trail.Lifetime = 0.5 Trail.MinLength = 0.1 Trail.FaceCamera = true Trail.Color = ColorSequence.new( Color3.fromRGB(160, 70, 255), Color3.fromRGB(60, 150, 255) ) Trail.Parent = RootPart TrailObject = Trail end task.spawn(function() while ScreenGui.Parent do task.wait(0.2) if State.Trail then if not TrailObject or not TrailObject.Parent then CreateTrail() end elseif TrailObject then SafeDestroy(TrailObject) TrailObject = nil end end end) --========================================================-- -- DEFAULT TAB -- --========================================================-- Pages.Home.Visible = true Tabs.Home.BackgroundColor3 = Color3.fromRGB(65, 45, 100) Tabs.Home.TextColor3 = Color3.fromRGB(255, 255, 255) --========================================================-- -- FINISH -- --========================================================-- Notify("XenFren Hub V5 loaded.") print("================================================") print(" XENFREN HUB V5") print(" DEVELOPED BY HAZE") print("================================================")