Ameno__GodOH

Tsb uppercut

Aug 27th, 2024
2,372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. -- Variável para controlar o cooldown by: (mandy_dos_candys)
  2. local isCooldown = false
  3. local cooldownTime = 1 -- Tempo de espera em segundos
  4.  
  5. -- Função que executa os scripts fornecidos
  6. local function executeScripts()
  7. -- Verifica se ainda está em cooldown
  8. if isCooldown then
  9. return
  10. end
  11.  
  12. -- Inicia o cooldown
  13. isCooldown = true
  14.  
  15. -- Executa o script de KeyPress (pressiona a barra de espaço)
  16. local keyPressArgs = {
  17. [1] = {
  18. ["Goal"] = "KeyPress",
  19. ["Key"] = Enum.KeyCode.Space
  20. }
  21. }
  22. game:GetService("Players").LocalPlayer.Character.Communicate:FireServer(unpack(keyPressArgs))
  23.  
  24. -- Executa o script de LeftClick (simula um clique esquerdo)
  25. local leftClickArgs = {
  26. [1] = {
  27. ["Mobile"] = true,
  28. ["Goal"] = "LeftClick"
  29. }
  30. }
  31. game:GetService("Players").LocalPlayer.Character.Communicate:FireServer(unpack(leftClickArgs))
  32.  
  33. -- Aguarda o tempo de execução
  34. task.wait(1)
  35.  
  36. -- Para a execução do script após 1 segundo
  37. isCooldown = false
  38. end
  39.  
  40. -- Função para criar o botão
  41. local function createButton()
  42. -- Remove o botão antigo se existir
  43. if game.Players.LocalPlayer.PlayerGui:FindFirstChild("UppercutButtonGui") then
  44. game.Players.LocalPlayer.PlayerGui.UppercutButtonGui:Destroy()
  45. end
  46.  
  47. -- Criação da interface do botão
  48. local ScreenGui = Instance.new("ScreenGui")
  49. local UICorner = Instance.new("UICorner")
  50. local TextButton = Instance.new("TextButton")
  51.  
  52. -- Configurações da interface
  53. ScreenGui.Name = "UppercutButtonGui"
  54. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  55.  
  56. TextButton.Parent = ScreenGui
  57. TextButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30) -- Cor cinza mais escura
  58. TextButton.BackgroundTransparency = 0.5 -- Transparência (0.5 = 50% transparente)
  59. TextButton.Position = UDim2.new(1, -185, 0, 10) -- Posição mais à esquerda
  60. TextButton.Size = UDim2.new(0, 75, 0, 75) -- Tamanho menor do botão
  61. TextButton.Text = "Uppercut" -- Texto no botão
  62. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Cor do texto
  63. TextButton.TextScaled = true -- Escala do texto
  64.  
  65. -- Torna o botão redondo
  66. UICorner.CornerRadius = UDim.new(1, 0)
  67. UICorner.Parent = TextButton
  68.  
  69. -- Função para executar os scripts ao clicar no botão
  70. TextButton.MouseButton1Click:Connect(function()
  71. executeScripts()
  72. end)
  73. end
  74.  
  75. -- Conecta a função createButton ao evento CharacterAdded
  76. game.Players.LocalPlayer.CharacterAdded:Connect(createButton)
  77.  
  78. -- Cria o botão pela primeira vez
  79. createButton()
Advertisement
Add Comment
Please, Sign In to add comment