Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Cria a GUI
- local screenGui = Instance.new("ScreenGui")
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- -- Cria o frame principal
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0.3, 0, 0.3, 0)
- frame.Position = UDim2.new(0.35, 0, 0.35, 0)
- frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- frame.Active = true
- frame.Draggable = true
- frame.Parent = screenGui
- -- Cria o rótulo de crédito
- local creditLabel = Instance.new("TextLabel")
- creditLabel.Size = UDim2.new(1, 0, 0.1, 0)
- creditLabel.Position = UDim2.new(0, 0, 0, 0)
- creditLabel.Text = "by: mandy_dos_candys"
- creditLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
- creditLabel.BackgroundTransparency = 1
- creditLabel.TextSize = 12 -- Aumenta o tamanho da fonte
- creditLabel.Parent = frame
- -- Cria o TextBox para inserir a velocidade
- local textBox = Instance.new("TextBox")
- textBox.Size = UDim2.new(0.8, 0, 0.2, 0)
- textBox.Position = UDim2.new(0.1, 0, 0.3, 0)
- textBox.PlaceholderText = "Insira a nova velocidade"
- textBox.Text = ""
- textBox.Parent = frame
- -- Cria o botão para aplicar a velocidade
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0.8, 0, 0.2, 0)
- button.Position = UDim2.new(0.1, 0, 0.6, 0)
- button.Text = "Aplicar Velocidade"
- button.Parent = frame
- -- Função para atualizar a velocidade de caminhada
- local function atualizarVelocidade()
- local novaVelocidade = tonumber(textBox.Text)
- if novaVelocidade and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("Humanoid") then
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = novaVelocidade
- else
- -- Feedback básico para o jogador em caso de erro
- textBox.Text = "Valor inválido!"
- end
- end
- -- Conecta a função ao botão
- button.MouseButton1Click:Connect(atualizarVelocidade)
- -- Cria o botão de fechar
- local closeButton = Instance.new("TextButton")
- closeButton.Size = UDim2.new(0.1, 0, 0.1, 0)
- closeButton.Position = UDim2.new(0.9, -25, 0, 0)
- closeButton.Text = "x"
- closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- closeButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- closeButton.Parent = frame
- -- Função para fechar o frame
- local function fecharFrame()
- frame.Visible = false
- end
- -- Conecta a função ao botão de fechar
- closeButton.MouseButton1Click:Connect(fecharFrame)
Advertisement
Add Comment
Please, Sign In to add comment