
Key RequiredUniversal

local screenGui = Instance.new("ScreenGui")
screenGui.Name = "SpeedChangerGui"
local Player = game.Players.LocalPlayer
if not Player then return end
screenGui.Parent = Player:WaitForChild("PlayerGui")
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 100)
frame.Position = UDim2.new(0.5, -100, 0.5, -50)
frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
frame.BackgroundTransparency = 0
frame.BorderColor3 = Color3.fromRGB(255, 0, 0)
frame.BorderSizePixel = 2
frame.Parent = screenGui
local speedLabel = Instance.new("TextLabel")
speedLabel.Size = UDim2.new(0, 200, 0, 20)
speedLabel.Position = UDim2.new(0, 0, 0, 10)
speedLabel.BackgroundTransparency = 1
speedLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
speedLabel.Text = "Speed: 16"
speedLabel.Parent = frame
local increaseButton = Instance.new("TextButton")
increaseButton.Size = UDim2.new(0, 90, 0, 30)
increaseButton.Position = UDim2.new(0, 10, 0, 40)
increaseButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
increaseButton.BorderColor3 = Color3.fromRGB(255, 0, 0)
increaseButton.BorderSizePixel = 2
increaseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
increaseButton.Text = "Increase Speed"
increaseButton.Parent = frame
local decreaseButton = Instance.new("TextButton")
decreaseButton.Size = UDim2.new(0, 90, 0, 30)
decreaseButton.Position = UDim2.new(0, 100, 0, 40)
decreaseButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
decreaseButton.BorderColor3 = Color3.fromRGB(255, 0, 0)
decreaseButton.BorderSizePixel = 2
decreaseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
decreaseButton.Text = "Decrease Speed"
decreaseButton.Parent = frame
local function updateSpeed(speed)
local character = Player.Character
if character and character.Parent then
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.WalkSpeed = speed
speedLabel.Text = "Speed: " .. tostring(math.floor(speed))
end
end
end
increaseButton.MouseButton1Click:Connect(function()
local character = Player.Character
if character then
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.WalkSpeed = humanoid.WalkSpeed + 5
speedLabel.Text = "Speed: " .. tostring(math.floor(humanoid.WalkSpeed))
end
end
end)
decreaseButton.MouseButton1Click:Connect(function()
local character = Player.Character
if character then
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.WalkSpeed = math.max(humanoid.WalkSpeed - 5, 0)
speedLabel.Text = "Speed: " .. tostring(math.floor(humanoid.WalkSpeed))
end
end
end)
updateSpeed(16)
local dragging
local dragInput
local dragStart
local startPos
local function update(input)
local delta = input.Position - dragStart
frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
frame.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
dragStart = input.Position
startPos = frame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
frame.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
dragInput = input
end
end)
game:GetService("UserInputService").InputChanged:Connect(function(input)
if dragging and input == dragInput then
update(input)
end
end)No comments yet for this script.



