Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Persistent, Closable, Minimizable MoveGUI with Speed & Enable/Disable
- local player = game.Players.LocalPlayer
- local PlayerGui = player:FindFirstChild("PlayerGui") or player:WaitForChild("PlayerGui")
- -- Remove old GUI if exists
- if PlayerGui:FindFirstChild("MoveGUI") then
- PlayerGui.MoveGUI:Destroy()
- end
- -- Variables
- local walkSpeed = 16
- local enabled = true
- -- Create GUI
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "MoveGUI"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = PlayerGui
- -- Main Frame
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0, 220, 0, 150)
- frame.Position = UDim2.new(0, 20, 0, 50)
- frame.BackgroundColor3 = Color3.fromRGB(30,30,30)
- frame.BorderSizePixel = 0
- frame.Active = true
- frame.Draggable = true
- frame.Parent = screenGui
- -- Title
- local title = Instance.new("TextLabel")
- title.Size = UDim2.new(1,0,0,30)
- title.BackgroundTransparency = 1
- title.Text = "Walk Speed GUI"
- title.TextColor3 = Color3.fromRGB(255,255,255)
- title.Font = Enum.Font.SourceSansBold
- title.TextSize = 18
- title.Parent = frame
- -- Close Button
- local closeBtn = Instance.new("TextButton")
- closeBtn.Size = UDim2.new(0,30,0,30)
- closeBtn.Position = UDim2.new(1,-35,0,5)
- closeBtn.Text = "X"
- closeBtn.Font = Enum.Font.SourceSansBold
- closeBtn.TextSize = 18
- closeBtn.TextColor3 = Color3.fromRGB(255,255,255)
- closeBtn.BackgroundColor3 = Color3.fromRGB(80,80,80)
- closeBtn.Parent = frame
- closeBtn.MouseButton1Click:Connect(function()
- screenGui:Destroy()
- end)
- -- Minimized Circle
- local minimizedCircle = Instance.new("TextButton")
- minimizedCircle.Size = UDim2.new(0,50,0,50)
- minimizedCircle.Position = UDim2.new(0, 20,0,50)
- minimizedCircle.BackgroundColor3 = Color3.fromRGB(50,50,50)
- minimizedCircle.BorderSizePixel = 0
- minimizedCircle.TextColor3 = Color3.fromRGB(255,255,255)
- minimizedCircle.Text = "Speed"
- minimizedCircle.Visible = false
- minimizedCircle.Active = true
- minimizedCircle.Draggable = true
- minimizedCircle.Parent = screenGui
- -- Minimize Button
- local minimizeBtn = Instance.new("TextButton")
- minimizeBtn.Size = UDim2.new(0,30,0,30)
- minimizeBtn.Position = UDim2.new(1,-70,0,5)
- minimizeBtn.Text = "-"
- minimizeBtn.Font = Enum.Font.SourceSansBold
- minimizeBtn.TextSize = 18
- minimizeBtn.TextColor3 = Color3.fromRGB(255,255,255)
- minimizeBtn.BackgroundColor3 = Color3.fromRGB(80,80,80)
- minimizeBtn.Parent = frame
- minimizeBtn.MouseButton1Click:Connect(function()
- frame.Visible = false
- minimizedCircle.Visible = true
- end)
- minimizedCircle.MouseButton1Click:Connect(function()
- frame.Visible = true
- minimizedCircle.Visible = false
- end)
- -- Enable/Disable Button
- local toggleBtn = Instance.new("TextButton")
- toggleBtn.Size = UDim2.new(0, 200, 0, 30)
- toggleBtn.Position = UDim2.new(0,10,0,40)
- toggleBtn.Text = "Disable"
- toggleBtn.Font = Enum.Font.SourceSans
- toggleBtn.TextSize = 16
- toggleBtn.TextColor3 = Color3.fromRGB(255,255,255)
- toggleBtn.BackgroundColor3 = Color3.fromRGB(50,50,50)
- toggleBtn.Parent = frame
- toggleBtn.MouseButton1Click:Connect(function()
- enabled = not enabled
- local humanoid = player.Character and player.Character:FindFirstChild("Humanoid")
- if enabled then
- toggleBtn.Text = "Disable"
- if humanoid then humanoid.WalkSpeed = walkSpeed end
- else
- toggleBtn.Text = "Enable"
- if humanoid then humanoid.WalkSpeed = 16 end
- end
- end)
- -- Speed Input
- local speedLabel = Instance.new("TextLabel")
- speedLabel.Size = UDim2.new(1,0,0,20)
- speedLabel.Position = UDim2.new(0,10,0,80)
- speedLabel.Text = "Set Speed (1-10000):"
- speedLabel.TextColor3 = Color3.fromRGB(255,255,255)
- speedLabel.BackgroundTransparency = 1
- speedLabel.Font = Enum.Font.SourceSans
- speedLabel.TextSize = 14
- speedLabel.Parent = frame
- local speedBox = Instance.new("TextBox")
- speedBox.Size = UDim2.new(0, 200, 0, 25)
- speedBox.Position = UDim2.new(0,10,0,100)
- speedBox.Text = tostring(walkSpeed)
- speedBox.ClearTextOnFocus = true
- speedBox.TextColor3 = Color3.fromRGB(255,255,255)
- speedBox.BackgroundColor3 = Color3.fromRGB(50,50,50)
- speedBox.Parent = frame
- speedBox.FocusLost:Connect(function(enter)
- local val = tonumber(speedBox.Text)
- if val then
- if val < 1 then val = 1 end
- if val > 10000 then val = 10000 end
- walkSpeed = val
- if enabled then
- local humanoid = player.Character and player.Character:FindFirstChild("Humanoid")
- if humanoid then humanoid.WalkSpeed = walkSpeed end
- end
- speedBox.Text = tostring(walkSpeed)
- end
- end)
- -- Apply speed on respawn
- player.CharacterAdded:Connect(function(char)
- local humanoid = char:WaitForChild("Humanoid")
- if enabled then humanoid.WalkSpeed = walkSpeed end
- end)
Advertisement
Add Comment
Please, Sign In to add comment