-- LocalScript for Solara -- This script has been updated to lock the walkspeed at the desired value. local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local StarterGui = game:GetService("StarterGui") local RunService = game:GetService("RunService") local player = Players.LocalPlayer -- Variables local inputGui = Instance.new("ScreenGui") local inputBox = Instance.new("TextBox") local inputFrame = Instance.new("Frame") local customWalkSpeed = nil local toggledOn = false local currentWalkSpeed = 16 local inputVisible = false -- Create UI for input inputGui.Parent = game.CoreGui inputFrame.Parent = inputGui inputFrame.Size = UDim2.new(0, 200, 0, 50) inputFrame.Position = UDim2.new(0.5, -100, 0.5, -25) inputFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) inputFrame.Visible = false inputBox.Parent = inputFrame inputBox.Size = UDim2.new(1, -10, 1, -10) inputBox.Position = UDim2.new(0, 5, 0, 5) inputBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50) inputBox.TextColor3 = Color3.new(1, 1, 1) inputBox.PlaceholderText = "Enter Walkspeed" inputBox.ClearTextOnFocus = true inputBox.TextScaled = true -- Notification function local function notify(text) StarterGui:SetCore("SendNotification", { Title = "Walkspeed", Text = text, Duration = 2 }) end -- Toggle input visibility local function toggleInput() inputVisible = not inputVisible inputFrame.Visible = inputVisible if inputVisible then inputBox:CaptureFocus() end end -- Handle Enter key inside TextBox inputBox.FocusLost:Connect(function(enterPressed) if enterPressed then local num = tonumber(inputBox.Text) if num and num > 0 then customWalkSpeed = num notify("Walkspeed Set: " .. num) else notify("Invalid number") end end inputFrame.Visible = false inputVisible = false end) -- This function runs every frame to ensure the walkspeed is locked RunService.Stepped:Connect(function() local humanoid = player.Character and player.Character:FindFirstChild("Humanoid") if not humanoid then return end if toggledOn and customWalkSpeed then -- This is the "lock" that prevents other scripts from changing the speed if humanoid.WalkSpeed ~= customWalkSpeed then humanoid.WalkSpeed = customWalkSpeed end end end) -- This function handles character and humanoid updates local function onCharacterAdded(newCharacter) -- Wait for the humanoid to exist in the new character local humanoid = newCharacter:WaitForChild("Humanoid") currentWalkSpeed = humanoid.WalkSpeed -- Update the WalkSpeed if the toggle is on if toggledOn then humanoid.WalkSpeed = customWalkSpeed end end -- Connect the function to the CharacterAdded event player.CharacterAdded:Connect(onCharacterAdded) -- Call the function for the first time if player.Character then onCharacterAdded(player.Character) end ---------------------------------------------------------------------------------------------------- -- Keybind detection (moved outside the onCharacterAdded function) UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end local humanoid = player.Character and player.Character:FindFirstChild("Humanoid") if not humanoid then return end if input.KeyCode == Enum.KeyCode.End then if not customWalkSpeed then -- First time: open input toggleInput() else -- Toggle ON/OFF toggledOn = not toggledOn if toggledOn then humanoid.WalkSpeed = customWalkSpeed notify("Toggle On") else humanoid.WalkSpeed = currentWalkSpeed notify("Toggle Off") end end elseif input.KeyCode == Enum.KeyCode.Delete then humanoid.WalkSpeed = 16 currentWalkSpeed = 16 customWalkSpeed = nil toggledOn = false notify("Walkspeed Reset to 16") end end)