Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Função para criar a GUI
- local function createMenu()
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
- local Frame = Instance.new("Frame")
- Frame.Parent = ScreenGui
- Frame.Size = UDim2.new(0, 200, 0, 150)
- Frame.Position = UDim2.new(0.5, -100, 0.5, -75)
- Frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50) -- Alterado para cinza escuro
- Frame.BorderSizePixel = 0
- Frame.Visible = true
- Frame.ClipsDescendants = true
- Frame.AnchorPoint = Vector2.new(0.5, 0.5)
- Frame.Position = UDim2.new(0.5, 0, 0.5, 0)
- Frame.Size = UDim2.new(0, 200, 0, 150)
- Frame.ZIndex = 2
- Frame.Style = Enum.FrameStyle.RobloxRound
- local NumCopiesLabel = Instance.new("TextLabel")
- NumCopiesLabel.Parent = Frame
- NumCopiesLabel.Size = UDim2.new(0.5, 0, 0.2, 0)
- NumCopiesLabel.Position = UDim2.new(0, 0, 0.3, 0)
- NumCopiesLabel.Text = "Número de Cópias:"
- NumCopiesLabel.TextSize = 8
- NumCopiesLabel.TextColor3 = Color3.fromRGB(255, 255, 0)
- NumCopiesLabel.BackgroundTransparency = 1
- local NumCopiesTextBox = Instance.new("TextBox")
- NumCopiesTextBox.Parent = Frame
- NumCopiesTextBox.Size = UDim2.new(0.3, 0, 0.2, 0)
- NumCopiesTextBox.Position = UDim2.new(0.6, 0, 0.3, 0)
- NumCopiesTextBox.Text = "3"
- NumCopiesTextBox.TextSize = 14
- local ActivateButton = Instance.new("TextButton")
- ActivateButton.Parent = Frame
- ActivateButton.Size = UDim2.new(0.5, 0, 0.2, 0)
- ActivateButton.Position = UDim2.new(0.25, 0, 0.7, 0)
- ActivateButton.Text = "Ativar"
- ActivateButton.TextSize = 14
- ActivateButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- ActivateButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100) -- Alterado para cinza mais claro
- -- Botão para fechar a GUI
- local CloseButton = Instance.new("TextButton")
- CloseButton.Parent = Frame
- CloseButton.Size = UDim2.new(0.5, 0, 0.1, 0)
- CloseButton.Position = UDim2.new(0.25, 0, 0.9, 0)
- CloseButton.Text = "Fechar"
- CloseButton.TextSize = 14
- CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- CloseButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100) -- Alterado para cinza mais claro
- -- Função para ativar o TpRoll com o número de cópias especificado
- ActivateButton.MouseButton1Click:Connect(function()
- local numberOfCopiesToActivate = tonumber(NumCopiesTextBox.Text)
- if numberOfCopiesToActivate then
- game.ReplicatedStorage.ToolEvents.TpRollEvent:FireServer()
- repeat wait() until game.Players.LocalPlayer.Character
- for i,v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
- if v.Name == "TpRoll" then
- v.Parent = game.Players.LocalPlayer.Character
- numberOfCopiesToActivate = numberOfCopiesToActivate - 1
- if numberOfCopiesToActivate <= 0 then
- break
- end
- end
- end
- while true do
- wait()
- for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
- if v.Name == "TpRoll" then
- v:Activate()
- end
- end
- end
- else
- warn("Por favor, insira um número válido de cópias.")
- end
- end)
- -- Função para fechar a GUI
- CloseButton.MouseButton1Click:Connect(function()
- ScreenGui:Destroy()
- end)
- -- Texto acima do menu
- local Title = Instance.new("TextLabel")
- Title.Parent = Frame
- Title.Size = UDim2.new(1, 0, 0.2, 0)
- Title.Position = UDim2.new(0, 0, 0, 0)
- Title.Text = "Public Bathroom"
- Title.TextSize = 18
- Title.TextColor3 = Color3.fromRGB(173, 216, 230) -- Azul claro
- Title.BackgroundTransparency = 1
- end
- -- Chamada da função para criar o menu
- createMenu()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement