Ameno__GodOH

Jjs uppercut itadori

Sep 3rd, 2024 (edited)
980
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.02 KB | None | 0 0
  1. -- time to suffer
  2.  
  3. -- Variável para controlar o cooldown
  4. local isCooldown = false
  5. local cooldownTime = 1 -- Tempo de espera em segundos
  6.  
  7. -- Variable to control movement mode
  8. local isMovable = false
  9.  
  10. -- Variable to store the position of the buttons (jesus save me)
  11. local savedPositionUppercut
  12. local savedPositionBlackFlash
  13. local savedPositionMoveButton
  14.  
  15. -- Function that performs Black Flash with Blue Flash first
  16. local function executeBlackFlash()
  17. game:GetService("ReplicatedStorage").Knit.Knit.Services.DivergentFistService.RE.Activated:FireServer("true") -- Blue Flash
  18. task.wait(0.32)
  19. game:GetService("ReplicatedStorage").Knit.Knit.Services.DivergentFistService.RE.Activated:FireServer("false") -- Black Flash
  20. end
  21.  
  22. -- Function that executes the "uppercut" command for any character
  23. local function executeUpForAllCharacters()
  24. if isCooldown then return end
  25.  
  26. isCooldown = true
  27.  
  28. local services = game:GetService("ReplicatedStorage").Knit.Knit.Services
  29.  
  30. for _, service in pairs(services:GetChildren()) do
  31. local reService = service:FindFirstChild("RE")
  32. if reService and reService:FindFirstChild("Activated") then
  33. local args = {"Up"}
  34. reService.Activated:FireServer(unpack(args))
  35. end
  36. end
  37.  
  38. task.wait(cooldownTime)
  39. isCooldown = false
  40. end
  41.  
  42. -- Function to create buttons
  43. local function createButtons()
  44. local playerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  45. local existingGui = playerGui:FindFirstChild("UppercutButtonGui")
  46.  
  47. if existingGui then
  48. existingGui:Destroy()
  49. end
  50.  
  51. local ScreenGui = Instance.new("ScreenGui")
  52. local UICorner = Instance.new("UICorner")
  53. local ImageButton = Instance.new("ImageButton")
  54. local MoveButton = Instance.new("TextButton")
  55. local BlackFlashButton = Instance.new("ImageButton")
  56. local OverlayImage = Instance.new("ImageLabel")
  57.  
  58. -- Interface settings
  59. ScreenGui.Name = "UppercutButtonGui"
  60. ScreenGui.Parent = playerGui
  61.  
  62. -- Configure the Move button
  63. MoveButton.Parent = ScreenGui
  64. MoveButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
  65. MoveButton.BackgroundTransparency = 0.5
  66. MoveButton.Position = savedPositionMoveButton or UDim2.new(1, -80, 0, 10) -- Posição inicial do botão Move
  67. MoveButton.Size = UDim2.new(0, 50, 0, 50)
  68. MoveButton.Text = "Move: Off"
  69. MoveButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  70. MoveButton.TextScaled = true
  71.  
  72. -- Configura o botão Black Flash
  73. BlackFlashButton.Parent = ScreenGui
  74. BlackFlashButton.BackgroundTransparency = 1
  75. BlackFlashButton.Position = savedPositionBlackFlash or UDim2.new(1, -150, 0, 10) -- Posição inicial à esquerda do botão Move
  76. BlackFlashButton.Size = UDim2.new(0, 70, 0, 70)
  77. BlackFlashButton.Image = "rbxassetid://6256840888"
  78. BlackFlashButton.ScaleType = Enum.ScaleType.Crop
  79. BlackFlashButton.AutoButtonColor = false
  80.  
  81. OverlayImage.Parent = BlackFlashButton
  82. OverlayImage.BackgroundTransparency = 1
  83. OverlayImage.Size = UDim2.new(0.6, 0, 0.6, 0)
  84. OverlayImage.Position = UDim2.new(0.2, 0, 0.2, 0)
  85. OverlayImage.Image = "rbxassetid://9918406832"
  86. OverlayImage.ImageColor3 = Color3.fromRGB(255, 0, 0)
  87.  
  88. UICorner.CornerRadius = UDim.new(1, 0)
  89. UICorner.Parent = BlackFlashButton
  90.  
  91. BlackFlashButton:GetPropertyChangedSignal("Position"):Connect(function()
  92. savedPositionBlackFlash = BlackFlashButton.Position
  93. end)
  94.  
  95. BlackFlashButton.MouseButton1Click:Connect(function()
  96. if isCooldown then return end
  97.  
  98. isCooldown = true
  99. executeBlackFlash()
  100. task.wait(cooldownTime)
  101. isCooldown = false
  102. end)
  103.  
  104. -- Configure the Uppercut button
  105. ImageButton.Parent = ScreenGui
  106. ImageButton.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  107. ImageButton.BackgroundTransparency = 1
  108. ImageButton.Position = savedPositionUppercut or UDim2.new(1, -220, 0, 10) -- Posição inicial à esquerda do botão Black Flash
  109. ImageButton.Size = UDim2.new(0, 70, 0, 70)
  110. ImageButton.Image = "rbxassetid://6256840888"
  111. ImageButton.ScaleType = Enum.ScaleType.Crop
  112. ImageButton.AutoButtonColor = false
  113.  
  114. -- Adiciona a nova textura
  115. local UppercutOverlay = Instance.new("ImageLabel")
  116. UppercutOverlay.Parent = ImageButton
  117. UppercutOverlay.BackgroundTransparency = 1
  118. UppercutOverlay.Size = UDim2.new(0.6, 0, 0.6, 0)
  119. UppercutOverlay.Position = UDim2.new(0.2, 0, 0.2, 0)
  120. UppercutOverlay.Image = "rbxassetid://18428026508"
  121. UppercutOverlay.ImageColor3 = Color3.fromRGB(255, 255, 255) -- Torna a textura branca
  122.  
  123. UICorner.CornerRadius = UDim.new(1, 0)
  124. UICorner.Parent = ImageButton
  125.  
  126. ImageButton:GetPropertyChangedSignal("Position"):Connect(function()
  127. savedPositionUppercut = ImageButton.Position
  128. end)
  129.  
  130. ImageButton.MouseButton1Click:Connect(function()
  131. executeUpForAllCharacters()
  132. end)
  133.  
  134. -- Function to switch movement mode
  135. MoveButton.MouseButton1Click:Connect(function()
  136. isMovable = not isMovable
  137. ImageButton.Draggable = isMovable
  138. BlackFlashButton.Draggable = isMovable
  139. MoveButton.Text = isMovable and "Move: On" or "Move: Off"
  140. end)
  141.  
  142. -- Updates the saved position of the move button
  143. MoveButton:GetPropertyChangedSignal("Position"):Connect(function()
  144. savedPositionMoveButton = MoveButton.Position
  145. end)
  146. end
  147.  
  148. -- I definitely don't know what this is for but I'm afraid to delete it
  149. local function checkForDivergentFist()
  150. local character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
  151. local movesetFolder = character:WaitForChild("Moveset")
  152.  
  153. if movesetFolder:FindFirstChild("Divergent Fist") then
  154. createButtons()
  155. end
  156. end
  157.  
  158. -- Conecta as funções ao evento CharacterAdded
  159. game.Players.LocalPlayer.CharacterAdded:Connect(function()
  160. -- Recreates the interface every time the player respawns
  161. createButtons()
  162. end)
  163.  
  164. -- Create the buttons
  165. createButtons()
Add Comment
Please, Sign In to add comment