Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local char = plr.Character
- local humrp = char:WaitForChild("HumanoidRootPart")
- local remote = game.ReplicatedStorage.Remotes.Stands.StandRemote
- local attributeRemote = game.ReplicatedStorage.Remotes.Misc.AttributeRemote
- local standRemote = game.ReplicatedStorage.Remotes.Stands.StandRemote
- local standAttributeRemote = game.ReplicatedStorage.Remotes.Stands.StandAttributeRemote
- local char = game.Players.LocalPlayer.Character
- local skillModule = require(game.ReplicatedStorage.Modules.SkillModule)
- local punchModule = require(game.ReplicatedStorage.Modules.PunchModule)
- local isTimeStopped = game.ReplicatedStorage.Remotes.Misc.IsTimeStopped
- local UserInputService = game:GetService("UserInputService")
- local RunService = game:GetService("RunService")
- local moves = {
- Q = { debounce = false, coooldown = 2 }, -- Summon
- E = { debounce = false, cooldown = 10, isHeld = false }, -- Barrage
- R = { debounce = false, cooldown = 10 }, -- Heavy Punch
- T = { debounce = false, cooldown = 40 }, -- Timestop
- Z = { debounce = false, cooldown = 5 }, --Projectile Throw
- X = { debounce = false, cooldown = 20 } -- Road Roller (MEME MOVE)
- }
- local isSummoned = false
- local isStunned = false
- local isAttacking = false
- local isLoopRan = false
- RunService.Heartbeat:Connect(function()
- if isTimeStopped:InvokeServer() then
- moves.Z.cooldown = 2
- else
- moves.Z.cooldown = 5
- end
- if char:GetAttribute("State") == "Stunned" or char.Humanoid.Health <= 0 then
- if not isSummoned then return end
- isSummoned = false
- attributeRemote:FireServer("StandSummoned", false)
- remote:FireServer("desummon")
- end
- if char:GetAttribute("Stand") == "Star Platinum" then
- plr.PlayerGui.MainGui.HotBar.Z.TextHolder.AbilityName.Text = "Bearing Throw"
- elseif char:GetAttribute("Stand") == "The World" then
- plr.PlayerGui.MainGui.HotBar.Z.TextHolder.AbilityName.Text = "Knife Throw"
- end
- -- MOVES
- if not isSummoned then return end
- local errorMsg, stand = pcall(function()
- return char:FindFirstChild("Stand", true).Parent
- end)
- if moves.E.isHeld then
- if moves.E.debounce then return end
- moves.E.debounce = true
- attributeRemote:FireServer("State", "Attacking")
- if stand:GetAttribute("StandState") ~= "Barraging" then
- standRemote:FireServer("move", "InFront")
- standAttributeRemote:FireServer("StandState", "Barraging")
- end
- local sfx = game.SoundService.Stands[char:GetAttribute("Stand")].Barrage:Clone()
- sfx.Parent = char
- sfx:Play()
- for i = 1, 16, 1 do
- if not moves.E.isHeld then break end
- if char:GetAttribute("State") == "Stunned" then break end
- punchModule.Punch(char, 7, true, "Barrage", nil, 5)
- task.wait(0.2)
- end
- skillModule.Use(plr.PlayerGui.MainGui.HotBar.E, moves.E.cooldown)
- task.delay(moves.E.cooldown, function()
- moves.E.debounce = false
- end)
- sfx:Stop()
- if char:GetAttribute("State") ~= "Stunned" then
- attributeRemote:FireServer("State", "Default")
- end
- if stand:GetAttribute("StandState") == "Barraging" then
- standRemote:FireServer("move", "Behind")
- standAttributeRemote:FireServer("StandState", "Idle")
- end
- else
- if char:FindFirstChild("Barrage") then
- char.Barrage:Stop()
- char.Barrage:Destroy()
- end
- end
- end)
- UserInputService.InputBegan:Connect(function(input, process)
- if process then return end
- if not char:GetAttribute("Stand") then return end
- if input.KeyCode == Enum.KeyCode.Q then
- if char:GetAttribute("State") ~= "Default" then return end
- if moves.Q.debounce then return end
- if isSummoned then
- if char:FindFirstChild("Stand", true).Parent:GetAttribute("StandState") ~= "Idle" then return end
- attributeRemote:FireServer("StandSummoned", false)
- remote:FireServer("desummon")
- isSummoned = false
- else
- if not char:FindFirstChild("Stand", true) then
- attributeRemote:FireServer("StandSummoned", true)
- remote:FireServer("summon")
- isSummoned = true
- else
- attributeRemote:FireServer("StandSummoned", true)
- print("Already has summoned stand!")
- isSummoned = true
- end
- end
- moves.Q.debounce = true
- skillModule.Use(plr.PlayerGui.MainGui.HotBar.Q, moves.Q.coooldown)
- task.wait(moves.Q.coooldown)
- moves.Q.debounce = false
- elseif input.KeyCode == Enum.KeyCode.E then
- moves.E.isHeld = true
- elseif input.KeyCode == Enum.KeyCode.X then
- if not isSummoned then return end
- if char:GetAttribute("State") ~= "Default" then return end
- if moves.X.debounce then return end
- moves.X.debounce = true
- task.delay(moves.X.cooldown, function()
- moves.X.debounce = false
- end)
- skillModule.Use(plr.PlayerGui.MainGui.HotBar.X, moves.X.cooldown)
- local sfx = game.SoundService.Stands["The World"].RoadRoller:Clone()
- sfx.Parent = plr
- sfx:Destroy()
- task.wait(1)
- standRemote:FireServer("road")
- elseif input.KeyCode == Enum.KeyCode.Z then
- if char:GetAttribute("State") ~= "Default" then return end
- if moves.Z.debounce then return end
- moves.Z.debounce = true
- task.delay(moves.Z.cooldown, function()
- moves.Z.debounce = false
- end)
- skillModule.Use(plr.PlayerGui.MainGui.HotBar.Z, moves.Z.cooldown)
- local sfx = game.SoundService.Stands[char:GetAttribute("Stand")].Projectile:Clone()
- sfx.Parent = char
- sfx:Destroy()
- local track = char.Humanoid:LoadAnimation(game.ReplicatedStorage.Animations.Stands.Throw)
- track:Play()
- standRemote:FireServer("projectile")
- elseif input.KeyCode == Enum.KeyCode.T then
- if not isSummoned then return end
- if char:GetAttribute("State") ~= "Default" then return end
- --if char:GetAttribute("Rage") < 50 then return end
- if moves.T.debounce then return end
- moves.T.debounce = true
- task.delay(moves.T.cooldown, function()
- moves.T.debounce = false
- end)
- skillModule.Use(plr.PlayerGui.MainGui.HotBar.T, moves.T.cooldown)
- local stopFx = game.SoundService.Stands[char:GetAttribute("Stand")].TimeStop:Clone()
- stopFx.Parent = char
- stopFx:Destroy()
- attributeRemote:FireServer("State", "BigMove")
- local track = char.Humanoid:LoadAnimation(game.ReplicatedStorage.Animations.Stands[char:GetAttribute("Stand")].TimeStop)
- track:Play()
- track:AdjustSpeed(1.5)
- local track2 = char:FindFirstChild("Stand", true).Parent.Humanoid:LoadAnimation(game.ReplicatedStorage.Animations.Stands["The World"].TimeStop)
- track2:Play()
- track2:AdjustSpeed(1.5)
- char:GetAttributeChangedSignal("State"):Connect(function()
- if char:GetAttribute("State") == "Stunned" then
- track:Stop()
- track2:Stop()
- return
- end
- end)
- task.wait(1.5)
- task.delay(8, function()
- local sfx = game.SoundService.Stands[char:GetAttribute("Stand")].TimeWillResume:Clone()
- sfx.Parent = char
- sfx:Destroy()
- end)
- attributeRemote:FireServer("State", "Default")
- standRemote:FireServer("timestop")
- elseif input.KeyCode == Enum.KeyCode.R then
- if moves.R.debounce then return end
- if not isSummoned then return end
- if char:GetAttribute("State") ~= "Default" then return end
- moves.R.debounce = true
- skillModule.Use(plr.PlayerGui.MainGui.HotBar.R, moves.R.cooldown)
- local hitFx = game.SoundService.Stands[char:GetAttribute("Stand")].Heavy:Clone()
- hitFx.Parent = char
- if char:GetAttribute("Stand") == "Star Platinum" then
- hitFx.TimePosition = 0.5
- end
- hitFx:Destroy()
- standRemote:FireServer("move", "InFront")
- standAttributeRemote:FireServer("StandState", "Attacking")
- local track = char:FindFirstChild("Stand", true).Parent.Humanoid:LoadAnimation(game.ReplicatedStorage.Animations.Combat.M1)
- track:Play()
- punchModule.Punch(char, 7, true, "StandHeavy", nil, 4)
- task.delay(1, function() -- delayed so that the stand doesn't instantly go back
- if char:FindFirstChild("Stand", true).Parent:GetAttribute("StandState") == "Barraging" then return end
- standRemote:FireServer("move", "Behind")
- standAttributeRemote:FireServer("StandState", "Idle")
- end)
- task.delay(moves.R.cooldown, function()
- moves.R.debounce = false
- end)
- end
- end)
- UserInputService.InputEnded:Connect(function(input)
- if input.KeyCode == Enum.KeyCode.E then
- moves.E.isHeld = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement