Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- **REWAD HERE**
- I will post some components of the game (the game link is in the application)
- **BARRAGE EFFECT** (mutiple hands = barrage)
- **ON CLIENT**
- local function QuadraticBezier(Time,Point0,Point1,Point2)
- return (1-Time)^2*Point0+2*(1-Time)*Time*Point1+Time^2*Point2;
- end
- --//ADVXNTJOSH
- local Place = game.Lighting.Arms
- function BarrageEffect(chr)
- spawn(function()
- local LeftRight = ""
- local Random = math.random(1,2)
- if Random == 1 then
- LeftRight = "Left"
- elseif Random == 2 then
- LeftRight = "Right"
- end
- local endd = Instance.new("Attachment", chr.HumanoidRootPart)
- endd.Position = Vector3.new(0, 0, -9.388)
- local CFRTARG = chr.HumanoidRootPart.CFrame * CFrame.new(0, 0, -9.388)
- endd.WorldPosition = CFRTARG.Position
- --endd.Visible = true
- if LeftRight == "Left" then
- local Arm = Place["Star Platinum"].L:Clone()
- Arm.CFrame = chr.HumanoidRootPart.CFrame*CFrame.new(-1,0,-0.5)*CFrame.Angles(90,0,0)
- Arm.Parent = workspace.Effects
- Arm.CanCollide = false
- Arm.Anchored = true
- game.Debris:AddItem(Arm,0.5)
- local Sound = Instance.new("Sound", chr.HumanoidRootPart)
- Sound.SoundId = "rbxassetid://4571259077"
- Sound.Volume = 4
- Sound.PlaybackSpeed = 1
- Sound:Play()
- game.Debris:AddItem(Sound,1)
- local p0 = chr.HumanoidRootPart.Position + Vector3.new(math.random(-1,1),math.random(-2,2),math.random(-1,1))
- local target = Instance.new("Attachment", chr.HumanoidRootPart)
- local CFRTARG = chr.HumanoidRootPart.CFrame * CFrame.new(-6.056, 0, -3.063)
- target.WorldPosition = CFRTARG.Position
- --target.Visible = true
- local p1 = target.WorldPosition + Vector3.new(0,math.random(-2,2),0)
- local p2 = endd.WorldPosition + Vector3.new(-1.5,math.random(-1.5,1.5),math.random(-1,1))
- spawn(function()
- for i = 1, 5 do
- if Arm then
- local t = i/5
- local Pos = QuadraticBezier(t, p0, p1, p2)
- local Direction = QuadraticBezier(t + 0.1, p0, p1, p2)
- --part.CFrame = CFrame.new(Pos, Direction)
- game.TweenService:Create(Arm,TweenInfo.new(0.1,Enum.EasingStyle.Linear,Enum.EasingDirection.In),{CFrame = CFrame.new(Pos, Direction) * CFrame.Angles(math.rad(90),0,0)}):Play()
- end
- wait(0.1)
- end
- end)
- task.delay(.01,function()
- for i , v in pairs(Arm:GetDescendants()) do
- if v:IsA("Texture") or v:IsA("BasePart") or v:IsA("Decal") and v ~= Arm then
- v.Transparency = 0
- game.TweenService:Create(v,TweenInfo.new(1),{Transparency = 1}):Play()
- end
- if v:IsA("ParticleEmitter") then
- spawn(function()
- wait(0.05)
- v:destroy()
- end)
- end
- if v:IsA("Motor6D") then
- v:Destroy()
- end
- end
- end)
- elseif LeftRight == "Right" then
- local Arm = Place["Star Platinum"].R:Clone()
- Arm.CFrame = chr.HumanoidRootPart.CFrame*CFrame.new(1,0,-0.5)*CFrame.Angles(90,0,0)
- Arm.Parent = workspace.Effects
- -- Arm.CFrame = chr.HumanoidRootPart.CFrame*CFrame.new(1,0,-0.5)*CFrame.Angles(90,0,0)
- Arm.CanCollide = false
- Arm.Anchored = true
- game.Debris:AddItem(Arm,0.5)
- local Sound = Instance.new("Sound", chr.HumanoidRootPart)
- Sound.SoundId = "rbxassetid://4571259077"
- Sound.Volume = 4
- Sound.PlaybackSpeed = 1
- Sound:Play()
- game.Debris:AddItem(Sound,1)
- local p0 = chr.HumanoidRootPart.CFrame.p + Vector3.new(math.random(-1,1),math.random(-2,2),math.random(-1,1))
- local target = Instance.new("Attachment", chr.HumanoidRootPart)
- target.Position = Vector3.new(6.538, 0, -3.063)
- local CFRTARG = chr.HumanoidRootPart.CFrame * CFrame.new(6.538, 0, -3.063)
- target.WorldPosition = CFRTARG.Position
- --target.WorldPosition = Vector3.new(49.654, 121.054, 127.319)
- --target.Visible = true
- local p1 = target.WorldPosition + Vector3.new(0,math.random(-1,1),0)
- local p2 = endd.WorldPosition + Vector3.new(1.5,math.random(-1.5,1.5),math.random(-1,1))
- task.delay(.01,function()
- for i , v in pairs(Arm:GetDescendants()) do
- if v:IsA("Texture") or v:IsA("BasePart") or v:IsA("Decal") and v ~= Arm then
- v.Transparency = 0
- game.TweenService:Create(v,TweenInfo.new(1),{Transparency = 1}):Play()
- end
- if v:IsA("ParticleEmitter") then
- spawn(function()
- wait(0.05)
- v:destroy()
- end)
- end
- end
- end)
- spawn(function()
- for i = 1, 5 do
- if Arm then
- local t = i/5
- local Pos = QuadraticBezier(t, p0, p1, p2)
- local Direction = QuadraticBezier(t + 0.1, p0, p1, p2)
- --part.CFrame = CFrame.new(Pos, Direction)
- game.TweenService:Create(Arm,TweenInfo.new(0.1,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut),{CFrame = CFrame.new(Pos, Direction) * CFrame.Angles(math.rad(90),0,0)}):Play()
- end
- wait(0.1)
- end
- end)
- end
- end)
- end
- function noise(chr)
- local Sound = Instance.new("Sound", chr.HumanoidRootPart)
- Sound.SoundId = "rbxassetid://4571259077"
- Sound.Volume = 4
- Sound.PlaybackSpeed = 1
- Sound:Play()
- game.Debris:AddItem(Sound,1)
- end
- game.ReplicatedStorage.ClientBarrage.OnClientEvent:Connect(function(chr)
- if true == true then
- wait(0.2)
- BarrageEffect(chr)
- BarrageEffect(chr)
- BarrageEffect(chr)
- BarrageEffect(chr)
- end
- noise(chr)
- end)
- --Client effects handler
- **A LOCAL SCRIPT THAT HANDLES GAME EFFECTS**
- local l
- repeat wait() until game.Players.LocalPlayer.Character
- local plr = game.Players.LocalPlayer
- local plrgui = plr.PlayerGui
- local chr = plr.Character
- local hum = chr:WaitForChild("Humanoid")
- local hrp = chr.HumanoidRootPart
- local limbs = {}
- game.ReplicatedStorage:WaitForChild("Main"):WaitForChild("GameStuff"):WaitForChild("Stance"):FireServer()
- local StandRemote = game:GetService("ReplicatedStorage")["Main"]["GameStuff"]["Stand"]
- local EffectsEvent = game:GetService("ReplicatedStorage")["Main"]:WaitForChild("effects"):WaitForChild("EffectsEvent")
- StandRemote:FireServer()
- game.ReplicatedStorage.Main.GameStuff.Stand.OnClientEvent:Connect(function()
- StandRemote:FireServer()
- end)
- for i, v in pairs(chr:GetChildren()) do
- table.insert(limbs, v)
- end
- --// EFFECTS
- local BasicEffects = game.ReplicatedStorage.Main.effects.BasicEffects
- local effects = {
- "NormalHitEffect"
- }
- function emit(part,where,howlong)
- local Attachment = part.Attachment:Clone()
- game.Debris:AddItem (Attachment,howlong + .4)
- Attachment.Parent = where
- spawn(function()
- for i,v in pairs(Attachment:GetChildren()) do
- v.Enabled = true
- wait(howlong)
- v.Enabled = false
- end
- end)
- end
- function emit2(part,where,emission)
- local Attachment = part.Attachment:Clone()
- game.Debris:AddItem (Attachment,emission*2)
- local Particlemit = Attachment.particle
- Attachment.Parent = where
- Attachment.Position = Vector3.new(math.random(-2,2),math.random(-2,2),math.random(-2,2))
- Particlemit.Enabled = true
- Particlemit.Rate = 0
- Particlemit:Emit(emission)
- end
- effects["NormalHitEffect"] = function(torso,howlong)
- task.spawn(function()
- local effect = BasicEffects.NormalHitEffect
- emit(effect,torso,howlong)
- end)
- end
- effects["Block"] = function(torso,howlong)
- task.spawn(function()
- local effect = BasicEffects.Block
- emit2(effect,torso,howlong)
- end)
- end
- effects["PartEmitChr"] = function(chr,color)
- task.spawn(function()
- local effect = BasicEffects.PartEmitChr
- local tweenservice = game:GetService("TweenService")
- local limbs = {
- ["RightArm"] = chr["Right Arm"];
- ["LeftArm"] = chr["Left Arm"];
- ["RightLeg"] = chr["Right Leg"];
- ["LeftLeg"] = chr["Left Leg"];
- ["Torso"] = chr["Torso"];
- ["Head"] = chr["Head"];
- }
- coroutine.resume(coroutine.create(function()
- for i,v in pairs(limbs) do
- local EmitPart = effect:Clone()
- EmitPart.Parent = v
- EmitPart.Material = Enum.Material.Plastic
- EmitPart.CanCollide = false
- EmitPart.Anchored = false
- EmitPart.Size = v.Size - Vector3.new(0.5,0.5,0.5)
- EmitPart.Position = v.Position
- local weld = Instance.new("Weld",EmitPart)
- weld.Part0 = EmitPart
- weld.Part1 = v
- tweenservice:Create(EmitPart,TweenInfo.new(.6),{Size = EmitPart.Size + Vector3.new(1.5,1.5,1.5)}):Play()
- tweenservice:Create(EmitPart,TweenInfo.new(.6),{Transparency = 1}):Play()
- game.Debris:addItem(EmitPart,4)
- end
- end))
- end)
- end
- EffectsEvent.OnClientEvent:Connect(function(torso,EffectName,howlong)
- effects[EffectName](torso,howlong)
- end)
- **COMBO GUI COUNT UP**
- **THIS COUNTS UP HOW MUCH THE PLAYER IS HITTING ANOTHER HUMANOID (THERES A WHOLE DAMAGE MODULE BUT THAT ONE IS MORE SIMPLER)
- local timetoreset=1
- game.ReplicatedStorage.ComboGUIReciever.OnClientEvent:Connect(function(damagedealt)
- local gui=game.Players.LocalPlayer.PlayerGui.ComboGUI.Holder
- local guie = game.Players.LocalPlayer.PlayerGui.ComboGUI
- local damagevalue=gui.Damage
- local hitsvalue=gui.Hits
- local damagetext=gui.ActualDamage
- local hitstext=gui.HitsText
- if guie.Enabled == false then
- guie.Enabled=true
- task.spawn(function()
- for i,v in pairs(gui:GetChildren()) do
- if v:IsA("Frame") then
- v.BackgroundTransparency = 1
- game.TweenService:Create(v,TweenInfo.new(1),{BackgroundTransparency = 0}):play()
- end
- if v:IsA("TextLabel") then
- v.TextTransparency = 1
- game.TweenService:Create(v,TweenInfo.new(1),{TextTransparency = 0}):play()
- end
- end
- end)
- end
- damagevalue.Value+=damagedealt
- hitsvalue.Value+=1
- damagetext.Text=damagevalue.Value
- hitstext.Text=hitsvalue.Value
- task.spawn(function()
- local gui2 = gui:Clone()
- gui2.Visible = true
- gui2.Parent = game.Players.LocalPlayer.PlayerGui.ComboGUI
- local rad = (math.random(1, 1))
- game.TweenService:Create(gui2,TweenInfo.new(0.2,Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),{Size = gui2.Size + UDim2.new(rad / 10, 0,rad / 10,0) }):play()
- task.spawn(function()
- game.TweenService:Create(gui2,TweenInfo.new(0.1,Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),{Rotation = 10}):play()
- wait(0.02)
- game.TweenService:Create(gui2,TweenInfo.new(0.1,Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),{Rotation = 0}):play()
- end)
- for i,v in pairs(gui2:GetChildren()) do
- if v:IsA("Frame") then
- game.TweenService:Create(v,TweenInfo.new(0.1),{BackgroundTransparency = 1}):play()
- end
- if v:IsA("TextLabel") then
- game.TweenService:Create(v,TweenInfo.new(0.1),{TextTransparency = 1}):play()
- end
- end
- end)
- local spy=hitsvalue.Value
- task.spawn(function()
- game.TweenService:Create(gui,TweenInfo.new(0.1,Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),{Rotation = 10}):play()
- wait(0.02)
- game.TweenService:Create(gui,TweenInfo.new(0.1,Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),{Rotation = 0}):play()
- end)
- task.spawn(function()
- end)
- task.wait(timetoreset)
- if hitsvalue.Value==spy then
- task.spawn(function()
- for i,v in pairs(gui:GetChildren()) do
- if v:IsA("Frame") then
- v.BackgroundTransparency = 0
- game.TweenService:Create(v,TweenInfo.new(1),{BackgroundTransparency = 1}):play()
- end
- if v:IsA("TextLabel") then
- v.TextTransparency = 0
- game.TweenService:Create(v,TweenInfo.new(1),{TextTransparency = 1}):play()
- end
- end
- end)
- wait(0.5)
- guie.Enabled=false
- damagevalue.Value=0
- hitsvalue.Value=0
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment