Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local RS = game:GetService("ReplicatedStorage")
- local Delays = 2
- local YSize = 11
- local Waits = {}
- RS.Event.OnServerEvent:Connect(function(plr)
- if not plr or not plr.Character then return end
- local Character = plr.Character
- if not Character.PrimaryPart then return end
- if not Character:FindFirstChild("Humanoid") then return end
- if table.find(Waits, plr) then return end
- table.insert(Waits, plr)
- local Animation = Instance.new("Animation")
- Animation.AnimationId = "rbxassetid://6069690501"
- Character.Humanoid:LoadAnimation(Animation):Play()
- wait(1/6) --.1667
- for i = 1,8 do
- local RaycastR
- local function Check(Param, Exclude)
- if i % 2 == 0 then
- RaycastR = workspace:Raycast((Character.PrimaryPart.CFrame * CFrame.new(3,0,-i*3.6)).Position, Vector3.new(0,-180,0) * 100, Param)
- else
- RaycastR = workspace:Raycast((Character.PrimaryPart.CFrame * CFrame.new(-3,0,-i*3.6)).Position, Vector3.new(0,-180,0) * 100, Param)
- end
- local Insta = RaycastR.Instance
- if Insta.Parent and Insta.Parent:FindFirstChild("Humanoid") then
- table.insert(Exclude, Insta.Parent)
- Param.FilterDescendantsInstances = Exclude
- Check(Param, Exclude)
- end
- end
- local RayCastPa = RaycastParams.new()
- RayCastPa.FilterType = Enum.RaycastFilterType.Blacklist
- Check(RayCastPa, {})
- if RaycastR then
- local Hits = {}
- local Pillar = RS.Pillar:Clone()
- Pillar.Material = RaycastR.Material
- Pillar.Size = Pillar.Size + Vector3.new(0,0,1)
- Pillar.Parent = workspace
- Pillar.Position = RaycastR.Position + Vector3.new(math.random(1,5),0,math.random(1,5))
- game.TweenService:Create(Pillar, TweenInfo.new(.2), {Position = Pillar.Position + Vector3.new(0,YSize/2,0), Size = Pillar.Size + Vector3.new(0,YSize,0)}):Play()
- delay(.2, function()
- for i,v in pairs(Pillar:GetTouchingParts()) do
- if not v or not v.Parent or not v.Parent:FindFirstChild("Humanoid") then return end
- if v:IsDescendantOf(Character) then return end
- if table.find(Hits, v.Parent.Humanoid) then return end
- table.insert(Hits, v.Parent.Humanoid)
- v.Parent.Humanoid:TakeDamage(10)
- end
- end)
- delay(.8, function()
- game.TweenService:Create(Pillar, TweenInfo.new(.2), {Position = Pillar.Position + Vector3.new(0,-YSize/2,0), Size = Pillar.Size * Vector3.new(1,0,1)}):Play()
- end)
- game.Debris:AddItem(Pillar, 1)
- wait(.1)
- Pillar.Touched:Connect(function(Hit)
- if not Hit or not Hit.Parent or not Hit.Parent:FindFirstChild("Humanoid") then return end
- if Hit:IsDescendantOf(Character) then return end
- if table.find(Hits, Hit.Parent.Humanoid) then return end
- table.insert(Hits, Hit.Parent.Humanoid)
- Hit.Parent.Humanoid:TakeDamage(10)
- end)
- end
- end
- wait(2)
- Animation:Destroy()
- table.remove(Waits, table.find(Waits, plr))
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement