Advertisement
Isaachey

Public bathroom-script+lag

Feb 13th, 2024
1,543
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.95 KB | None | 0 0
  1. -- Função para criar a GUI
  2. local function createMenu()
  3. local ScreenGui = Instance.new("ScreenGui")
  4. ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
  5.  
  6. local Frame = Instance.new("Frame")
  7. Frame.Parent = ScreenGui
  8. Frame.Size = UDim2.new(0, 200, 0, 150)
  9. Frame.Position = UDim2.new(0.5, -100, 0.5, -75)
  10. Frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50) -- Alterado para cinza escuro
  11. Frame.BorderSizePixel = 0
  12. Frame.Visible = true
  13. Frame.ClipsDescendants = true
  14. Frame.AnchorPoint = Vector2.new(0.5, 0.5)
  15. Frame.Position = UDim2.new(0.5, 0, 0.5, 0)
  16. Frame.Size = UDim2.new(0, 200, 0, 150)
  17. Frame.ZIndex = 2
  18. Frame.Style = Enum.FrameStyle.RobloxRound
  19.  
  20. local NumCopiesLabel = Instance.new("TextLabel")
  21. NumCopiesLabel.Parent = Frame
  22. NumCopiesLabel.Size = UDim2.new(0.5, 0, 0.2, 0)
  23. NumCopiesLabel.Position = UDim2.new(0, 0, 0.3, 0)
  24. NumCopiesLabel.Text = "Número de Cópias:"
  25. NumCopiesLabel.TextSize = 8
  26. NumCopiesLabel.TextColor3 = Color3.fromRGB(255, 255, 0)
  27. NumCopiesLabel.BackgroundTransparency = 1
  28.  
  29. local NumCopiesTextBox = Instance.new("TextBox")
  30. NumCopiesTextBox.Parent = Frame
  31. NumCopiesTextBox.Size = UDim2.new(0.3, 0, 0.2, 0)
  32. NumCopiesTextBox.Position = UDim2.new(0.6, 0, 0.3, 0)
  33. NumCopiesTextBox.Text = "3"
  34. NumCopiesTextBox.TextSize = 14
  35.  
  36. local ActivateButton = Instance.new("TextButton")
  37. ActivateButton.Parent = Frame
  38. ActivateButton.Size = UDim2.new(0.5, 0, 0.2, 0)
  39. ActivateButton.Position = UDim2.new(0.25, 0, 0.7, 0)
  40. ActivateButton.Text = "Ativar"
  41. ActivateButton.TextSize = 14
  42. ActivateButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  43. ActivateButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100) -- Alterado para cinza mais claro
  44.  
  45. -- Botão para fechar a GUI
  46. local CloseButton = Instance.new("TextButton")
  47. CloseButton.Parent = Frame
  48. CloseButton.Size = UDim2.new(0.5, 0, 0.1, 0)
  49. CloseButton.Position = UDim2.new(0.25, 0, 0.9, 0)
  50. CloseButton.Text = "Fechar"
  51. CloseButton.TextSize = 14
  52. CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  53. CloseButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100) -- Alterado para cinza mais claro
  54.  
  55. -- Função para ativar o TpRoll com o número de cópias especificado
  56. ActivateButton.MouseButton1Click:Connect(function()
  57. local numberOfCopiesToActivate = tonumber(NumCopiesTextBox.Text)
  58. if numberOfCopiesToActivate then
  59. game.ReplicatedStorage.ToolEvents.TpRollEvent:FireServer()
  60.  
  61. repeat wait() until game.Players.LocalPlayer.Character
  62.  
  63. for i,v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
  64. if v.Name == "TpRoll" then
  65. v.Parent = game.Players.LocalPlayer.Character
  66. numberOfCopiesToActivate = numberOfCopiesToActivate - 1
  67. if numberOfCopiesToActivate <= 0 then
  68. break
  69. end
  70. end
  71. end
  72.  
  73. while true do
  74. wait()
  75. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  76. if v.Name == "TpRoll" then
  77. v:Activate()
  78. end
  79. end
  80. end
  81. else
  82. warn("Por favor, insira um número válido de cópias.")
  83. end
  84. end)
  85.  
  86. -- Função para fechar a GUI
  87. CloseButton.MouseButton1Click:Connect(function()
  88. ScreenGui:Destroy()
  89. end)
  90.  
  91. -- Texto acima do menu
  92. local Title = Instance.new("TextLabel")
  93. Title.Parent = Frame
  94. Title.Size = UDim2.new(1, 0, 0.2, 0)
  95. Title.Position = UDim2.new(0, 0, 0, 0)
  96. Title.Text = "Public Bathroom"
  97. Title.TextSize = 18
  98. Title.TextColor3 = Color3.fromRGB(173, 216, 230) -- Azul claro
  99. Title.BackgroundTransparency = 1
  100. end
  101.  
  102. -- Chamada da função para criar o menu
  103. createMenu()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement