loadstring([[ local player = game.Players.LocalPlayer local userInputService = game:GetService("UserInputService") -- Create ScreenGui local screenGui = Instance.new("ScreenGui") local frame = Instance.new("Frame", screenGui) local textBox = Instance.new("TextBox", frame) local setSpeedButton = Instance.new("TextButton", frame) local toggleButton = Instance.new("TextButton", screenGui) screenGui.Parent = player.PlayerGui -- Configure Frame frame.Size = UDim2.new(0, 200, 0, 100) frame.Position = UDim2.new(0.5, -100, 0.5, -50) frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255) frame.Visible = true -- Start with the frame visible -- Configure TextBox textBox.Size = UDim2.new(1, 0, 0, 50) textBox.Position = UDim2.new(0, 0, 0, 0) textBox.PlaceholderText = "Enter WalkSpeed" textBox.TextColor3 = Color3.fromRGB(0, 0, 0) -- Configure Set Speed Button setSpeedButton.Size = UDim2.new(1, 0, 0, 50) setSpeedButton.Position = UDim2.new(0, 0, 0, 50) setSpeedButton.BackgroundColor3 = Color3.fromRGB(0, 170, 255) setSpeedButton.Text = "Set WalkSpeed" setSpeedButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Function to set WalkSpeed setSpeedButton.MouseButton1Click:Connect(function() local newSpeed = tonumber(textBox.Text) if newSpeed and newSpeed > 0 then local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:FindFirstChildOfClass("Humanoid") if humanoid then humanoid.WalkSpeed = newSpeed textBox.Text = "WalkSpeed set to " .. newSpeed end else textBox.Text = "Invalid Speed" wait(2) textBox.Text = "" end end) -- Configure Toggle Button toggleButton.Size = UDim2.new(0, 100, 0, 50) toggleButton.Position = UDim2.new(0.5, -50, 0, 20) -- Adjust the position as needed toggleButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) toggleButton.Text = "Toggle GUI" toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Toggle function toggleButton.MouseButton1Click:Connect(function() frame.Visible = not frame.Visible -- Toggle visibility end) -- Draggable Functionality for Toggle Button local dragging = false local dragInput local startPos local startMousePos local function updatePosition(input) local delta = input.Position - startMousePos toggleButton.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end toggleButton.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true startMousePos = input.Position startPos = toggleButton.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) userInputService.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then updatePosition(input) end end) -- Make sure to set the parent for all UI elements frame.Parent = screenGui textBox.Parent = frame setSpeedButton.Parent = frame toggleButton.Parent = screenGui ]])()