Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --//Local Scripts for Barrage
- local Player = game:GetService("Players").LocalPlayer
- local rp = game:GetService("ReplicatedStorage")
- local Barrage = rp:WaitForChild("BarragePress")
- local UIS = game:GetService("UserInputService")
- local debounce = false
- local cooldown = 3
- UIS.InputBegan:Connect(function(input,IsTyping)
- if IsTyping then
- return
- elseif input.KeyCode == Enum.KeyCode.F then
- if workspace:FindFirstChild(Player.Name.." Stand") then
- if debounce == false then
- debounce = true
- Barrage:FireServer()
- end
- end
- end
- end)
- Barrage.OnClientEvent:Connect(function()
- wait(cooldown)
- debounce = false
- end)
- -----------------------------------
- local Player = game:GetService("Players").LocalPlayer
- local rp = game:GetService("ReplicatedStorage")
- local Barrage = rp:WaitForChild("BarrageHold")
- local UIS = game:GetService("UserInputService")
- local debounce = false
- local active = false
- local cooldown = 3
- UIS.InputBegan:Connect(function(input,IsTyping)
- if IsTyping then
- return
- elseif input.KeyCode == Enum.KeyCode.F then
- if workspace:FindFirstChild(Player.Name.." Stand") then
- if debounce == false and active == false then
- debounce = true
- Barrage:FireServer(active)
- end
- end
- end
- end)
- UIS.InputEnded:Connect(function(input,IsTyping)
- if IsTyping then
- return
- elseif input.KeyCode == Enum.KeyCode.F then
- if workspace:FindFirstChild(Player.Name.." Stand") then
- if debounce == true and active == false then
- active = true
- Barrage:FireServer(active)
- end
- end
- end
- end)
- Barrage.OnClientEvent:Connect(function()
- wait(cooldown)
- active = false
- debounce = false
- end)
- --//Server scripts for Barrage
- local rp = game:GetService("ReplicatedStorage")
- local Barrage = rp:WaitForChild("BarragePress")
- local TweenService = game:GetService("TweenService")
- local Debris = game:GetService("Debris")
- local Damage = 1
- local debounce = false
- local length = 25
- function leftSide(Character,Stand,Folder,armPart)
- local posY = math.random(1.25,1.75)
- local rotX = math.random(-5,1)
- local Arm = script:WaitForChild("Arm"):Clone()
- Arm.CFrame = Stand:WaitForChild("HumanoidRootPart").CFrame * CFrame.new((math.random(-170,-150)/100),(math.random(50,150)/100),-.2)
- Arm.Orientation = Arm.Orientation + Vector3.new(rotX,-math.random(7,15),0)
- Arm.Color = armPart.Color
- Arm.Size = Vector3.new(1,1,1)
- Arm.Parent = Folder
- Debris:AddItem(Arm,.4)
- Arm.Touched:Connect(function(Hit)
- if Hit:IsA("Part") or Hit:IsA("MeshPart") then
- if Hit.Parent ~= Character and Hit.Parent ~= Stand then
- local EHumanoid = Hit.Parent:FindFirstChild("Humanoid")
- if EHumanoid and not EHumanoid:FindFirstChild("ArmPunch") then
- print("attacking")
- local ArmPunch = Instance.new("BoolValue",EHumanoid)
- ArmPunch.Name = "ArmPunch"
- Debris:AddItem(ArmPunch,.1)
- 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 = Arm.CFrame * CFrame.new(0,0,-1)
- 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()
- EHumanoid:TakeDamage(Damage)
- end
- end
- end
- end)
- local goal = {}
- goal.Size = Arm.Size + Vector3.new(0,0,3)
- goal.CFrame = Arm.CFrame * CFrame.new(0,0,-1.5)
- local info = TweenInfo.new(.1,Enum.EasingStyle.Linear)
- local tween = TweenService:Create(Arm,info,goal)
- tween:Play()
- spawn(function()
- wait(.1)
- local goal2 = {}
- goal2.Transparency = Arm.Transparency + (1 - Arm.Transparency)
- local info2 = TweenInfo.new(.1)
- local tween2 = TweenService:Create(Arm,info,goal2)
- tween2:Play()
- end)
- end
- function rightSide(Character,Stand,Folder,armPart)
- local posY = math.random(1.25,1.75)
- local rotX = math.random(-5,1)
- local Arm = script:WaitForChild("Arm"):Clone()
- Arm.CFrame = Stand:WaitForChild("HumanoidRootPart").CFrame * CFrame.new((math.random(150,170)/100),(math.random(50,150)/100),-.2)
- Arm.Orientation = Arm.Orientation + Vector3.new(rotX,math.random(7,15),0)
- Arm.Color = armPart.Color
- Arm.Size = Vector3.new(1,1,1)
- Arm.Parent = Folder
- Debris:AddItem(Arm,.4)
- Arm.Touched:Connect(function(Hit)
- if Hit:IsA("Part") or Hit:IsA("MeshPart") then
- if Hit.Parent ~= Character and Hit.Parent ~= Stand then
- local EHumanoid = Hit.Parent:FindFirstChild("Humanoid")
- if EHumanoid and not EHumanoid:FindFirstChild("ArmPunch") then
- print("attacking")
- local ArmPunch = Instance.new("BoolValue",EHumanoid)
- ArmPunch.Name = "ArmPunch"
- Debris:AddItem(ArmPunch,.1)
- 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 = Arm.CFrame * CFrame.new(0,0,-1)
- 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()
- EHumanoid:TakeDamage(Damage)
- end
- end
- end
- end)
- local goal = {}
- goal.Size = Arm.Size + Vector3.new(0,0,3)
- goal.CFrame = Arm.CFrame * CFrame.new(0,0,-1.5)
- local info = TweenInfo.new(.1,Enum.EasingStyle.Linear)
- local tween = TweenService:Create(Arm,info,goal)
- tween:Play()
- spawn(function()
- wait(.1)
- local goal2 = {}
- goal2.Transparency = Arm.Transparency + (1 - Arm.Transparency)
- local info2 = TweenInfo.new(.1)
- local tween2 = TweenService:Create(Arm,info,goal2)
- tween2:Play()
- end)
- end
- Barrage.OnServerEvent:Connect(function(Player)
- local Stand = workspace:FindFirstChild(Player.Name.." Stand"):WaitForChild("Dummy")
- if Stand 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,-.5,-1.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()
- for i,v in pairs(Stand:GetChildren()) do
- if v.Name == "LeftHand" or v.Name == "LeftUpperArm" or v.Name == "LeftLowerArm" then
- v.Transparency = 1
- elseif v.Name == "RightHand" or v.Name == "RightUpperArm" or v.Name == "RightLowerArm" then
- v.Transparency = 1
- end
- end
- end)
- local armPart = Stand:WaitForChild("LeftHand")
- for i=1, length do
- leftSide(Character,Stand,Folder,armPart)
- wait(.1)
- rightSide(Character,Stand,Folder,armPart)
- wait(.1)
- end
- Folder:Destroy()
- Humanoid.WalkSpeed = 16
- Humanoid.JumpPower = 50
- 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
- for i, track in pairs(animControl:GetPlayingAnimationTracks()) do
- track:Stop()
- end
- local Idle = animControl:LoadAnimation(script:WaitForChild("Idle"))
- Idle:Play()
- spawn(function()
- for i,v in pairs(Stand:GetChildren()) do
- if v.Name == "LeftHand" or v.Name == "LeftUpperArm" or v.Name == "LeftLowerArm" then
- v.Transparency = 0
- elseif v.Name == "RightHand" or v.Name == "RightUpperArm" or v.Name == "RightLowerArm" then
- v.Transparency = 0
- end
- end
- end)
- Barrage:FireClient(Player)
- end
- end)
- -----------------------------------
- local rp = game:GetService("ReplicatedStorage")
- local Barrage = rp:WaitForChild("BarrageHold")
- local TweenService = game:GetService("TweenService")
- local Debris = game:GetService("Debris")
- local Damage = 1
- local debounce = false
- function leftSide(Character,Stand,Folder,armPart)
- local posY = math.random(1.25,1.75)
- local rotX = math.random(-5,1)
- local Arm = script:WaitForChild("Arm"):Clone()
- Arm.CFrame = Stand:WaitForChild("HumanoidRootPart").CFrame * CFrame.new((math.random(-170,-150)/100),(math.random(50,150)/100),-.2)
- Arm.Orientation = Arm.Orientation + Vector3.new(rotX,-math.random(7,15),0)
- Arm.Color = armPart.Color
- Arm.Size = Vector3.new(1,1,1)
- Arm.Parent = Folder
- Debris:AddItem(Arm,.4)
- Arm.Touched:Connect(function(Hit)
- if Hit:IsA("Part") or Hit:IsA("MeshPart") then
- if Hit.Parent ~= Character and Hit.Parent ~= Stand then
- local EHumanoid = Hit.Parent:FindFirstChild("Humanoid")
- if EHumanoid and not EHumanoid:FindFirstChild("ArmPunch") then
- print("attacking")
- local ArmPunch = Instance.new("BoolValue",EHumanoid)
- ArmPunch.Name = "ArmPunch"
- Debris:AddItem(ArmPunch,.1)
- 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 = Arm.CFrame * CFrame.new(0,0,-1)
- 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()
- EHumanoid:TakeDamage(Damage)
- end
- end
- end
- end)
- local goal = {}
- goal.Size = Arm.Size + Vector3.new(0,0,3)
- goal.CFrame = Arm.CFrame * CFrame.new(0,0,-1.5)
- local info = TweenInfo.new(.1,Enum.EasingStyle.Linear)
- local tween = TweenService:Create(Arm,info,goal)
- tween:Play()
- spawn(function()
- wait(.1)
- local goal2 = {}
- goal2.Transparency = Arm.Transparency + (1 - Arm.Transparency)
- local info2 = TweenInfo.new(.1)
- local tween2 = TweenService:Create(Arm,info,goal2)
- tween2:Play()
- end)
- end
- function rightSide(Character,Stand,Folder,armPart)
- local posY = math.random(1.25,1.75)
- local rotX = math.random(-5,1)
- local Arm = script:WaitForChild("Arm"):Clone()
- Arm.CFrame = Stand:WaitForChild("HumanoidRootPart").CFrame * CFrame.new((math.random(150,170)/100),(math.random(50,150)/100),-.2)
- Arm.Orientation = Arm.Orientation + Vector3.new(rotX,math.random(7,15),0)
- Arm.Color = armPart.Color
- Arm.Size = Vector3.new(1,1,1)
- Arm.Parent = Folder
- Debris:AddItem(Arm,.4)
- Arm.Touched:Connect(function(Hit)
- if Hit:IsA("Part") or Hit:IsA("MeshPart") then
- if Hit.Parent ~= Character and Hit.Parent ~= Stand then
- local EHumanoid = Hit.Parent:FindFirstChild("Humanoid")
- if EHumanoid and not EHumanoid:FindFirstChild("ArmPunch") then
- print("attacking")
- local ArmPunch = Instance.new("BoolValue",EHumanoid)
- ArmPunch.Name = "ArmPunch"
- Debris:AddItem(ArmPunch,.1)
- 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 = Arm.CFrame * CFrame.new(0,0,-1)
- 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()
- EHumanoid:TakeDamage(Damage)
- end
- end
- end
- end)
- local goal = {}
- goal.Size = Arm.Size + Vector3.new(0,0,3)
- goal.CFrame = Arm.CFrame * CFrame.new(0,0,-1.5)
- local info = TweenInfo.new(.1,Enum.EasingStyle.Linear)
- local tween = TweenService:Create(Arm,info,goal)
- tween:Play()
- spawn(function()
- wait(.1)
- local goal2 = {}
- goal2.Transparency = Arm.Transparency + (1 - Arm.Transparency)
- local info2 = TweenInfo.new(.1)
- local tween2 = TweenService:Create(Arm,info,goal2)
- tween2:Play()
- end)
- end
- Barrage.OnServerEvent:Connect(function(Player,active)
- local Stand = workspace:FindFirstChild(Player.Name.." Stand"):WaitForChild("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,-.5,-1.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()
- for i,v in pairs(Stand:GetChildren()) do
- if v.Name == "LeftHand" or v.Name == "LeftUpperArm" or v.Name == "LeftLowerArm" then
- v.Transparency = 1
- elseif v.Name == "RightHand" or v.Name == "RightUpperArm" or v.Name == "RightLowerArm" then
- v.Transparency = 1
- end
- end
- end)
- local armPart = Stand:WaitForChild("LeftHand")
- while debounce == true do
- leftSide(Character,Stand,Folder,armPart)
- wait(.1)
- rightSide(Character,Stand,Folder,armPart)
- wait(.1)
- end
- end
- end)
- Barrage.OnServerEvent:Connect(function(Player,active)
- local Stand = workspace:FindFirstChild(Player.Name.." Stand"):WaitForChild("Dummy")
- if Stand and active == 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 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()
- local Folder = workspace:FindFirstChild(Player.Name.." Barrage")
- Folder:Destroy()
- spawn(function()
- for i,v in pairs(Stand:GetChildren()) do
- if v.Name == "LeftHand" or v.Name == "LeftUpperArm" or v.Name == "LeftLowerArm" then
- v.Transparency = 0
- elseif v.Name == "RightHand" or v.Name == "RightUpperArm" or v.Name == "RightLowerArm" then
- v.Transparency = 0
- end
- end
- end)
- Barrage:FireClient(Player)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment