--========================================================-- -- XF HUB V4 -- -- DEVELOPED BY HAZE -- --========================================================-- local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local TeleportService = game:GetService("TeleportService") local StarterGui = game:GetService("StarterGui") local ReplicatedStorage = game:GetService("ReplicatedStorage") local SoundService = game:GetService("SoundService") local LocalPlayer = Players.LocalPlayer local PlayerGui = LocalPlayer:WaitForChild("PlayerGui") --========================================================-- -- CONFIG --========================================================-- local VALID_KEY = "XF-7877554-75566544-3231131" local DISCORD = "https://discord.gg/V5TXTwc8ft" local VERSION = "XF HUB V4.1" local Themes = { Purple = { Accent = Color3.fromRGB(150,70,255), Accent2 = Color3.fromRGB(90,35,180), Background = Color3.fromRGB(8,6,14), Sidebar = Color3.fromRGB(12,9,20), Card = Color3.fromRGB(18,14,29), Card2 = Color3.fromRGB(25,19,40), Text = Color3.fromRGB(245,242,255), SubText = Color3.fromRGB(155,150,170), Success = Color3.fromRGB(70,255,145), Danger = Color3.fromRGB(255,65,90), Warning = Color3.fromRGB(255,190,70) }, Blue = { Accent = Color3.fromRGB(70,150,255), Accent2 = Color3.fromRGB(35,90,180), Background = Color3.fromRGB(6,9,15), Sidebar = Color3.fromRGB(9,13,22), Card = Color3.fromRGB(14,19,30), Card2 = Color3.fromRGB(19,27,42), Text = Color3.fromRGB(240,247,255), SubText = Color3.fromRGB(145,160,180), Success = Color3.fromRGB(70,255,150), Danger = Color3.fromRGB(255,65,90), Warning = Color3.fromRGB(255,190,70) }, Red = { Accent = Color3.fromRGB(255,65,90), Accent2 = Color3.fromRGB(180,30,50), Background = Color3.fromRGB(15,6,9), Sidebar = Color3.fromRGB(21,8,12), Card = Color3.fromRGB(31,13,18), Card2 = Color3.fromRGB(42,18,24), Text = Color3.fromRGB(255,242,244), SubText = Color3.fromRGB(175,145,150), Success = Color3.fromRGB(70,255,145), Danger = Color3.fromRGB(255,65,90), Warning = Color3.fromRGB(255,190,70) }, Green = { Accent = Color3.fromRGB(65,255,145), Accent2 = Color3.fromRGB(30,175,90), Background = Color3.fromRGB(5,13,9), Sidebar = Color3.fromRGB(7,19,12), Card = Color3.fromRGB(12,28,18), Card2 = Color3.fromRGB(17,39,25), Text = Color3.fromRGB(240,255,246), SubText = Color3.fromRGB(145,175,155), Success = Color3.fromRGB(70,255,145), Danger = Color3.fromRGB(255,65,90), Warning = Color3.fromRGB(255,190,70) } } local Theme = Themes.Purple --========================================================-- -- STATE --========================================================-- local State = { Tab = "Combat", Follow = false, Attack = false, LockedTarget = false, FollowPosition = "Behind", FollowDistance = 5, FollowHeight = 3, WalkSpeedEnabled = false, JumpPowerEnabled = false, WalkSpeed = 16, JumpPower = 50, HipHeight = 2, Noclip = false, Fly = false, FlySpeed = 50, TouchFling = false, FlingPower = 100, FOV = 70, FOVCircle = false, FOVCircleSize = 250, PlayerESP = false, TargetESP = false, DistanceESP = false, NameESP = false, MurdererESP = false, SheriffESP = false, InnocentESP = false, Animations = true, ReapplyAnimations = true, AnimationPack = "Default", Compact = false, Fullscreen = false, SelectedTarget = nil, SavedCFrame = nil, UIVisible = true, Minimized = false, FPS = true, Ping = true, CombatRange = 25, KeyAccepted = false, -- RADIO RadioLoop = true, RadioVolume = 50, RadioPlaying = false, RadioPaused = false, RadioID = "" } --========================================================-- -- RADIO SOUND --========================================================-- local RadioSound = Instance.new("Sound") RadioSound.Name = "XF_HUB_RADIO" RadioSound.Volume = State.RadioVolume / 100 RadioSound.Looped = State.RadioLoop RadioSound.Parent = SoundService --========================================================-- -- HELPERS --========================================================-- local function New(class,parent) local obj = Instance.new(class) obj.Parent = parent return obj end local function Corner(obj,radius) local c = Instance.new("UICorner") c.CornerRadius = UDim.new(0,radius or 8) c.Parent = obj return c end local function Stroke(obj,color,thickness,transparency) local s = Instance.new("UIStroke") s.Color = color s.Thickness = thickness or 1 s.Transparency = transparency or 0 s.Parent = obj return s end local function Tween(obj,time,style,direction,props) local t = TweenService:Create( obj, TweenInfo.new( time, style or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out ), props ) t:Play() return t end local function Notify(title,text) pcall(function() StarterGui:SetCore("SendNotification",{ Title = title, Text = text, Duration = 3 }) end) end local function Character() return LocalPlayer.Character end local function Humanoid() local c = Character() return c and c:FindFirstChildOfClass("Humanoid") end local function Root() local c = Character() return c and c:FindFirstChild("HumanoidRootPart") end --========================================================-- -- SCREEN GUI --========================================================-- local ScreenGui = New("ScreenGui",PlayerGui) ScreenGui.Name = "XF_HUB" ScreenGui.ResetOnSpawn = false ScreenGui.IgnoreGuiInset = true ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling ScreenGui.DisplayOrder = 999999 --========================================================-- -- KEY SCREEN --========================================================-- local KeyScreen = New("Frame",ScreenGui) KeyScreen.Name = "KeySystem" KeyScreen.Size = UDim2.fromScale(1,1) KeyScreen.BackgroundColor3 = Color3.fromRGB(3,2,7) KeyScreen.ZIndex = 1000 local KeyGlow = New("Frame",KeyScreen) KeyGlow.Size = UDim2.fromScale(.55,.55) KeyGlow.Position = UDim2.fromScale(.225,.225) KeyGlow.BackgroundColor3 = Theme.Accent KeyGlow.BackgroundTransparency = .94 KeyGlow.ZIndex = 1000 Corner(KeyGlow,999) local KeyCard = New("Frame",KeyScreen) KeyCard.Size = UDim2.fromOffset(440,350) KeyCard.Position = UDim2.fromScale(.5,.5) KeyCard.AnchorPoint = Vector2.new(.5,.5) KeyCard.BackgroundColor3 = Theme.Card KeyCard.ZIndex = 1001 Corner(KeyCard,18) Stroke(KeyCard,Theme.Accent,1,.2) local KeyScale = New("UIScale",KeyCard) KeyScale.Scale = .75 Tween(KeyScale,.65,Enum.EasingStyle.Back,Enum.EasingDirection.Out,{ Scale = 1 }) local KeyTitle = New("TextLabel",KeyCard) KeyTitle.Size = UDim2.new(1,-40,0,45) KeyTitle.Position = UDim2.fromOffset(20,18) KeyTitle.BackgroundTransparency = 1 KeyTitle.Text = "XF HUB" KeyTitle.TextColor3 = Theme.Text KeyTitle.TextSize = 31 KeyTitle.Font = Enum.Font.GothamBlack KeyTitle.ZIndex = 1002 local KeySub = New("TextLabel",KeyCard) KeySub.Size = UDim2.new(1,-40,0,25) KeySub.Position = UDim2.fromOffset(20,62) KeySub.BackgroundTransparency = 1 KeySub.Text = VERSION.." • KEY SYSTEM" KeySub.TextColor3 = Theme.SubText KeySub.TextSize = 11 KeySub.Font = Enum.Font.Gotham KeySub.ZIndex = 1002 local KeyBox = New("TextBox",KeyCard) KeyBox.Size = UDim2.new(1,-40,0,46) KeyBox.Position = UDim2.fromOffset(20,105) KeyBox.BackgroundColor3 = Theme.Card2 KeyBox.Text = "" KeyBox.PlaceholderText = "Enter your XF key..." KeyBox.PlaceholderColor3 = Theme.SubText KeyBox.TextColor3 = Theme.Text KeyBox.TextSize = 13 KeyBox.Font = Enum.Font.Gotham KeyBox.ClearTextOnFocus = false KeyBox.ZIndex = 1002 Corner(KeyBox,9) Stroke(KeyBox,Theme.Accent,1,.4) local CheckKey = New("TextButton",KeyCard) CheckKey.Size = UDim2.new(.48,-5,0,43) CheckKey.Position = UDim2.fromOffset(20,165) CheckKey.BackgroundColor3 = Theme.Accent CheckKey.Text = "CHECK KEY" CheckKey.TextColor3 = Color3.new(1,1,1) CheckKey.TextSize = 12 CheckKey.Font = Enum.Font.GothamBold CheckKey.ZIndex = 1002 Corner(CheckKey,9) local GetKey = New("TextButton",KeyCard) GetKey.Size = UDim2.new(.48,-5,0,43) GetKey.Position = UDim2.new(.52,0,0,165) GetKey.BackgroundColor3 = Theme.Card2 GetKey.Text = "GET KEY" GetKey.TextColor3 = Theme.Text GetKey.TextSize = 12 GetKey.Font = Enum.Font.GothamBold GetKey.ZIndex = 1002 Corner(GetKey,9) Stroke(GetKey,Theme.Accent,1,.45) local Discord = New("TextButton",KeyCard) Discord.Size = UDim2.new(1,-40,0,42) Discord.Position = UDim2.fromOffset(20,218) Discord.BackgroundColor3 = Color3.fromRGB(65,70,150) Discord.Text = "DISCORD" Discord.TextColor3 = Color3.new(1,1,1) Discord.TextSize = 12 Discord.Font = Enum.Font.GothamBold Discord.ZIndex = 1002 Corner(Discord,9) local KeyStatus = New("TextLabel",KeyCard) KeyStatus.Size = UDim2.new(1,-40,0,25) KeyStatus.Position = UDim2.fromOffset(20,275) KeyStatus.BackgroundTransparency = 1 KeyStatus.Text = "Enter your key to continue." KeyStatus.TextColor3 = Theme.SubText KeyStatus.TextSize = 11 KeyStatus.Font = Enum.Font.Gotham KeyStatus.ZIndex = 1002 local KeyClose = New("TextButton",KeyCard) KeyClose.Size = UDim2.fromOffset(32,32) KeyClose.Position = UDim2.new(1,-42,0,10) KeyClose.BackgroundColor3 = Theme.Card2 KeyClose.Text = "×" KeyClose.TextColor3 = Theme.Text KeyClose.TextSize = 21 KeyClose.Font = Enum.Font.GothamBold KeyClose.ZIndex = 1003 Corner(KeyClose,8) GetKey.MouseButton1Click:Connect(function() KeyStatus.Text = "KEY: "..VALID_KEY KeyStatus.TextColor3 = Theme.Success end) Discord.MouseButton1Click:Connect(function() KeyStatus.Text = DISCORD KeyStatus.TextColor3 = Theme.Accent end) KeyClose.MouseButton1Click:Connect(function() RadioSound:Stop() ScreenGui:Destroy() end) --========================================================-- -- MAIN GUI --========================================================-- local Main = New("Frame",ScreenGui) Main.Name = "Main" Main.Size = UDim2.fromOffset(1000,650) Main.Position = UDim2.fromScale(.5,.5) Main.AnchorPoint = Vector2.new(.5,.5) Main.BackgroundColor3 = Theme.Background Main.Visible = false Main.ZIndex = 10 Corner(Main,18) Stroke(Main,Theme.Accent,1,.25) local MainScale = New("UIScale",Main) MainScale.Scale = .03 --========================================================-- -- MAIN GUI FUNCTIONS --========================================================-- local function StartMainAnimation() State.KeyAccepted = true KeyScreen.Visible = false Main.Visible = true Main.ZIndex = 10 Main.Position = UDim2.fromScale(.5,.5) Main.AnchorPoint = Vector2.new(.5,.5) MainScale.Scale = .03 Tween( MainScale, .8, Enum.EasingStyle.Back, Enum.EasingDirection.Out, { Scale = 1 } ) task.wait(.25) Notify("XF HUB","System initialized.") end CheckKey.MouseButton1Click:Connect(function() if KeyBox.Text == VALID_KEY then KeyStatus.Text = "KEY ACCEPTED" KeyStatus.TextColor3 = Theme.Success task.wait(.35) StartMainAnimation() else KeyStatus.Text = "INVALID KEY" KeyStatus.TextColor3 = Theme.Danger local original = KeyCard.Position Tween(KeyCard,.06,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,{ Position = original + UDim2.fromOffset(10,0) }).Completed:Wait() Tween(KeyCard,.06,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,{ Position = original - UDim2.fromOffset(10,0) }).Completed:Wait() Tween(KeyCard,.06,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,{ Position = original }) end end) --========================================================-- -- TOP BAR --========================================================-- local Top = New("Frame",Main) Top.Size = UDim2.new(1,0,0,70) Top.BackgroundColor3 = Theme.Sidebar Top.ZIndex = 20 local Logo = New("TextLabel",Top) Logo.Size = UDim2.fromOffset(240,45) Logo.Position = UDim2.fromOffset(20,8) Logo.BackgroundTransparency = 1 Logo.Text = "XF HUB" Logo.TextColor3 = Theme.Text Logo.TextSize = 26 Logo.Font = Enum.Font.GothamBlack Logo.TextXAlignment = Enum.TextXAlignment.Left Logo.ZIndex = 21 local Version = New("TextLabel",Top) Version.Size = UDim2.fromOffset(250,20) Version.Position = UDim2.fromOffset(22,43) Version.BackgroundTransparency = 1 Version.Text = VERSION Version.TextColor3 = Theme.SubText Version.TextSize = 10 Version.Font = Enum.Font.Gotham Version.TextXAlignment = Enum.TextXAlignment.Left Version.ZIndex = 21 local Online = New("TextLabel",Top) Online.Size = UDim2.fromOffset(150,30) Online.Position = UDim2.new(1,-245,.5,-15) Online.BackgroundTransparency = 1 Online.Text = "● SYSTEM ONLINE" Online.TextColor3 = Theme.Success Online.TextSize = 10 Online.Font = Enum.Font.GothamBold Online.ZIndex = 21 local Minimize = New("TextButton",Top) Minimize.Size = UDim2.fromOffset(35,35) Minimize.Position = UDim2.new(1,-80,.5,-17) Minimize.BackgroundColor3 = Theme.Card2 Minimize.Text = "—" Minimize.TextColor3 = Theme.Text Minimize.TextSize = 17 Minimize.Font = Enum.Font.GothamBold Minimize.ZIndex = 21 Corner(Minimize,8) local Close = New("TextButton",Top) Close.Size = UDim2.fromOffset(35,35) Close.Position = UDim2.new(1,-40,.5,-17) Close.BackgroundColor3 = Theme.Card2 Close.Text = "×" Close.TextColor3 = Theme.Text Close.TextSize = 20 Close.Font = Enum.Font.GothamBold Close.ZIndex = 21 Corner(Close,8) --========================================================-- -- DRAGGING --========================================================-- local Dragging = false local DragStart local StartPosition Top.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then Dragging = true DragStart = input.Position StartPosition = Main.Position end end) Top.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then Dragging = false end end) UserInputService.InputChanged:Connect(function(input) if Dragging and input.UserInputType == Enum.UserInputType.MouseMovement 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) --========================================================-- -- SIDEBAR --========================================================-- local Sidebar = New("Frame",Main) Sidebar.Size = UDim2.new(0,215,1,-70) Sidebar.Position = UDim2.fromOffset(0,70) Sidebar.BackgroundColor3 = Theme.Sidebar Sidebar.ZIndex = 15 local Search = New("TextBox",Sidebar) Search.Size = UDim2.new(1,-24,0,38) Search.Position = UDim2.fromOffset(12,12) Search.BackgroundColor3 = Theme.Card Search.Text = "" Search.PlaceholderText = "Search tabs..." Search.PlaceholderColor3 = Theme.SubText Search.TextColor3 = Theme.Text Search.TextSize = 11 Search.Font = Enum.Font.Gotham Search.ClearTextOnFocus = false Search.ZIndex = 16 Corner(Search,8) local TabHolder = New("ScrollingFrame",Sidebar) TabHolder.Size = UDim2.new(1,-24,1,-105) TabHolder.Position = UDim2.fromOffset(12,60) TabHolder.BackgroundTransparency = 1 TabHolder.BorderSizePixel = 0 TabHolder.ScrollBarThickness = 3 TabHolder.ZIndex = 16 local TabLayout = New("UIListLayout",TabHolder) TabLayout.Padding = UDim.new(0,7) local SideStatus = New("TextLabel",Sidebar) SideStatus.Size = UDim2.new(1,-24,0,35) SideStatus.Position = UDim2.new(0,12,1,-45) SideStatus.BackgroundColor3 = Theme.Card SideStatus.Text = "● XF ONLINE" SideStatus.TextColor3 = Theme.Success SideStatus.TextSize = 10 SideStatus.Font = Enum.Font.GothamBold SideStatus.ZIndex = 16 Corner(SideStatus,8) --========================================================-- -- CONTENT --========================================================-- local Content = New("Frame",Main) Content.Size = UDim2.new(1,-215,1,-70) Content.Position = UDim2.fromOffset(215,70) Content.BackgroundTransparency = 1 Content.ZIndex = 11 local Scroll = New("ScrollingFrame",Content) Scroll.Size = UDim2.new(1,-30,1,-30) Scroll.Position = UDim2.fromOffset(15,15) Scroll.BackgroundTransparency = 1 Scroll.BorderSizePixel = 0 Scroll.ScrollBarThickness = 4 Scroll.ZIndex = 12 local Layout = New("UIListLayout",Scroll) Layout.Padding = UDim.new(0,10) Layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() Scroll.CanvasSize = UDim2.fromOffset( 0, Layout.AbsoluteContentSize.Y + 20 ) end) --========================================================-- -- UI COMPONENTS --========================================================-- local function ClearContent() for _,v in ipairs(Scroll:GetChildren()) do if not v:IsA("UIListLayout") then v:Destroy() end end end local function Section(text) local f = New("Frame",Scroll) f.Size = UDim2.new(1,-5,0,42) f.BackgroundColor3 = Theme.Card f.ZIndex = 12 Corner(f,9) local l = New("TextLabel",f) l.Size = UDim2.new(1,-20,1,0) l.Position = UDim2.fromOffset(10,0) l.BackgroundTransparency = 1 l.Text = text l.TextColor3 = Theme.Accent l.TextSize = 12 l.Font = Enum.Font.GothamBold l.TextXAlignment = Enum.TextXAlignment.Left l.ZIndex = 13 return f end local function Button(text,callback) local b = New("TextButton",Scroll) b.Size = UDim2.new(1,-5,0,42) b.BackgroundColor3 = Theme.Card b.Text = text b.TextColor3 = Theme.Text b.TextSize = 11 b.Font = Enum.Font.GothamBold b.ZIndex = 12 Corner(b,8) Stroke(b,Theme.Accent,1,.75) b.MouseEnter:Connect(function() Tween(b,.12,nil,nil,{ BackgroundColor3 = Theme.Card2 }) end) b.MouseLeave:Connect(function() Tween(b,.12,nil,nil,{ BackgroundColor3 = Theme.Card }) end) b.MouseButton1Click:Connect(callback) return b end local function Toggle(text,key,callback) local holder = New("Frame",Scroll) holder.Size = UDim2.new(1,-5,0,44) holder.BackgroundColor3 = Theme.Card holder.ZIndex = 12 Corner(holder,8) local label = New("TextLabel",holder) label.Size = UDim2.new(1,-80,1,0) label.Position = UDim2.fromOffset(14,0) label.BackgroundTransparency = 1 label.Text = text label.TextColor3 = Theme.Text label.TextSize = 11 label.Font = Enum.Font.GothamBold label.TextXAlignment = Enum.TextXAlignment.Left label.ZIndex = 13 local button = New("TextButton",holder) button.Size = UDim2.fromOffset(46,24) button.Position = UDim2.new(1,-60,.5,-12) button.BackgroundColor3 = State[key] and Theme.Accent or Theme.Card2 button.Text = "" button.ZIndex = 13 Corner(button,20) local knob = New("Frame",button) knob.Size = UDim2.fromOffset(18,18) knob.Position = State[key] and UDim2.new(1,-21,.5,-9) or UDim2.fromOffset(3,3) knob.BackgroundColor3 = Color3.new(1,1,1) knob.ZIndex = 14 Corner(knob,20) button.MouseButton1Click:Connect(function() State[key] = not State[key] Tween(button,.15,nil,nil,{ BackgroundColor3 = State[key] and Theme.Accent or Theme.Card2 }) Tween(knob,.15,nil,nil,{ Position = State[key] and UDim2.new(1,-21,.5,-9) or UDim2.fromOffset(3,3) }) if callback then callback(State[key]) end end) return holder end local function Slider(text,min,max,value,callback) local holder = New("Frame",Scroll) holder.Size = UDim2.new(1,-5,0,63) holder.BackgroundColor3 = Theme.Card holder.ZIndex = 12 Corner(holder,8) local label = New("TextLabel",holder) label.Size = UDim2.new(1,-80,0,25) label.Position = UDim2.fromOffset(14,5) label.BackgroundTransparency = 1 label.Text = text label.TextColor3 = Theme.Text label.TextSize = 11 label.Font = Enum.Font.GothamBold label.TextXAlignment = Enum.TextXAlignment.Left label.ZIndex = 13 local valueLabel = New("TextLabel",holder) valueLabel.Size = UDim2.fromOffset(70,25) valueLabel.Position = UDim2.new(1,-80,0,5) valueLabel.BackgroundTransparency = 1 valueLabel.Text = tostring(value) valueLabel.TextColor3 = Theme.Accent valueLabel.TextSize = 11 valueLabel.Font = Enum.Font.GothamBold valueLabel.ZIndex = 13 local bar = New("Frame",holder) bar.Size = UDim2.new(1,-28,0,6) bar.Position = UDim2.fromOffset(14,43) bar.BackgroundColor3 = Theme.Card2 bar.ZIndex = 13 Corner(bar,5) local fill = New("Frame",bar) fill.Size = UDim2.fromScale( math.clamp((value-min)/(max-min),0,1), 1 ) fill.BackgroundColor3 = Theme.Accent fill.ZIndex = 14 Corner(fill,5) local dragging = false local function update(x) local percent = math.clamp( (x-bar.AbsolutePosition.X)/ bar.AbsoluteSize.X, 0, 1 ) local val = math.floor( min+(max-min)*percent+.5 ) valueLabel.Text = tostring(val) fill.Size = UDim2.fromScale(percent,1) callback(val) end bar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true update(input.Position.X) end end) local moveConnection local endConnection moveConnection = UserInputService.InputChanged:Connect(function(input) if not holder.Parent then if moveConnection then moveConnection:Disconnect() end return end if dragging and ( input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch ) then update(input.Position.X) end end) endConnection = UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end if not holder.Parent then if endConnection then endConnection:Disconnect() end end end) return holder end --========================================================-- -- TARGET SELECTOR --========================================================-- local function PlayerSelector() local holder = New("Frame",Scroll) holder.Size = UDim2.new(1,-5,0,48) holder.BackgroundColor3 = Theme.Card holder.ZIndex = 50 Corner(holder,8) local label = New("TextLabel",holder) label.Size = UDim2.new(.3,0,1,0) label.Position = UDim2.fromOffset(14,0) label.BackgroundTransparency = 1 label.Text = "TARGET" label.TextColor3 = Theme.Text label.TextSize = 11 label.Font = Enum.Font.GothamBold label.TextXAlignment = Enum.TextXAlignment.Left label.ZIndex = 51 local drop = New("TextButton",holder) drop.Size = UDim2.new(.6,0,0,34) drop.Position = UDim2.new(.35,0,.5,-17) drop.BackgroundColor3 = Theme.Card2 drop.Text = State.SelectedTarget and State.SelectedTarget.DisplayName or "Select Player" drop.TextColor3 = Theme.Text drop.TextSize = 10 drop.Font = Enum.Font.GothamBold drop.ZIndex = 51 Corner(drop,7) local list drop.MouseButton1Click:Connect(function() if list then list:Destroy() list = nil return end local players = Players:GetPlayers() list = New("Frame",drop) list.Size = UDim2.new( 1, 0, 0, math.min(#players*30,180) ) list.Position = UDim2.new(0,0,1,5) list.BackgroundColor3 = Theme.Card2 list.ZIndex = 100 Corner(list,7) local layout = New("UIListLayout",list) for _,player in ipairs(players) do if player ~= LocalPlayer then local item = New("TextButton",list) item.Size = UDim2.new(1,0,0,30) item.BackgroundTransparency = 1 item.Text = player.DisplayName item.TextColor3 = Theme.Text item.TextSize = 10 item.Font = Enum.Font.Gotham item.ZIndex = 101 item.MouseButton1Click:Connect(function() State.SelectedTarget = player drop.Text = player.DisplayName if list then list:Destroy() list = nil end end) end end end) end --========================================================-- -- TAB SYSTEM --========================================================-- local Tabs = {} local Loaders = {} local TabNames = { "Combat", "Player", "Animations", "Visuals", "MM2", "Radio", "Teleport", "Misc", "Settings", "Credits" } local function AddTab(name) local b = New("TextButton",TabHolder) b.Size = UDim2.new(1,0,0,39) b.BackgroundColor3 = Theme.Sidebar b.Text = name b.TextColor3 = Theme.SubText b.TextSize = 11 b.Font = Enum.Font.GothamBold b.ZIndex = 17 Corner(b,8) Tabs[name] = b b.MouseButton1Click:Connect(function() State.Tab = name for tab,button in pairs(Tabs) do if tab == name then button.BackgroundColor3 = Theme.Card2 button.TextColor3 = Theme.Accent else button.BackgroundColor3 = Theme.Sidebar button.TextColor3 = Theme.SubText end end ClearContent() if Loaders[name] then Loaders[name]() end end) end for _,name in ipairs(TabNames) do AddTab(name) end Search:GetPropertyChangedSignal("Text"):Connect(function() local query = string.lower(Search.Text) for name,button in pairs(Tabs) do button.Visible = query == "" or string.find( string.lower(name), query, 1, true ) ~= nil end end) --========================================================-- -- COMBAT --========================================================-- Loaders.Combat = function() Section("TARGET SYSTEM") PlayerSelector() Toggle("Lock Target","LockedTarget",function(enabled) if enabled and not State.SelectedTarget then State.LockedTarget = false Notify( "XF HUB", "Select a target first." ) end end) Toggle("Follow Target","Follow",function(enabled) if enabled and not State.SelectedTarget then State.Follow = false Notify( "XF HUB", "Select a target first." ) end end) Button( "Follow Position: "..State.FollowPosition, function(button) if State.FollowPosition == "Behind" then State.FollowPosition = "Above" elseif State.FollowPosition == "Above" then State.FollowPosition = "Below" else State.FollowPosition = "Behind" end button.Text = "Follow Position: "..State.FollowPosition end ) Slider( "Follow Distance", 1, 30, State.FollowDistance, function(v) State.FollowDistance = v end ) Slider( "Follow Height", 0, 20, State.FollowHeight, function(v) State.FollowHeight = v end ) Section("COMBAT") Toggle("Attack System","Attack",function(enabled) if enabled then Notify( "XF HUB", "Attack system enabled." ) end end) Slider( "Combat Range", 5, 100, State.CombatRange, function(v) State.CombatRange = v end ) Button("Unlock Target",function() State.LockedTarget = false State.SelectedTarget = nil Notify( "XF HUB", "Target unlocked." ) end) Button("Refresh Players",function() ClearContent() Loaders.Combat() end) Section("TARGET INFORMATION") local targetInfo = New("TextLabel",Scroll) targetInfo.Size = UDim2.new(1,-5,0,80) targetInfo.BackgroundColor3 = Theme.Card targetInfo.TextColor3 = Theme.Text targetInfo.TextSize = 11 targetInfo.Font = Enum.Font.Gotham targetInfo.TextXAlignment = Enum.TextXAlignment.Left targetInfo.TextYAlignment = Enum.TextYAlignment.Top targetInfo.Text = "No target selected." targetInfo.ZIndex = 12 Corner(targetInfo,8) task.spawn(function() while targetInfo.Parent do local target = State.SelectedTarget if target then local hum = target.Character and target.Character:FindFirstChildOfClass("Humanoid") local root = target.Character and target.Character:FindFirstChild("HumanoidRootPart") local myRoot = Root() local distance = 0 if root and myRoot then distance = math.floor( (root.Position-myRoot.Position).Magnitude ) end targetInfo.Text = "TARGET: "..target.DisplayName.. "\nHEALTH: "..( hum and math.floor(hum.Health) or "?" ).. "\nDISTANCE: "..distance.." studs" else targetInfo.Text = "No target selected." end task.wait(.2) end end) end --========================================================-- -- PLAYER --========================================================-- Loaders.Player = function() Section("MOVEMENT") Toggle("Custom WalkSpeed","WalkSpeedEnabled",function() local h = Humanoid() if h then h.WalkSpeed = State.WalkSpeedEnabled and State.WalkSpeed or 16 end end) Slider( "WalkSpeed", 0, 100, State.WalkSpeed, function(v) State.WalkSpeed = v if State.WalkSpeedEnabled then local h = Humanoid() if h then h.WalkSpeed = v end end end ) Toggle("Custom JumpPower","JumpPowerEnabled",function() local h = Humanoid() if h then h.UseJumpPower = true h.JumpPower = State.JumpPowerEnabled and State.JumpPower or 50 end end) Slider( "JumpPower", 0, 150, State.JumpPower, function(v) State.JumpPower = v if State.JumpPowerEnabled then local h = Humanoid() if h then h.JumpPower = v end end end ) Slider( "HipHeight", 0, 10, State.HipHeight, function(v) State.HipHeight = v local h = Humanoid() if h then h.HipHeight = v end end ) Section("SPECIAL MOVEMENT") Toggle("Noclip","Noclip",function(enabled) if enabled then Notify( "XF MOVEMENT", "Noclip enabled." ) else Notify( "XF MOVEMENT", "Noclip disabled." ) end end) Toggle("Fly","Fly",function(enabled) if enabled then StartFly() Notify( "XF MOVEMENT", "Fly enabled • WASD + Space/Ctrl" ) else StopFly() Notify( "XF MOVEMENT", "Fly disabled." ) end end) Slider( "Fly Speed", 10, 100000, State.FlySpeed, function(v) State.FlySpeed = v end ) Button("RESET MOVEMENT MODES",function() State.Noclip = false State.Fly = false StopFly() RestoreCollision() Notify( "XF MOVEMENT", "Movement modes reset." ) end) Section("TOUCH FLING") Toggle("Touch Fling","TouchFling",function(enabled) if enabled then if not TouchFlingRemote then State.TouchFling = false Notify( "XF FLING", "XF_TouchFling RemoteEvent not found." ) return end StartTouchFling() Notify( "XF FLING", "Touch Fling enabled." ) else StopTouchFling() Notify( "XF FLING", "Touch Fling disabled." ) end end) Slider( "Fling Power", 25, 100000, State.FlingPower, function(v) State.FlingPower = v end ) Button("RESET FLING",function() State.TouchFling = false StopTouchFling() State.FlingPower = 100 Notify( "XF FLING", "Fling settings reset." ) end) Section("RESET") Button("Reset Movement",function() local h = Humanoid() if h then h.WalkSpeed = 16 h.JumpPower = 50 h.HipHeight = 2 end State.WalkSpeedEnabled = false State.JumpPowerEnabled = false Notify( "XF HUB", "Movement reset." ) end) Button("Reset Character",function() local h = Humanoid() if h then h.Health = 0 end end) end --========================================================-- -- ANIMATIONS --========================================================-- local AnimationPacks = { Default = { Idle="", Walk="", Run="", Jump="", Fall="", Climb="", Swim="" }, Ninja = { Idle="656117400", Walk="656121766", Run="656118852", Jump="656117878", Fall="656115606", Climb="656114359", Swim="656119721" }, Zombie = { Idle="616158929", Walk="616168032", Run="616163682", Jump="616161997", Fall="616157476", Climb="616156119", Swim="616165109" }, Stylish = { Idle="616136790", Walk="616146177", Run="616140816", Jump="616139451", Fall="616134815", Climb="616133594", Swim="616143378" }, Robot = { Idle="616088211", Walk="616095330", Run="616091570", Jump="616089559", Fall="616087089", Climb="616086039", Swim="616092998" }, JJS = { Idle="", Walk="", Run="", Jump="", Fall="", Climb="", Swim="" }, Villain = { Idle="", Walk="", Run="", Jump="", Fall="", Climb="", Swim="" }, Goofy = { Idle="", Walk="", Run="", Jump="", Fall="", Climb="", Swim="" }, Custom = { Idle="", Walk="", Run="", Jump="", Fall="", Climb="", Swim="" } } local OriginalAnimations = {} local function GetAnimate() local c = Character() return c and c:FindFirstChild("Animate") end local function CaptureAnimations() local animate = GetAnimate() if not animate then return end OriginalAnimations = {} for _,obj in ipairs(animate:GetDescendants()) do if obj:IsA("Animation") then OriginalAnimations[obj] = obj.AnimationId end end end local function SetGroup(group,id) if not id or id == "" then return end local animate = GetAnimate() if not animate then return end local folder = animate:FindFirstChild(group) if not folder then return end if not string.find(id,"rbxassetid://") then id = "rbxassetid://"..id end for _,obj in ipairs(folder:GetDescendants()) do if obj:IsA("Animation") then obj.AnimationId = id end end end local function ApplyAnimationPack(name) local animate = GetAnimate() if not animate then Notify( "XF ANIMATIONS", "Animate script not found." ) return end if next(OriginalAnimations) == nil then CaptureAnimations() end local pack = AnimationPacks[name] if not pack then return end if name == "Default" then for obj,id in pairs(OriginalAnimations) do if obj and obj.Parent then obj.AnimationId = id end end else SetGroup("idle",pack.Idle) SetGroup("walk",pack.Walk) SetGroup("run",pack.Run) SetGroup("jump",pack.Jump) SetGroup("fall",pack.Fall) SetGroup("climb",pack.Climb) SetGroup("swim",pack.Swim) end State.AnimationPack = name Notify( "XF ANIMATIONS", "Equipped "..name ) end Loaders.Animations = function() Section("ANIMATION PACKS") Toggle( "Animation System", "Animations", function(enabled) if enabled then ApplyAnimationPack(State.AnimationPack) else ApplyAnimationPack("Default") end end ) Toggle( "Reapply After Respawn", "ReapplyAnimations" ) for _,name in ipairs({ "Default", "Ninja", "Zombie", "Stylish", "Robot", "JJS", "Villain", "Goofy", "Custom" }) do Button( "EQUIP • "..name, function() ApplyAnimationPack(name) end ) end Section("CUSTOM IDS") for _,type in ipairs({ "Idle", "Walk", "Run", "Jump", "Fall", "Climb", "Swim" }) do local holder = New("Frame",Scroll) holder.Size = UDim2.new(1,-5,0,52) holder.BackgroundColor3 = Theme.Card holder.ZIndex = 12 Corner(holder,8) local label = New("TextLabel",holder) label.Size = UDim2.new(.35,0,1,0) label.Position = UDim2.fromOffset(12,0) label.BackgroundTransparency = 1 label.Text = type label.TextColor3 = Theme.Text label.TextSize = 11 label.Font = Enum.Font.GothamBold label.TextXAlignment = Enum.TextXAlignment.Left label.ZIndex = 13 local box = New("TextBox",holder) box.Size = UDim2.new(.58,0,0,34) box.Position = UDim2.new(.38,0,.5,-17) box.BackgroundColor3 = Theme.Card2 box.Text = AnimationPacks.Custom[type] box.PlaceholderText = "Animation ID" box.PlaceholderColor3 = Theme.SubText box.TextColor3 = Theme.Text box.TextSize = 10 box.Font = Enum.Font.Gotham box.ClearTextOnFocus = false box.ZIndex = 13 Corner(box,7) box.FocusLost:Connect(function() AnimationPacks.Custom[type] = box.Text end) end Button( "APPLY CUSTOM PACK", function() ApplyAnimationPack("Custom") end ) Button( "RESET ANIMATIONS", function() ApplyAnimationPack("Default") end ) end --========================================================-- -- VISUALS --========================================================-- local FOVCircle local function MakeFOVCircle() if FOVCircle then FOVCircle:Destroy() end FOVCircle = New("Frame",ScreenGui) FOVCircle.Name = "XF_FOVCircle" FOVCircle.Size = UDim2.fromOffset( State.FOVCircleSize, State.FOVCircleSize ) FOVCircle.Position = UDim2.fromScale(.5,.5) FOVCircle.AnchorPoint = Vector2.new(.5,.5) FOVCircle.BackgroundTransparency = 1 FOVCircle.Visible = State.FOVCircle FOVCircle.ZIndex = 5 Corner(FOVCircle,999) Stroke( FOVCircle, Theme.Accent, 2, .15 ) end MakeFOVCircle() Loaders.Visuals = function() Section("CAMERA") Slider( "FOV", 50, 120, State.FOV, function(v) State.FOV = v local camera = workspace.CurrentCamera if camera then camera.FieldOfView = v end end ) Button("RESET FOV",function() State.FOV = 70 local camera = workspace.CurrentCamera if camera then camera.FieldOfView = 70 end end) Toggle( "FOV Circle", "FOVCircle", function(enabled) if FOVCircle then FOVCircle.Visible = enabled end end ) Slider( "FOV Circle Size", 50, 700, State.FOVCircleSize, function(v) State.FOVCircleSize = v if FOVCircle then FOVCircle.Size = UDim2.fromOffset(v,v) end end ) Section("PLAYER VISUALS") Toggle("Player ESP","PlayerESP") Toggle("Target ESP","TargetESP") Toggle("Name ESP","NameESP") Toggle("Distance ESP","DistanceESP") Button("CLEAR ALL ESP",function() for _,player in ipairs(Players:GetPlayers()) do if player.Character then for _,obj in ipairs( player.Character:GetChildren() ) do if obj.Name == "XF_Highlight" then obj:Destroy() end end end end Notify( "XF HUB", "ESP cleared." ) end) end --========================================================-- -- MM2 ROLE DETECTION --========================================================-- local function GetMM2Role(player) local role = player:GetAttribute("Role") if typeof(role) == "string" and role ~= "" then return role end local playerData = player:FindFirstChild("PlayerData") if playerData then local roleValue = playerData:FindFirstChild("Role") if roleValue and roleValue:IsA("StringValue") then return roleValue.Value end end local character = player.Character if character then role = character:GetAttribute("Role") if typeof(role) == "string" and role ~= "" then return role end end local roleValue = player:FindFirstChild("Role") if roleValue and roleValue:IsA("StringValue") then return roleValue.Value end if character then roleValue = character:FindFirstChild("Role") if roleValue and roleValue:IsA("StringValue") then return roleValue.Value end end if player.Team then local teamName = string.lower(player.Team.Name) if teamName == "murderer" then return "Murderer" end if teamName == "sheriff" then return "Sheriff" end if teamName == "innocent" then return "Innocent" end end return nil end --========================================================-- -- MM2 ESP --========================================================-- local MM2ESPFolder = Instance.new("Folder") MM2ESPFolder.Name = "XF_MM2_ESP" MM2ESPFolder.Parent = ScreenGui local MM2ESPObjects = {} local function ClearMM2ESP() for _,object in ipairs(MM2ESPObjects) do if object and object.Parent then object:Destroy() end end table.clear(MM2ESPObjects) end local function CreateRoleESP(player,role) if player == LocalPlayer then return end local character = player.Character if not character then return end local root = character:FindFirstChild("HumanoidRootPart") if not root then return end local color if role == "Murderer" then color = Color3.fromRGB( 255, 45, 55 ) elseif role == "Sheriff" then color = Color3.fromRGB( 50, 125, 255 ) elseif role == "Innocent" then color = Color3.fromRGB( 65, 255, 125 ) else return end local highlight = Instance.new("Highlight") highlight.Name = "XF_MM2_Highlight" highlight.Adornee = character highlight.FillColor = color highlight.OutlineColor = color highlight.FillTransparency = .55 highlight.OutlineTransparency = 0 highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop highlight.Parent = MM2ESPFolder table.insert( MM2ESPObjects, highlight ) local billboard = Instance.new("BillboardGui") billboard.Name = "XF_MM2_Label" billboard.Size = UDim2.fromOffset( 220, 45 ) billboard.StudsOffset = Vector3.new( 0, 3, 0 ) billboard.AlwaysOnTop = true billboard.Adornee = root billboard.Parent = MM2ESPFolder table.insert( MM2ESPObjects, billboard ) local label = Instance.new("TextLabel") label.Size = UDim2.fromScale( 1, 1 ) label.BackgroundTransparency = 1 label.Text = role:upper().. " | ".. player.DisplayName label.TextColor3 = color label.TextStrokeTransparency = 0 label.Font = Enum.Font.GothamBold label.TextSize = 13 label.Parent = billboard end local function RefreshMM2ESP() ClearMM2ESP() for _,player in ipairs( Players:GetPlayers() ) do if player ~= LocalPlayer then local role = GetMM2Role(player) if role then role = string.lower( string.gsub( role, "%s+", "" ) ) if role == "murderer" and State.MurdererESP then CreateRoleESP( player, "Murderer" ) elseif role == "sheriff" and State.SheriffESP then CreateRoleESP( player, "Sheriff" ) elseif role == "innocent" and State.InnocentESP then CreateRoleESP( player, "Innocent" ) end end end end end local MM2RefreshTimer = 0 RunService.Heartbeat:Connect(function(delta) MM2RefreshTimer += delta if MM2RefreshTimer >= 1 then MM2RefreshTimer = 0 if State.MurdererESP or State.SheriffESP or State.InnocentESP then RefreshMM2ESP() else ClearMM2ESP() end end end) Players.PlayerAdded:Connect(function() task.wait(1) RefreshMM2ESP() end) Players.PlayerRemoving:Connect(function() task.wait() RefreshMM2ESP() end) --========================================================-- -- MM2 TAB --========================================================-- Loaders.MM2 = function() Section("ROLE ESP") Toggle( "Murderer ESP", "MurdererESP", function() RefreshMM2ESP() end ) Toggle( "Sheriff ESP", "SheriffESP", function() RefreshMM2ESP() end ) Toggle( "Innocent ESP", "InnocentESP", function() RefreshMM2ESP() end ) Button( "REFRESH ROLES", function() RefreshMM2ESP() Notify( "XF MM2", "Roles refreshed." ) end ) Button( "CLEAR ROLE ESP", function() ClearMM2ESP() Notify( "XF MM2", "Role ESP cleared." ) end ) Section("ROLE COLOURS") Button( "MURDERER • RED", function() Notify( "XF MM2", "Murderer = Red" ) end ) Button( "SHERIFF • BLUE", function() Notify( "XF MM2", "Sheriff = Blue" ) end ) Button( "INNOCENT • GREEN", function() Notify( "XF MM2", "Innocent = Green" ) end ) end --========================================================-- -- RADIO --========================================================-- Loaders.Radio = function() Section("XF RADIO") local nowPlaying = New("TextLabel",Scroll) nowPlaying.Size = UDim2.new( 1, -5, 0, 60 ) nowPlaying.BackgroundColor3 = Theme.Card nowPlaying.TextColor3 = Theme.Text nowPlaying.TextSize = 11 nowPlaying.Font = Enum.Font.GothamBold nowPlaying.TextXAlignment = Enum.TextXAlignment.Left nowPlaying.TextYAlignment = Enum.TextYAlignment.Center nowPlaying.Text = State.RadioPlaying and "NOW PLAYING\nID: "..State.RadioID or "NOT PLAYING" nowPlaying.ZIndex = 12 Corner( nowPlaying, 8 ) local idHolder = New("Frame",Scroll) idHolder.Size = UDim2.new( 1, -5, 0, 55 ) idHolder.BackgroundColor3 = Theme.Card idHolder.ZIndex = 12 Corner( idHolder, 8 ) local idLabel = New("TextLabel",idHolder) idLabel.Size = UDim2.new( .3, 0, 1, 0 ) idLabel.Position = UDim2.fromOffset( 14, 0 ) idLabel.BackgroundTransparency = 1 idLabel.Text = "SOUND ID" idLabel.TextColor3 = Theme.Text idLabel.TextSize = 11 idLabel.Font = Enum.Font.GothamBold idLabel.TextXAlignment = Enum.TextXAlignment.Left idLabel.ZIndex = 13 local idBox = New("TextBox",idHolder) idBox.Size = UDim2.new( .62, 0, 0, 34 ) idBox.Position = UDim2.new( .35, 0, .5, -17 ) idBox.BackgroundColor3 = Theme.Card2 idBox.Text = State.RadioID idBox.PlaceholderText = "Enter Roblox audio ID..." idBox.PlaceholderColor3 = Theme.SubText idBox.TextColor3 = Theme.Text idBox.TextSize = 10 idBox.Font = Enum.Font.Gotham idBox.ClearTextOnFocus = false idBox.ZIndex = 13 Corner( idBox, 7 ) idBox.FocusLost:Connect(function() local id = string.match( idBox.Text, "%d+" ) if id then State.RadioID = id idBox.Text = id end end) Button( "PLAY RADIO", function() local id = string.match( idBox.Text, "%d+" ) if not id or id == "" then Notify( "XF RADIO", "Enter a valid audio ID." ) return end State.RadioID = id RadioSound:Stop() RadioSound.SoundId = "rbxassetid://"..id RadioSound.Volume = State.RadioVolume / 100 RadioSound.Looped = State.RadioLoop RadioSound.TimePosition = 0 local success = pcall(function() RadioSound:Play() end) if success then State.RadioPlaying = true State.RadioPaused = false nowPlaying.Text = "NOW PLAYING\nID: "..id Notify( "XF RADIO", "Playing audio "..id ) else Notify( "XF RADIO", "Could not play this audio." ) end end ) Button( "PAUSE / RESUME", function() if not State.RadioPlaying then Notify( "XF RADIO", "Nothing is playing." ) return end if State.RadioPaused then RadioSound:Resume() State.RadioPaused = false nowPlaying.Text = "NOW PLAYING\nID: "..State.RadioID else RadioSound:Pause() State.RadioPaused = true nowPlaying.Text = "PAUSED\nID: "..State.RadioID end end ) Button( "STOP RADIO", function() RadioSound:Stop() State.RadioPlaying = false State.RadioPaused = false nowPlaying.Text = "NOT PLAYING" Notify( "XF RADIO", "Radio stopped." ) end ) Section("RADIO SETTINGS") Slider( "Volume", 0, 100, State.RadioVolume, function(v) State.RadioVolume = v RadioSound.Volume = v / 100 end ) Toggle( "Loop Audio", "RadioLoop", function(enabled) RadioSound.Looped = enabled end ) Button( "MUTE RADIO", function() RadioSound.Volume = 0 Notify( "XF RADIO", "Radio muted." ) end ) Button( "RESET RADIO", function() RadioSound:Stop() State.RadioID = "" State.RadioVolume = 50 State.RadioLoop = true State.RadioPlaying = false State.RadioPaused = false RadioSound.Volume = .5 RadioSound.Looped = true idBox.Text = "" nowPlaying.Text = "NOT PLAYING" Notify( "XF RADIO", "Radio reset." ) end ) Section("RADIO INFO") local info = New("TextLabel",Scroll) info.Size = UDim2.new( 1, -5, 0, 75 ) info.BackgroundColor3 = Theme.Card info.TextColor3 = Theme.SubText info.TextSize = 10 info.Font = Enum.Font.Gotham info.TextXAlignment = Enum.TextXAlignment.Left info.TextYAlignment = Enum.TextYAlignment.Center info.Text = "XF RADIO\n\nOnly you can hear this radio.\nEnter a Roblox audio ID and press PLAY." info.ZIndex = 12 Corner( info, 8 ) end --========================================================-- -- TELEPORT --========================================================-- Loaders.Teleport = function() Section("PLAYER TELEPORT") PlayerSelector() Button( "TELEPORT TO TARGET", function() local target = State.SelectedTarget if not target then Notify( "XF HUB", "No target selected." ) return end local targetRoot = target.Character and target.Character:FindFirstChild( "HumanoidRootPart" ) local root = Root() if targetRoot and root then root.CFrame = targetRoot.CFrame * CFrame.new( 0, 0, -4 ) end end ) Section("SAVED LOCATION") Button( "SAVE LOCATION", function() local root = Root() if root then State.SavedCFrame = root.CFrame Notify( "XF HUB", "Location saved." ) end end ) Button( "RETURN TO LOCATION", function() if not State.SavedCFrame then Notify( "XF HUB", "No saved location." ) return end local root = Root() if root then root.CFrame = State.SavedCFrame end end ) Button( "CLEAR LOCATION", function() State.SavedCFrame = nil Notify( "XF HUB", "Location cleared." ) end ) end --========================================================-- -- MISC --========================================================-- Loaders.Misc = function() Section("SERVER INFORMATION") local info = New("TextLabel",Scroll) info.Size = UDim2.new(1,-5,0,105) info.BackgroundColor3 = Theme.Card info.TextColor3 = Theme.Text info.TextSize = 11 info.Font = Enum.Font.Gotham info.TextXAlignment = Enum.TextXAlignment.Left info.TextYAlignment = Enum.TextYAlignment.Top info.ZIndex = 12 Corner(info,8) task.spawn(function() while info.Parent do local ping = 0 pcall(function() ping = math.floor( LocalPlayer:GetNetworkPing()*1000 ) end) info.Text = "PLAYER: "..LocalPlayer.DisplayName.. "\nUSERNAME: "..LocalPlayer.Name.. "\nPLAYERS: "..#Players:GetPlayers().. "\nPING: "..ping.."ms".. "\nPLACE ID: "..game.PlaceId.. "\nJOB ID: "..string.sub( game.JobId, 1, 20 ) task.wait(1) end end) Toggle( "FPS Counter", "FPS" ) Toggle( "Ping Counter", "Ping" ) Button( "REJOIN SERVER", function() TeleportService:Teleport( game.PlaceId, LocalPlayer ) end ) Button( "RESET CHARACTER", function() local h = Humanoid() if h then h.Health = 0 end end ) Button( "HIDE GUI", function() State.UIVisible = false Main.Visible = false end ) Button( "SHOW GUI", function() State.UIVisible = true Main.Visible = true end ) end --========================================================-- -- SETTINGS --========================================================-- Loaders.Settings = function() Section("UI SETTINGS") Toggle( "Compact Mode", "Compact", function(enabled) if enabled then Main.Size = UDim2.fromOffset( 850, 560 ) else Main.Size = UDim2.fromOffset( 1000, 650 ) end end ) Toggle( "Fullscreen", "Fullscreen", function(enabled) if enabled then Main.Size = UDim2.new( 1, -30, 1, -30 ) else Main.Size = UDim2.fromOffset( 1000, 650 ) end end ) Slider( "UI Scale", 70, 130, 100, function(v) MainScale.Scale = v / 100 end ) Section("THEMES") Button( "PURPLE THEME", function() Theme = Themes.Purple Notify( "XF HUB", "Purple theme selected." ) end ) Button( "BLUE THEME", function() Theme = Themes.Blue Notify( "XF HUB", "Blue theme selected." ) end ) Button( "RED THEME", function() Theme = Themes.Red Notify( "XF HUB", "Red theme selected." ) end ) Button( "GREEN THEME", function() Theme = Themes.Green Notify( "XF HUB", "Green theme selected." ) end ) Section("GUI CONTROLS") Button( "RESET POSITION", function() Main.Position = UDim2.fromScale( .5, .5 ) end ) Button( "RESET SIZE", function() Main.Size = UDim2.fromOffset( 1000, 650 ) end ) Button( "RESET UI SCALE", function() MainScale.Scale = 1 end ) Button( "RESET ALL SETTINGS", function() State.Follow = false State.Attack = false State.WalkSpeedEnabled = false State.JumpPowerEnabled = false State.Noclip = false State.Fly = false State.TouchFling = false State.PlayerESP = false State.TargetESP = false State.MurdererESP = false State.SheriffESP = false State.InnocentESP = false StopFly() StopTouchFling() RestoreCollision() ClearMM2ESP() State.FOV = 70 State.FOVCircle = false State.FlySpeed = 50 State.FlingPower = 100 MainScale.Scale = 1 Main.Size = UDim2.fromOffset( 1000, 650 ) Main.Position = UDim2.fromScale( .5, .5 ) local camera = workspace.CurrentCamera if camera then camera.FieldOfView = 70 end Notify( "XF HUB", "Settings reset." ) end ) end --========================================================-- -- CREDITS --========================================================-- Loaders.Credits = function() Section( "XF HUB CREDITS" ) local creditLines = { "XF HUB", "Developed by Haze", "Code helpers Sccccarffs and Renji", "VFX — ChatGPT", "GUI helpers — Haze", "", VERSION, "", "Discord", DISCORD } for _,line in ipairs( creditLines ) do local label = New( "TextLabel", Scroll ) label.Size = UDim2.new( 1, -5, 0, 40 ) label.BackgroundColor3 = Theme.Card label.Text = line label.TextColor3 = line == "XF HUB" and Theme.Accent or Theme.Text label.TextSize = line == "XF HUB" and 20 or 11 label.Font = line == "XF HUB" and Enum.Font.GothamBlack or Enum.Font.GothamBold label.ZIndex = 12 Corner( label, 8 ) end end --========================================================-- -- INITIAL TAB --========================================================-- Tabs.Combat.BackgroundColor3 = Theme.Card2 Tabs.Combat.TextColor3 = Theme.Accent Loaders.Combat() --========================================================-- -- FOLLOW SYSTEM --========================================================-- RunService.Heartbeat:Connect(function() if not State.Follow then return end local target = State.SelectedTarget if not target then return end local targetRoot = target.Character and target.Character:FindFirstChild( "HumanoidRootPart" ) local root = Root() if not targetRoot or not root then return end local position if State.FollowPosition == "Behind" then position = targetRoot.Position - targetRoot.CFrame.LookVector * State.FollowDistance position += Vector3.new( 0, State.FollowHeight, 0 ) elseif State.FollowPosition == "Above" then position = targetRoot.Position + Vector3.new( 0, State.FollowDistance + State.FollowHeight, 0 ) else position = targetRoot.Position - Vector3.new( 0, State.FollowDistance, 0 ) end root.CFrame = CFrame.new( position, targetRoot.Position ) end) --========================================================-- -- NOCLIP --========================================================-- local OriginalCollision = {} local function ApplyNoclip() local character = Character() if not character then return end for _,part in ipairs( character:GetDescendants() ) do if part:IsA("BasePart") then if OriginalCollision[part] == nil then OriginalCollision[part] = part.CanCollide end part.CanCollide = false end end end function RestoreCollision() for part,collision in pairs( OriginalCollision ) do if part and part.Parent then part.CanCollide = collision end end table.clear( OriginalCollision ) end RunService.Stepped:Connect(function() if State.Noclip then ApplyNoclip() else RestoreCollision() end end) --========================================================-- -- FLY --========================================================-- local FlyConnection local FlyVelocity local FlyGyro local OldAutoRotate = true function StopFly() if FlyConnection then FlyConnection:Disconnect() FlyConnection = nil end if FlyVelocity then FlyVelocity:Destroy() FlyVelocity = nil end if FlyGyro then FlyGyro:Destroy() FlyGyro = nil end local h = Humanoid() if h then h.AutoRotate = OldAutoRotate end local root = Root() if root then root.AssemblyLinearVelocity = Vector3.zero end end function StartFly() StopFly() local root = Root() local h = Humanoid() if not root or not h then return end OldAutoRotate = h.AutoRotate h.AutoRotate = false FlyVelocity = Instance.new( "BodyVelocity" ) FlyVelocity.Name = "XF_FlyVelocity" FlyVelocity.MaxForce = Vector3.new( math.huge, math.huge, math.huge ) FlyVelocity.Velocity = Vector3.zero FlyVelocity.Parent = root FlyGyro = Instance.new( "BodyGyro" ) FlyGyro.Name = "XF_FlyGyro" FlyGyro.MaxTorque = Vector3.new( math.huge, math.huge, math.huge ) FlyGyro.P = 9000 FlyGyro.D = 500 FlyGyro.CFrame = root.CFrame FlyGyro.Parent = root FlyConnection = RunService.RenderStepped:Connect( function() if not State.Fly then return end if not root.Parent then StopFly() return end local camera = workspace.CurrentCamera if not camera then return end 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 FlyVelocity.Velocity = direction * State.FlySpeed FlyGyro.CFrame = CFrame.lookAt( root.Position, root.Position + camera.CFrame.LookVector ) end ) end --========================================================-- -- TOUCH FLING --========================================================-- local TouchFlingRemote = ReplicatedStorage:FindFirstChild( "XF_TouchFling" ) local TouchConnections = {} local function StopTouchFling() for _,connection in ipairs( TouchConnections ) do if connection then connection:Disconnect() end end table.clear( TouchConnections ) end local function StartTouchFling() StopTouchFling() if not TouchFlingRemote then return end local character = Character() if not character then return end for _,part in ipairs( character:GetDescendants() ) do if part:IsA("BasePart") then local connection = part.Touched:Connect( function(hit) if not State.TouchFling then return end if not hit then return end local otherCharacter = hit:FindFirstAncestorOfClass( "Model" ) if not otherCharacter then return end local otherPlayer = Players:GetPlayerFromCharacter( otherCharacter ) if not otherPlayer then return end if otherPlayer == LocalPlayer then return end TouchFlingRemote:FireServer( otherPlayer, State.FlingPower ) end ) table.insert( TouchConnections, connection ) end end end --========================================================-- -- CAMERA FOV PROTECTION --========================================================-- RunService.RenderStepped:Connect(function() if not Main.Parent then return end local camera = workspace.CurrentCamera if camera then camera.FieldOfView = State.FOV end if FOVCircle then FOVCircle.Visible = State.FOVCircle FOVCircle.Position = UDim2.fromScale( .5, .5 ) end end) --========================================================-- -- RESPAWN --========================================================-- LocalPlayer.CharacterAdded:Connect( function() task.wait(1) StopFly() StopTouchFling() local h = Humanoid() if h then if State.WalkSpeedEnabled then h.WalkSpeed = State.WalkSpeed end if State.JumpPowerEnabled then h.UseJumpPower = true h.JumpPower = State.JumpPower end h.HipHeight = State.HipHeight end CaptureAnimations() if State.ReapplyAnimations then task.wait(.3) ApplyAnimationPack( State.AnimationPack ) end if State.Noclip then ApplyNoclip() end if State.Fly then task.wait(.2) StartFly() end if State.TouchFling then task.wait(.2) StartTouchFling() end if State.SavedCFrame then task.wait(.2) local root = Root() if root then root.CFrame = State.SavedCFrame end end RefreshMM2ESP() end ) --========================================================-- -- RIGHT SHIFT --========================================================-- UserInputService.InputBegan:Connect( function(input,processed) if processed then return end if input.KeyCode == Enum.KeyCode.RightShift then State.UIVisible = not State.UIVisible Main.Visible = State.UIVisible end end ) --========================================================-- -- MINIMIZE --========================================================-- local NormalSize = UDim2.fromOffset( 1000, 650 ) Minimize.MouseButton1Click:Connect( function() State.Minimized = not State.Minimized if State.Minimized then Tween( Main, .3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, { Size = UDim2.fromOffset( 1000, 70 ) } ) Sidebar.Visible = false Content.Visible = false else Tween( Main, .35, Enum.EasingStyle.Back, Enum.EasingDirection.Out, { Size = NormalSize } ) task.wait(.15) Sidebar.Visible = true Content.Visible = true end end ) --========================================================-- -- CLOSE --========================================================-- Close.MouseButton1Click:Connect( function() RadioSound:Stop() RadioSound:Destroy() ClearMM2ESP() local closeTween = Tween( MainScale, .35, Enum.EasingStyle.Back, Enum.EasingDirection.In, { Scale = 0 } ) closeTween.Completed:Connect( function() if ScreenGui then ScreenGui:Destroy() end end ) end ) --========================================================-- -- INITIAL ANIMATION CAPTURE --========================================================-- task.spawn(function() task.wait(1) CaptureAnimations() end) print("===================================") print(" XF HUB V4.1") print(" DEVELOPED BY HAZE") print("===================================")