--// MR.DEFT HUB --// Roblox Studio - LocalScript --// Put inside StarterPlayer > StarterPlayerScripts local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local Player = Players.LocalPlayer local Character, Humanoid, Root local function updateCharacter(char) Character = char Humanoid = char:WaitForChild("Humanoid") Root = char:WaitForChild("HumanoidRootPart") end if Player.Character then updateCharacter(Player.Character) end Player.CharacterAdded:Connect(function(char) updateCharacter(char) end) --// SETTINGS local WalkSpeed = 16 local FlySpeed = 55 local JumpPower = 50 local Flying = false local Vertical = 0 --// GUI local Gui = Instance.new("ScreenGui") Gui.Name = "MR_DEFT_Hub" Gui.ResetOnSpawn = false Gui.Parent = Player:WaitForChild("PlayerGui") --// Open Button local Open = Instance.new("TextButton") Open.Size = UDim2.new(0, 55, 0, 55) Open.Position = UDim2.new(0, 15, 0.5, -25) Open.BackgroundColor3 = Color3.fromRGB(20,20,20) Open.Text = "D" Open.TextColor3 = Color3.fromRGB(255,0,0) Open.TextSize = 25 Open.Font = Enum.Font.GothamBold Open.Parent = Gui local OpenCorner = Instance.new("UICorner") OpenCorner.CornerRadius = UDim.new(1,0) OpenCorner.Parent = Open --// Main local Main = Instance.new("Frame") Main.Size = UDim2.new(0, 300, 0, 360) Main.Position = UDim2.new(0.5, -150, 0.5, -180) Main.BackgroundColor3 = Color3.fromRGB(15,15,18) Main.BorderSizePixel = 0 Main.Parent = Gui local Corner = Instance.new("UICorner") Corner.CornerRadius = UDim.new(0,14) Corner.Parent = Main --// Title local Title = Instance.new("TextLabel") Title.Size = UDim2.new(1,0,0,55) Title.BackgroundTransparency = 1 Title.Text = "MR.DEFT HUB" Title.TextColor3 = Color3.fromRGB(255,40,40) Title.TextSize = 23 Title.Font = Enum.Font.GothamBold Title.Parent = Main --// Close local Close = Instance.new("TextButton") Close.Size = UDim2.new(0,40,0,40) Close.Position = UDim2.new(1,-45,0,8) Close.BackgroundColor3 = Color3.fromRGB(35,35,40) Close.Text = "×" Close.TextColor3 = Color3.new(1,1,1) Close.TextSize = 25 Close.Font = Enum.Font.GothamBold Close.Parent = Main Instance.new("UICorner", Close).CornerRadius = UDim.new(0,10) --// Container local Container = Instance.new("Frame") Container.Size = UDim2.new(1,-20,1,-70) Container.Position = UDim2.new(0,10,0,60) Container.BackgroundTransparency = 1 Container.Parent = Main local Layout = Instance.new("UIListLayout") Layout.Padding = UDim.new(0,8) Layout.HorizontalAlignment = Enum.HorizontalAlignment.Center Layout.Parent = Container --// Button creator local function Button(text) local B = Instance.new("TextButton") B.Size = UDim2.new(1,0,0,45) B.BackgroundColor3 = Color3.fromRGB(30,30,35) B.Text = text B.TextColor3 = Color3.new(1,1,1) B.TextSize = 16 B.Font = Enum.Font.GothamMedium B.AutoButtonColor = true B.Parent = Container local C = Instance.new("UICorner") C.CornerRadius = UDim.new(0,10) C.Parent = B return B end --// Fly local FlyButton = Button("✈ FLY : OFF") local function SetFly(state) Flying = state if Flying then FlyButton.Text = "✈ FLY : ON" FlyButton.TextColor3 = Color3.fromRGB(0,255,150) else FlyButton.Text = "✈ FLY : OFF" FlyButton.TextColor3 = Color3.new(1,1,1) Vertical = 0 end end FlyButton.MouseButton1Click:Connect(function() SetFly(not Flying) end) --// Speed local SpeedButton = Button("⚡ SPEED : 16") SpeedButton.MouseButton1Click:Connect(function() WalkSpeed += 4 if WalkSpeed > 40 then WalkSpeed = 16 end SpeedButton.Text = "⚡ SPEED : "..WalkSpeed if Humanoid then Humanoid.WalkSpeed = WalkSpeed end end) --// Jump local JumpButton = Button("⬆ JUMP : 50") JumpButton.MouseButton1Click:Connect(function() JumpPower += 10 if JumpPower > 100 then JumpPower = 50 end JumpButton.Text = "⬆ JUMP : "..JumpPower if Humanoid then Humanoid.JumpPower = JumpPower end end) --// UP local Up = Button("▲ FLY UP") Up.MouseButton1Down:Connect(function() Vertical = 1 end) Up.MouseButton1Up:Connect(function() Vertical = 0 end) --// DOWN local Down = Button("▼ FLY DOWN") Down.MouseButton1Down:Connect(function() Vertical = -1 end) Down.MouseButton1Up:Connect(function() Vertical = 0 end) --// Reset local Reset = Button("↻ RESET") Reset.MouseButton1Click:Connect(function() SetFly(false) WalkSpeed = 16 JumpPower = 50 if Humanoid then Humanoid.WalkSpeed = 16 Humanoid.JumpPower = 50 end SpeedButton.Text = "⚡ SPEED : 16" JumpButton.Text = "⬆ JUMP : 50" end) --// Fly movement logic RunService.RenderStepped:Connect(function() if not Flying or not Root or not Humanoid then return end local Move = Humanoid.MoveDirection local UpVector = Vector3.new(0, Vertical, 0) local Direction = Move + UpVector if Direction.Magnitude > 0 then Root.AssemblyLinearVelocity = Direction.Unit * FlySpeed else Root.AssemblyLinearVelocity = Vector3.zero end end) --// Open / Close Open.MouseButton1Click:Connect(function() Main.Visible = not Main.Visible end) Close.MouseButton1Click:Connect(function() Main.Visible = false end) --// Drag system local Dragging = false local DragStart, StartPosition Title.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 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) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then Dragging = false end end) print("MR.DEFT HUB Loaded Successfully!")