Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local rp = game:GetService("ReplicatedStorage")
- local Barrage = rp:WaitForChild("Stand1Remotes"):WaitForChild("BarrageHold")
- local TweenService = game:GetService("TweenService")
- local Debris = game:GetService("Debris")
- local Damage = 3
- local duration = 3
- local debounce = false
- function recall(Player, HumanoidRP, Stand, Folder)
- Folder:Destroy()
- local prevWeld = Stand:WaitForChild("HumanoidRootPart"):WaitForChild("Stand Weld")
- prevWeld:Destroy()
- Stand:WaitForChild("HumanoidRootPart").CFrame = HumanoidRP.CFrame * CFrame.new(2,0,2)
- local weld = Instance.new("ManualWeld")
- weld.Name = "Stand Weld"
- weld.Part0 = Stand:WaitForChild("HumanoidRootPart")
- weld.Part1 = HumanoidRP
- weld.C0 = Stand:WaitForChild("HumanoidRootPart").CFrame:inverse() * HumanoidRP.CFrame
- weld.Parent = weld.Part0
- local animControl = Stand:WaitForChild("AnimControl")
- for i, track in pairs(animControl:GetPlayingAnimationTracks()) do
- track:Stop()
- end
- local Idle = animControl:LoadAnimation(script:WaitForChild("Idle"))
- Idle:Play()
- end
- Barrage.OnServerEvent:Connect(function(Player,active)
- local Stand = workspace:FindFirstChild(Player.Name.." Stand"):FindFirstChild("Dummy")
- if Stand and active == false then
- debounce = true
- local Character = Player.Character
- local Humanoid = Character:WaitForChild("Humanoid")
- local HumanoidRP = Character:WaitForChild("HumanoidRootPart")
- Humanoid.WalkSpeed = 2
- Humanoid.JumpPower = 0
- local prevWeld = Stand:WaitForChild("HumanoidRootPart"):WaitForChild("Stand Weld")
- prevWeld:Destroy()
- Stand:WaitForChild("HumanoidRootPart").CFrame = HumanoidRP.CFrame * CFrame.new(0,0,-2.5)
- local weld = Instance.new("ManualWeld")
- weld.Name = "Stand Weld"
- weld.Part0 = Stand:WaitForChild("HumanoidRootPart")
- weld.Part1 = HumanoidRP
- weld.C0 = Stand:WaitForChild("HumanoidRootPart").CFrame:inverse() * HumanoidRP.CFrame
- weld.Parent = weld.Part0
- local animControl = Stand:WaitForChild("AnimControl")
- for i, track in pairs(animControl:GetPlayingAnimationTracks()) do
- track:Stop()
- end
- local Punching = animControl:LoadAnimation(script:WaitForChild("Punches"))
- Punching:Play()
- local Folder = Instance.new("Folder",workspace)
- Folder.Name = Player.Name.." Barrage"
- spawn(function()
- wait(duration)
- if debounce == true then
- debounce = false
- Humanoid.WalkSpeed = 16
- Humanoid.JumpPower = 50
- recall(Player, HumanoidRP, Stand, Folder)
- Barrage:FireClient(Player)
- end
- end)
- while wait() and debounce == true do
- local ray = Ray.new(Stand:WaitForChild("HumanoidRootPart").CFrame.p + Vector3.new(math.random(-2,2),math.random(-1,1),math.random(-2,2)),Stand:WaitForChild("HumanoidRootPart").CFrame.lookVector * 2)
- local hit, pos = workspace:FindPartOnRayWithIgnoreList(ray,{Character,Stand,Folder})
- if hit then
- local EHumanoid = hit.Parent:FindFirstChild("Humanoid")
- if EHumanoid and EHumanoid.Health > 0 and not EHumanoid:FindFirstChild("BarDeb") then
- local BarDeb = Instance.new("BoolValue",EHumanoid)
- BarDeb.Name = "BarDeb"
- Debris:AddItem(BarDeb,.1)
- EHumanoid:TakeDamage(Damage)
- local sound = Instance.new("Sound",Folder)
- sound.SoundId = "rbxassetid://2174934844"
- sound.Volume = 1
- sound:Play()
- Debris:AddItem(sound,.5)
- local wave = script:WaitForChild("Wave"):Clone()
- wave.Parent = Folder
- wave.CFrame = hit.CFrame
- wave.Orientation = wave.Orientation + Vector3.new(90,0,0)
- Debris:AddItem(wave,.25)
- local goal = {}
- goal.Size = wave.Size + Vector3.new(5,0,5)
- goal.Transparency = wave.Transparency + (1 - wave.Transparency)
- local info = TweenInfo.new(.25)
- local tween = TweenService:Create(wave,info,goal)
- tween:Play()
- end
- end
- end
- end
- end)
- Barrage.OnServerEvent:Connect(function(Player,active)
- local Stand = workspace:FindFirstChild(Player.Name.." Stand"):WaitForChild("Dummy")
- if Stand and active == true then
- if workspace:FindFirstChild(Player.Name.." Barrage") and debounce == true then
- debounce = false
- local Character = Player.Character
- local Humanoid = Character:WaitForChild("Humanoid")
- local HumanoidRP = Character:WaitForChild("HumanoidRootPart")
- Humanoid.WalkSpeed = 16
- Humanoid.JumpPower = 50
- local Folder = workspace:FindFirstChild(Player.Name.." Barrage")
- recall(Player, HumanoidRP, Stand, Folder)
- Barrage:FireClient(Player)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement