Advertisement
Ultimate_69

Stand Inputs

Feb 6th, 2025
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.15 KB | None | 0 0
  1. local plr = game.Players.LocalPlayer
  2. local char = plr.Character
  3. local humrp = char:WaitForChild("HumanoidRootPart")
  4. local remote = game.ReplicatedStorage.Remotes.Stands.StandRemote
  5. local attributeRemote = game.ReplicatedStorage.Remotes.Misc.AttributeRemote
  6. local standRemote = game.ReplicatedStorage.Remotes.Stands.StandRemote
  7. local standAttributeRemote = game.ReplicatedStorage.Remotes.Stands.StandAttributeRemote
  8. local char = game.Players.LocalPlayer.Character
  9. local skillModule = require(game.ReplicatedStorage.Modules.SkillModule)
  10. local punchModule = require(game.ReplicatedStorage.Modules.PunchModule)
  11. local isTimeStopped = game.ReplicatedStorage.Remotes.Misc.IsTimeStopped
  12.  
  13. local UserInputService = game:GetService("UserInputService")
  14. local RunService = game:GetService("RunService")
  15.  
  16. local moves = {
  17. Q = { debounce = false, coooldown = 2 }, -- Summon
  18. E = { debounce = false, cooldown = 10, isHeld = false }, -- Barrage
  19. R = { debounce = false, cooldown = 10 }, -- Heavy Punch
  20. T = { debounce = false, cooldown = 40 }, -- Timestop
  21. Z = { debounce = false, cooldown = 5 }, --Projectile Throw
  22. X = { debounce = false, cooldown = 20 } -- Road Roller (MEME MOVE)
  23. }
  24.  
  25. local isSummoned = false
  26. local isStunned = false
  27. local isAttacking = false
  28. local isLoopRan = false
  29.  
  30. RunService.Heartbeat:Connect(function()
  31. if isTimeStopped:InvokeServer() then
  32. moves.Z.cooldown = 2
  33. else
  34. moves.Z.cooldown = 5
  35. end
  36.  
  37. if char:GetAttribute("State") == "Stunned" or char.Humanoid.Health <= 0 then
  38. if not isSummoned then return end
  39. isSummoned = false
  40. attributeRemote:FireServer("StandSummoned", false)
  41. remote:FireServer("desummon")
  42. end
  43.  
  44. if char:GetAttribute("Stand") == "Star Platinum" then
  45. plr.PlayerGui.MainGui.HotBar.Z.TextHolder.AbilityName.Text = "Bearing Throw"
  46. elseif char:GetAttribute("Stand") == "The World" then
  47. plr.PlayerGui.MainGui.HotBar.Z.TextHolder.AbilityName.Text = "Knife Throw"
  48. end
  49.  
  50. -- MOVES
  51. if not isSummoned then return end
  52.  
  53. local errorMsg, stand = pcall(function()
  54. return char:FindFirstChild("Stand", true).Parent
  55. end)
  56.  
  57. if moves.E.isHeld then
  58. if moves.E.debounce then return end
  59. moves.E.debounce = true
  60. attributeRemote:FireServer("State", "Attacking")
  61.  
  62. if stand:GetAttribute("StandState") ~= "Barraging" then
  63. standRemote:FireServer("move", "InFront")
  64. standAttributeRemote:FireServer("StandState", "Barraging")
  65. end
  66. local sfx = game.SoundService.Stands[char:GetAttribute("Stand")].Barrage:Clone()
  67. sfx.Parent = char
  68. sfx:Play()
  69.  
  70. for i = 1, 16, 1 do
  71. if not moves.E.isHeld then break end
  72. if char:GetAttribute("State") == "Stunned" then break end
  73. punchModule.Punch(char, 7, true, "Barrage", nil, 5)
  74. task.wait(0.2)
  75. end
  76.  
  77. skillModule.Use(plr.PlayerGui.MainGui.HotBar.E, moves.E.cooldown)
  78. task.delay(moves.E.cooldown, function()
  79. moves.E.debounce = false
  80. end)
  81.  
  82. sfx:Stop()
  83.  
  84. if char:GetAttribute("State") ~= "Stunned" then
  85. attributeRemote:FireServer("State", "Default")
  86. end
  87.  
  88. if stand:GetAttribute("StandState") == "Barraging" then
  89. standRemote:FireServer("move", "Behind")
  90. standAttributeRemote:FireServer("StandState", "Idle")
  91. end
  92.  
  93. else
  94. if char:FindFirstChild("Barrage") then
  95. char.Barrage:Stop()
  96. char.Barrage:Destroy()
  97. end
  98. end
  99. end)
  100.  
  101. UserInputService.InputBegan:Connect(function(input, process)
  102. if process then return end
  103. if not char:GetAttribute("Stand") then return end
  104.  
  105. if input.KeyCode == Enum.KeyCode.Q then
  106. if char:GetAttribute("State") ~= "Default" then return end
  107. if moves.Q.debounce then return end
  108. if isSummoned then
  109. if char:FindFirstChild("Stand", true).Parent:GetAttribute("StandState") ~= "Idle" then return end
  110. attributeRemote:FireServer("StandSummoned", false)
  111. remote:FireServer("desummon")
  112. isSummoned = false
  113. else
  114. if not char:FindFirstChild("Stand", true) then
  115. attributeRemote:FireServer("StandSummoned", true)
  116. remote:FireServer("summon")
  117. isSummoned = true
  118. else
  119. attributeRemote:FireServer("StandSummoned", true)
  120. print("Already has summoned stand!")
  121. isSummoned = true
  122. end
  123. end
  124. moves.Q.debounce = true
  125. skillModule.Use(plr.PlayerGui.MainGui.HotBar.Q, moves.Q.coooldown)
  126. task.wait(moves.Q.coooldown)
  127. moves.Q.debounce = false
  128.  
  129. elseif input.KeyCode == Enum.KeyCode.E then
  130. moves.E.isHeld = true
  131. elseif input.KeyCode == Enum.KeyCode.X then
  132. if not isSummoned then return end
  133. if char:GetAttribute("State") ~= "Default" then return end
  134. if moves.X.debounce then return end
  135. moves.X.debounce = true
  136. task.delay(moves.X.cooldown, function()
  137. moves.X.debounce = false
  138. end)
  139. skillModule.Use(plr.PlayerGui.MainGui.HotBar.X, moves.X.cooldown)
  140.  
  141. local sfx = game.SoundService.Stands["The World"].RoadRoller:Clone()
  142. sfx.Parent = plr
  143. sfx:Destroy()
  144.  
  145. task.wait(1)
  146.  
  147. standRemote:FireServer("road")
  148.  
  149. elseif input.KeyCode == Enum.KeyCode.Z then
  150. if char:GetAttribute("State") ~= "Default" then return end
  151. if moves.Z.debounce then return end
  152. moves.Z.debounce = true
  153. task.delay(moves.Z.cooldown, function()
  154. moves.Z.debounce = false
  155. end)
  156. skillModule.Use(plr.PlayerGui.MainGui.HotBar.Z, moves.Z.cooldown)
  157.  
  158. local sfx = game.SoundService.Stands[char:GetAttribute("Stand")].Projectile:Clone()
  159. sfx.Parent = char
  160. sfx:Destroy()
  161.  
  162. local track = char.Humanoid:LoadAnimation(game.ReplicatedStorage.Animations.Stands.Throw)
  163. track:Play()
  164.  
  165. standRemote:FireServer("projectile")
  166.  
  167. elseif input.KeyCode == Enum.KeyCode.T then
  168. if not isSummoned then return end
  169. if char:GetAttribute("State") ~= "Default" then return end
  170. --if char:GetAttribute("Rage") < 50 then return end
  171. if moves.T.debounce then return end
  172. moves.T.debounce = true
  173. task.delay(moves.T.cooldown, function()
  174. moves.T.debounce = false
  175. end)
  176. skillModule.Use(plr.PlayerGui.MainGui.HotBar.T, moves.T.cooldown)
  177.  
  178. local stopFx = game.SoundService.Stands[char:GetAttribute("Stand")].TimeStop:Clone()
  179. stopFx.Parent = char
  180. stopFx:Destroy()
  181.  
  182. attributeRemote:FireServer("State", "BigMove")
  183.  
  184. local track = char.Humanoid:LoadAnimation(game.ReplicatedStorage.Animations.Stands[char:GetAttribute("Stand")].TimeStop)
  185. track:Play()
  186. track:AdjustSpeed(1.5)
  187.  
  188. local track2 = char:FindFirstChild("Stand", true).Parent.Humanoid:LoadAnimation(game.ReplicatedStorage.Animations.Stands["The World"].TimeStop)
  189. track2:Play()
  190. track2:AdjustSpeed(1.5)
  191.  
  192. char:GetAttributeChangedSignal("State"):Connect(function()
  193. if char:GetAttribute("State") == "Stunned" then
  194. track:Stop()
  195. track2:Stop()
  196. return
  197. end
  198. end)
  199.  
  200. task.wait(1.5)
  201.  
  202. task.delay(8, function()
  203. local sfx = game.SoundService.Stands[char:GetAttribute("Stand")].TimeWillResume:Clone()
  204. sfx.Parent = char
  205. sfx:Destroy()
  206. end)
  207.  
  208. attributeRemote:FireServer("State", "Default")
  209. standRemote:FireServer("timestop")
  210.  
  211. elseif input.KeyCode == Enum.KeyCode.R then
  212. if moves.R.debounce then return end
  213. if not isSummoned then return end
  214. if char:GetAttribute("State") ~= "Default" then return end
  215. moves.R.debounce = true
  216. skillModule.Use(plr.PlayerGui.MainGui.HotBar.R, moves.R.cooldown)
  217.  
  218. local hitFx = game.SoundService.Stands[char:GetAttribute("Stand")].Heavy:Clone()
  219. hitFx.Parent = char
  220. if char:GetAttribute("Stand") == "Star Platinum" then
  221. hitFx.TimePosition = 0.5
  222. end
  223. hitFx:Destroy()
  224.  
  225. standRemote:FireServer("move", "InFront")
  226. standAttributeRemote:FireServer("StandState", "Attacking")
  227. local track = char:FindFirstChild("Stand", true).Parent.Humanoid:LoadAnimation(game.ReplicatedStorage.Animations.Combat.M1)
  228. track:Play()
  229. punchModule.Punch(char, 7, true, "StandHeavy", nil, 4)
  230. task.delay(1, function() -- delayed so that the stand doesn't instantly go back
  231. if char:FindFirstChild("Stand", true).Parent:GetAttribute("StandState") == "Barraging" then return end
  232. standRemote:FireServer("move", "Behind")
  233. standAttributeRemote:FireServer("StandState", "Idle")
  234. end)
  235. task.delay(moves.R.cooldown, function()
  236. moves.R.debounce = false
  237. end)
  238. end
  239. end)
  240.  
  241. UserInputService.InputEnded:Connect(function(input)
  242. if input.KeyCode == Enum.KeyCode.E then
  243. moves.E.isHeld = false
  244. end
  245. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement