-- 4nuj Mini Hub -- SERVICES local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local SoundService = game:GetService("SoundService") local TeleportService = game:GetService("TeleportService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local player = Players.LocalPlayer -- Character references local char local humanoid local hrp local function updateCharacterReferences() char = player.Character if char then humanoid = char:WaitForChild("Humanoid") hrp = char:WaitForChild("HumanoidRootPart") end end updateCharacterReferences() player.CharacterAdded:Connect(updateCharacterReferences) ------------------------------------------------- -- GUI ------------------------------------------------- local gui = Instance.new("ScreenGui", player.PlayerGui) gui.Name = "FlyHub" gui.ResetOnSpawn = false local frame = Instance.new("Frame", gui) frame.Size = UDim2.new(0,320,0,500) frame.Position = UDim2.new(0.35,0,0.3,0) frame.BorderSizePixel = 0 frame.BackgroundColor3 = Color3.fromRGB(25,0,0) Instance.new("UICorner", frame).CornerRadius = UDim.new(0,16) local gradient = Instance.new("UIGradient", frame) gradient.Color = ColorSequence.new{ ColorSequenceKeypoint.new(0, Color3.fromRGB(25,0,0)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0,0,0)) } gradient.Rotation = 45 -- Title local titleBar = Instance.new("Frame", frame) titleBar.Size = UDim2.new(1,-20,0,42) titleBar.Position = UDim2.new(0,10,0,10) titleBar.BackgroundColor3 = Color3.fromRGB(35,0,0) Instance.new("UICorner", titleBar) local title = Instance.new("TextLabel", titleBar) title.Size = UDim2.new(1,0,1,0) title.BackgroundTransparency = 1 title.Text = "4nuj mini hub" title.Font = Enum.Font.GothamBold title.TextSize = 22 title.TextColor3 = Color3.new(1,1,1) -- Minimize local minBtn = Instance.new("TextButton", titleBar) minBtn.Size = UDim2.new(0,30,0,30) minBtn.Position = UDim2.new(1,-35,0.5,-15) minBtn.Text = "—" minBtn.Font = Enum.Font.GothamBold minBtn.TextSize = 22 minBtn.BackgroundTransparency = 1 minBtn.TextColor3 = Color3.new(1,1,1) local mini = Instance.new("TextButton", gui) mini.Size = UDim2.new(0,72,0,72) mini.Visible = false mini.BackgroundColor3 = Color3.fromRGB(40,0,0) mini.Text = "OPEN" mini.Font = Enum.Font.GothamBold mini.TextSize = 20 mini.TextColor3 = Color3.new(1,1,1) mini.AutoButtonColor = false mini.ZIndex = 10 Instance.new("UICorner", mini).CornerRadius = UDim.new(1,0) -- Sounds local buttonSounds = { toggle = "rbxassetid://15666462", minimize = "rbxassetid://15666462", miniRestore = "rbxassetid://15666462", slider = "rbxassetid://12222216" } local function playSound(soundId) local sound = Instance.new("Sound", SoundService) sound.SoundId = soundId sound.Volume = 1 sound:Play() game.Debris:AddItem(sound,2) end -- Dragging local function draggable(ui) local dragging, startPos, startInput ui.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then dragging = true startInput = i.Position startPos = ui.Position end end) ui.InputEnded:Connect(function() dragging=false end) UserInputService.InputChanged:Connect(function(i) if dragging and (i.UserInputType==Enum.UserInputType.MouseMovement or i.UserInputType==Enum.UserInputType.Touch) then local delta = i.Position - startInput ui.Position = UDim2.new(startPos.X.Scale,startPos.X.Offset+delta.X,startPos.Y.Scale,startPos.Y.Offset+delta.Y) end end) end draggable(frame) draggable(mini) -- Minimize/Restore minBtn.MouseButton1Click:Connect(function() playSound(buttonSounds.minimize) mini.Position = frame.Position frame.Visible = false mini.Visible = true end) mini.MouseButton1Click:Connect(function() playSound(buttonSounds.miniRestore) frame.Position = mini.Position frame.Visible = true mini.Visible = false end) -- Button function local function button(text,pos,size,soundId,action) local b = Instance.new("TextButton", frame) b.Text = text b.Size = size b.Position = pos b.Font = Enum.Font.GothamBold b.TextSize = 18 b.TextColor3 = Color3.new(1,1,1) b.BackgroundColor3 = Color3.fromRGB(100,0,0) b.AutoButtonColor = false Instance.new("UICorner",b) if soundId then b.MouseButton1Click:Connect(function() playSound(soundId) if action then action() end end) elseif action then b.MouseButton1Click:Connect(action) end return b end -- Fly system local flying = false local upHeld, downHeld = false,false local bodyGyro, bodyVelocity local speed = 60 local minSpeed,maxSpeed = 20,150 local toggle = button("FLY : OFF", UDim2.new(0,10,0,65), UDim2.new(1,-20,0,50), buttonSounds.toggle) local up = button("UP", UDim2.new(0.05,0,0,125), UDim2.new(0.45,0,0,45)) local down = button("DOWN", UDim2.new(0.5,0,0,125), UDim2.new(0.45,0,0,45)) local resetCharBtn = button("RESET CHARACTER", UDim2.new(0,10,0,285), UDim2.new(1,-20,0,40), buttonSounds.toggle, function() if player.Character then player.Character:BreakJoints() end end) local worldBtn = button("4nuj WORLD", UDim2.new(0,10,0,330), UDim2.new(1,-20,0,40), buttonSounds.toggle, function() local placeId = PLACE_ID_HERE -- Replace with actual Roblox place ID TeleportService:Teleport(placeId, player) end) local musicPlaying = false local musicSound = Instance.new("Sound", SoundService) musicSound.SoundId = "rbxassetid://98337901681441" musicSound.Volume = 1 musicSound.Looped = true local musicBtn = button("MUSIC : OFF", UDim2.new(0,10,0,375), UDim2.new(1,-20,0,40), buttonSounds.toggle, function() if musicPlaying then musicSound:Stop() musicPlaying = false musicBtn.Text = "MUSIC : OFF" else musicSound:Play() musicPlaying = true musicBtn.Text = "MUSIC : ON" end end) -- Speed slider local speedLabel = Instance.new("TextLabel", frame) speedLabel.Size = UDim2.new(1,-20,0,20) speedLabel.Position = UDim2.new(0,10,0,185) speedLabel.BackgroundTransparency=1 speedLabel.Text="Fly Speed: 60" speedLabel.Font=Enum.Font.GothamBold speedLabel.TextColor3=Color3.new(1,1,1) local sliderBg = Instance.new("Frame", frame) sliderBg.Size=UDim2.new(1,-20,0,12) sliderBg.Position=UDim2.new(0,10,0,215) sliderBg.BackgroundColor3=Color3.fromRGB(50,0,0) Instance.new("UICorner", sliderBg) local sliderFill = Instance.new("Frame", sliderBg) sliderFill.Size=UDim2.new(0.35,0,1,0) sliderFill.BackgroundColor3=Color3.fromRGB(255,0,0) Instance.new("UICorner", sliderFill) local arrow=Instance.new("ImageLabel",sliderBg) arrow.Size=UDim2.new(0,14,0,20) arrow.AnchorPoint=Vector2.new(0.5,0.5) arrow.Position=UDim2.new(sliderFill.Size.X.Scale,0,0.5,0) arrow.BackgroundTransparency=1 arrow.Image="rbxassetid://70727212" arrow.ImageColor3=Color3.new(1,1,1) local draggingSlider=false local function updateSlider(x) local p=math.clamp((x-sliderBg.AbsolutePosition.X)/sliderBg.AbsoluteSize.X,0,1) sliderFill.Size=UDim2.new(p,0,1,0) arrow.Position=UDim2.new(p,0,0.5,0) speed=math.floor(minSpeed+(maxSpeed-minSpeed)*p) speedLabel.Text="Fly Speed: "..speed end sliderBg.InputBegan:Connect(function(i) if i.UserInputType==Enum.UserInputType.MouseButton1 or i.UserInputType==Enum.UserInputType.Touch then draggingSlider=true playSound(buttonSounds.slider) updateSlider(i.Position.X) end end) UserInputService.InputChanged:Connect(function(i) if draggingSlider then updateSlider(i.Position.X) end end) UserInputService.InputEnded:Connect(function() draggingSlider=false end) -- Fly logic local function startFly() if not hrp then return end bodyGyro = Instance.new("BodyGyro", hrp) bodyGyro.MaxTorque = Vector3.new(1e9,1e9,1e9) bodyGyro.P = 20000 bodyVelocity = Instance.new("BodyVelocity", hrp) bodyVelocity.MaxForce = Vector3.new(1e9,1e9,1e9) humanoid.PlatformStand = true end local function stopFly() if bodyGyro then bodyGyro:Destroy() end if bodyVelocity then bodyVelocity:Destroy() end if humanoid then humanoid.PlatformStand=false end end toggle.MouseButton1Click:Connect(function() playSound(buttonSounds.toggle) flying = not flying toggle.Text = flying and "FLY : ON" or "FLY : OFF" if flying then startFly() else stopFly() end end) up.MouseButton1Down:Connect(function() upHeld = true end) up.MouseButton1Up:Connect(function() upHeld = false end) down.MouseButton1Down:Connect(function() downHeld = true end) down.MouseButton1Up:Connect(function() downHeld = false end) RunService.RenderStepped:Connect(function() if flying and bodyVelocity and hrp and humanoid then local vertical = (upHeld and 1 or 0) - (downHeld and 1 or 0) local move = humanoid.MoveDirection bodyVelocity.Velocity = (move + Vector3.new(0,vertical,0)) * speed bodyGyro.CFrame = workspace.CurrentCamera.CFrame end end) -- RESET SCRIPT BUTTON local resetScriptBtn = button("RESET SCRIPT", UDim2.new(0,10,0,455), UDim2.new(1,-20,0,40), buttonSounds.toggle, function() playSound(buttonSounds.toggle) if gui then gui:Destroy() end local cloned = script:Clone() cloned.Parent = player:WaitForChild("PlayerGui") end) -- CHAT REPLY FEATURE (FIXED) local ChatEvents = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents") local SayMessageEvent = ChatEvents:WaitForChild("SayMessageRequest") local function listenToPlayerChat(plr) plr.Chatted:Connect(function(msg) if plr.Name == "Captain_Anuj94" and msg:lower() == "scripter" then SayMessageEvent:FireServer("Hi! 4nuj sir ✨","All") end end) end -- Existing players for _, plr in pairs(Players:GetPlayers()) do listenToPlayerChat(plr) end -- New players Players.PlayerAdded:Connect(listenToPlayerChat)