Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local Num = Instance.new("TextBox")
- local Plus = Instance.new("TextButton")
- local Minus = Instance.new("TextButton")
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.ResetOnSpawn = false
- Frame.Size = UDim2.new(0, 200, 0, 100)
- Frame.Position = UDim2.new(0.5, -100, 0.5, -50)
- Frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- Frame.Parent = ScreenGui
- Frame.Active = true
- Frame.Draggable = true
- Num.Size = UDim2.new(0.6, 0, 0.6, 0)
- Num.Position = UDim2.new(0.2, 0, 0.3, 0)
- Num.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- Num.TextColor3 = Color3.new(1, 1, 1)
- Num.TextScaled = true
- Num.Font = Enum.Font.SourceSans
- Num.ClearTextOnFocus = true
- Num.Parent = Frame
- Plus.Size = UDim2.new(0.2, 0, 0.6, 0)
- Plus.Position = UDim2.new(0.8, 0, 0.3, 0)
- Plus.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
- Plus.TextColor3 = Color3.new(1, 1, 1)
- Plus.TextScaled = true
- Plus.Font = Enum.Font.SourceSans
- Plus.Text = "+"
- Plus.Parent = Frame
- Minus.Size = UDim2.new(0.2, 0, 0.6, 0)
- Minus.Position = UDim2.new(0, 0, 0.3, 0)
- Minus.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
- Minus.TextColor3 = Color3.new(1, 1, 1)
- Minus.TextScaled = true
- Minus.Font = Enum.Font.SourceSans
- Minus.Text = "-"
- Minus.Parent = Frame
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local number = humanoid.WalkSpeed
- local function UpdateNum()
- Num.Text = tostring(number)
- end
- Plus.MouseButton1Click:Connect(function()
- number = number + 1
- humanoid.WalkSpeed = number
- UpdateNum()
- end)
- Minus.MouseButton1Click:Connect(function()
- if number > 0 then
- number = number - 1
- humanoid.WalkSpeed = number
- UpdateNum()
- end
- end)
- Num.FocusLost:Connect(function(enterPressed)
- if enterPressed then
- local Value = tonumber(Num.Text)
- if Value and Value > 0 then
- number = Value
- humanoid.WalkSpeed = number
- UpdateNum()
- else
- UpdateNum()
- end
- end
- end)
- humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function()
- if humanoid.WalkSpeed ~= number then
- number = humanoid.WalkSpeed
- UpdateNum()
- end
- end)
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "WalkSpeed Gui",
- Text = "Made By the_king.78",
- Duration = 12
- })
- UpdateNum()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement