-- Fixed Dodge Panel - Speed & Float now work perfectly -- Includes: Smooth drag, cool UI, particles, jump dodge local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local rootPart = character:WaitForChild("HumanoidRootPart") -- Settings local dodgeSpeed = 50 local floatPower = 0.5 local isDodging = false local dodgeOnJump = false local DODGE_KEY = Enum.KeyCode.Q -- GUI Elements local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "DodgePanelGUI" ScreenGui.Parent = game:GetService("CoreGui") ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling -- Main Frame local Frame = Instance.new("Frame") Frame.Name = "MainFrame" Frame.Parent = ScreenGui Frame.BackgroundColor3 = Color3.fromRGB(20, 20, 25) Frame.BackgroundTransparency = 0.15 Frame.BorderSizePixel = 0 Frame.Position = UDim2.new(0.5, -160, 0.5, -160) Frame.Size = UDim2.new(0, 320, 0, 310) Frame.ClipsDescendants = true -- Rounded corners local UICorner = Instance.new("UICorner") UICorner.CornerRadius = UDim.new(0, 12) UICorner.Parent = Frame -- Drop shadow local Shadow = Instance.new("ImageLabel") Shadow.Name = "Shadow" Shadow.Parent = Frame Shadow.BackgroundTransparency = 1 Shadow.Position = UDim2.new(0, -8, 0, -8) Shadow.Size = UDim2.new(1, 16, 1, 16) Shadow.Image = "rbxassetid://6014261993" Shadow.ImageColor3 = Color3.fromRGB(0, 0, 0) Shadow.ImageTransparency = 0.5 Shadow.ScaleType = Enum.ScaleType.Slice Shadow.SliceCenter = Rect.new(8, 8, 9, 9) Shadow.ZIndex = 0 -- Gradient background local Gradient = Instance.new("UIGradient") Gradient.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(30, 35, 40)), ColorSequenceKeypoint.new(1, Color3.fromRGB(15, 20, 25)) }) Gradient.Rotation = 45 Gradient.Parent = Frame -- Title Bar local TitleBar = Instance.new("Frame") TitleBar.Name = "TitleBar" TitleBar.Parent = Frame TitleBar.BackgroundColor3 = Color3.fromRGB(0, 200, 80) TitleBar.BackgroundTransparency = 0.3 TitleBar.BorderSizePixel = 0 TitleBar.Size = UDim2.new(1, 0, 0, 40) TitleBar.ZIndex = 2 local TitleBarGradient = Instance.new("UIGradient") TitleBarGradient.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 220, 100)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 150, 70)) }) TitleBarGradient.Parent = TitleBar local TitleCorner = Instance.new("UICorner") TitleCorner.CornerRadius = UDim.new(0, 12) TitleCorner.Parent = TitleBar local TitleText = Instance.new("TextLabel") TitleText.Parent = TitleBar TitleText.BackgroundTransparency = 1 TitleText.Size = UDim2.new(1, -30, 1, 0) TitleText.Font = Enum.Font.GothamBold TitleText.Text = "DODGE PANEL" TitleText.TextColor3 = Color3.fromRGB(255, 255, 255) TitleText.TextSize = 20 TitleText.TextStrokeTransparency = 0.5 TitleText.ZIndex = 3 -- Smooth Drag local dragging = false local dragStartPos = nil local frameStartPos = nil local dragTween = nil local function updateDrag(input) if not dragging or not dragStartPos or not frameStartPos then return end local delta = input.Position - dragStartPos local newPos = UDim2.new( frameStartPos.X.Scale, frameStartPos.X.Offset + delta.X, frameStartPos.Y.Scale, frameStartPos.Y.Offset + delta.Y ) if dragTween then dragTween:Cancel() end dragTween = TweenService:Create(Frame, TweenInfo.new(0.05, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = newPos}) dragTween:Play() end TitleBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStartPos = input.Position frameStartPos = Frame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false dragStartPos = nil frameStartPos = nil if dragTween then dragTween:Cancel() end end end) end end) UserInputService.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then updateDrag(input) end end) -- Close Button local CloseButton = Instance.new("TextButton") CloseButton.Name = "CloseButton" CloseButton.Parent = TitleBar CloseButton.BackgroundColor3 = Color3.fromRGB(255, 80, 80) CloseButton.BackgroundTransparency = 0.2 CloseButton.BorderSizePixel = 0 CloseButton.Position = UDim2.new(0.92, 0, 0.15, 0) CloseButton.Size = UDim2.new(0, 28, 0, 28) CloseButton.Font = Enum.Font.GothamBold CloseButton.Text = "✕" CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255) CloseButton.TextSize = 18 CloseButton.ZIndex = 3 Instance.new("UICorner", CloseButton).CornerRadius = UDim.new(0, 8) CloseButton.MouseButton1Click:Connect(function() ScreenGui:Destroy() end) -- Create Input Fields local SpeedInput = Instance.new("TextBox") SpeedInput.Name = "SpeedInput" SpeedInput.Parent = Frame SpeedInput.BackgroundColor3 = Color3.fromRGB(40, 45, 55) SpeedInput.BorderSizePixel = 0 SpeedInput.Position = UDim2.new(0.08, 0, 0.26, 0) SpeedInput.Size = UDim2.new(0.38, 0, 0, 34) SpeedInput.Font = Enum.Font.Gotham SpeedInput.PlaceholderText = "50" SpeedInput.Text = "50" SpeedInput.TextColor3 = Color3.fromRGB(255, 255, 255) SpeedInput.TextSize = 14 SpeedInput.ClearTextOnFocus = false SpeedInput.ZIndex = 2 Instance.new("UICorner", SpeedInput).CornerRadius = UDim.new(0, 6) Instance.new("UIGradient", SpeedInput).Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(50, 60, 70)), ColorSequenceKeypoint.new(1, Color3.fromRGB(30, 35, 45)) }) local SpeedLabel = Instance.new("TextLabel") SpeedLabel.Parent = Frame SpeedLabel.BackgroundTransparency = 1 SpeedLabel.Position = UDim2.new(0.08, 0, 0.18, 0) SpeedLabel.Size = UDim2.new(0.38, 0, 0, 20) SpeedLabel.Font = Enum.Font.GothamSemibold SpeedLabel.Text = "DODGE SPEED" SpeedLabel.TextColor3 = Color3.fromRGB(200, 255, 200) SpeedLabel.TextSize = 14 SpeedLabel.TextXAlignment = Enum.TextXAlignment.Left SpeedLabel.ZIndex = 2 local FloatInput = Instance.new("TextBox") FloatInput.Name = "FloatInput" FloatInput.Parent = Frame FloatInput.BackgroundColor3 = Color3.fromRGB(40, 45, 55) FloatInput.BorderSizePixel = 0 FloatInput.Position = UDim2.new(0.54, 0, 0.26, 0) FloatInput.Size = UDim2.new(0.38, 0, 0, 34) FloatInput.Font = Enum.Font.Gotham FloatInput.PlaceholderText = "0.5" FloatInput.Text = "0.5" FloatInput.TextColor3 = Color3.fromRGB(255, 255, 255) FloatInput.TextSize = 14 FloatInput.ClearTextOnFocus = false FloatInput.ZIndex = 2 Instance.new("UICorner", FloatInput).CornerRadius = UDim.new(0, 6) Instance.new("UIGradient", FloatInput).Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(50, 60, 70)), ColorSequenceKeypoint.new(1, Color3.fromRGB(30, 35, 45)) }) local FloatLabel = Instance.new("TextLabel") FloatLabel.Parent = Frame FloatLabel.BackgroundTransparency = 1 FloatLabel.Position = UDim2.new(0.54, 0, 0.18, 0) FloatLabel.Size = UDim2.new(0.38, 0, 0, 20) FloatLabel.Font = Enum.Font.GothamSemibold FloatLabel.Text = "FLOAT POWER" FloatLabel.TextColor3 = Color3.fromRGB(200, 255, 200) FloatLabel.TextSize = 14 FloatLabel.TextXAlignment = Enum.TextXAlignment.Left FloatLabel.ZIndex = 2 -- Jump Toggle local JumpToggle = Instance.new("TextButton") JumpToggle.Name = "JumpToggle" JumpToggle.Parent = Frame JumpToggle.BackgroundColor3 = Color3.fromRGB(180, 40, 40) JumpToggle.BorderSizePixel = 0 JumpToggle.Position = UDim2.new(0.1, 0, 0.45, 0) JumpToggle.Size = UDim2.new(0.8, 0, 0, 40) JumpToggle.Font = Enum.Font.GothamBold JumpToggle.Text = "DODGE ON JUMP: OFF" JumpToggle.TextColor3 = Color3.fromRGB(255, 255, 255) JumpToggle.TextSize = 16 JumpToggle.ZIndex = 2 Instance.new("UICorner", JumpToggle).CornerRadius = UDim.new(0, 8) local ToggleGradient = Instance.new("UIGradient", JumpToggle) JumpToggle.MouseButton1Click:Connect(function() dodgeOnJump = not dodgeOnJump if dodgeOnJump then JumpToggle.BackgroundColor3 = Color3.fromRGB(0, 180, 60) JumpToggle.Text = "DODGE ON JUMP: ON" ToggleGradient.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 220, 100)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 150, 70)) }) else JumpToggle.BackgroundColor3 = Color3.fromRGB(180, 40, 40) JumpToggle.Text = "DODGE ON JUMP: OFF" ToggleGradient.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(220, 80, 80)), ColorSequenceKeypoint.new(1, Color3.fromRGB(150, 40, 40)) }) end end) -- Dodge Button local DodgeButton = Instance.new("TextButton") DodgeButton.Name = "DodgeButton" DodgeButton.Parent = Frame DodgeButton.BackgroundColor3 = Color3.fromRGB(0, 180, 255) DodgeButton.BorderSizePixel = 0 DodgeButton.Position = UDim2.new(0.1, 0, 0.6, 0) DodgeButton.Size = UDim2.new(0.8, 0, 0, 44) DodgeButton.Font = Enum.Font.GothamBlack DodgeButton.Text = "DODGE NOW" DodgeButton.TextColor3 = Color3.fromRGB(255, 255, 255) DodgeButton.TextSize = 20 DodgeButton.ZIndex = 2 Instance.new("UICorner", DodgeButton).CornerRadius = UDim.new(0, 8) Instance.new("UIGradient", DodgeButton).Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 200, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 120, 200)) }) DodgeButton.MouseButton1Click:Connect(function() performDodge() end) -- Status label local StatusLabel = Instance.new("TextLabel") StatusLabel.Parent = Frame StatusLabel.BackgroundTransparency = 1 StatusLabel.Position = UDim2.new(0.05, 0, 0.8, 0) StatusLabel.Size = UDim2.new(0.9, 0, 0, 30) StatusLabel.Font = Enum.Font.Gotham StatusLabel.Text = "Press Q or tap button" StatusLabel.TextColor3 = Color3.fromRGB(160, 255, 160) StatusLabel.TextSize = 14 StatusLabel.ZIndex = 2 -- 🔧 FIX: Update variables directly whenever text changes SpeedInput:GetPropertyChangedSignal("Text"):Connect(function() local newSpeed = tonumber(SpeedInput.Text) if newSpeed then dodgeSpeed = newSpeed end end) FloatInput:GetPropertyChangedSignal("Text"):Connect(function() local newFloat = tonumber(FloatInput.Text) if newFloat then floatPower = newFloat end end) -- Also update when focus is lost (Enter pressed) SpeedInput.FocusLost:Connect(function(enterPressed) if enterPressed then local newSpeed = tonumber(SpeedInput.Text) if newSpeed then dodgeSpeed = newSpeed end end end) FloatInput.FocusLost:Connect(function(enterPressed) if enterPressed then local newFloat = tonumber(FloatInput.Text) if newFloat then floatPower = newFloat end end end) -- Particle effect local function createDodgeParticles() if not rootPart then return end local attachment = Instance.new("Attachment") attachment.Parent = rootPart attachment.Position = Vector3.new(0, -2, 0) local particleEmitter = Instance.new("ParticleEmitter") particleEmitter.Parent = attachment particleEmitter.Texture = "rbxassetid://315237157" particleEmitter.Rate = 0 particleEmitter.Lifetime = NumberRange.new(0.5, 1) particleEmitter.Speed = NumberRange.new(10, 20) particleEmitter.SpreadAngle = Vector2.new(360, 360) particleEmitter.VelocityInheritance = 0.5 particleEmitter.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 255, 100)), ColorSequenceKeypoint.new(0.5, Color3.fromRGB(100, 255, 200)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 150, 255)) }) particleEmitter.LightEmission = 0.8 particleEmitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.5), NumberSequenceKeypoint.new(1, 0)}) particleEmitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(1, 1)}) particleEmitter.ZOffset = 2 particleEmitter:Emit(30) task.delay(2, function() particleEmitter.Enabled = false attachment:Destroy() end) end -- Dodge function (uses live dodgeSpeed and floatPower) function performDodge() if isDodging then return end if not character or not rootPart or not humanoid then return end isDodging = true createDodgeParticles() local moveDirection = humanoid.MoveDirection if moveDirection.Magnitude < 0.1 then local camera = workspace.CurrentCamera if camera then moveDirection = camera.CFrame.LookVector * Vector3.new(1,0,1) moveDirection = moveDirection.Unit else moveDirection = rootPart.CFrame.LookVector end end local dodgeDistance = dodgeSpeed * 0.15 local horizontalOffset = moveDirection * dodgeDistance local verticalOffset = Vector3.new(0, floatPower, 0) local bodyVelocity = Instance.new("BodyVelocity") bodyVelocity.Velocity = horizontalOffset / 0.15 + Vector3.new(0, floatPower / 0.15, 0) bodyVelocity.MaxForce = Vector3.new(1e6, 1e6, 1e6) bodyVelocity.Parent = rootPart task.wait(0.15) bodyVelocity:Destroy() isDodging = false end -- Jump detection (fixed) local function setupJumpHook(char) local hum = char:WaitForChild("Humanoid") hum.Jumping:Connect(function() if dodgeOnJump then performDodge() end end) end player.CharacterAdded:Connect(function(newChar) character = newChar humanoid = newChar:WaitForChild("Humanoid") rootPart = newChar:WaitForChild("HumanoidRootPart") setupJumpHook(newChar) end) if character then setupJumpHook(character) end -- Keyboard dodge UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == DODGE_KEY then performDodge() end end) print("✅ Dodge Panel loaded! Speed & Float now work properly.")