Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +local RunService = game:GetService("RunService")
- local RS = game:GetService("ReplicatedStorage")
- local CS = game:GetService("CollectionService")
- local TS = game:GetService("TweenService")
- local Debounce = {}
- local Debounce2, Plr = nil, nil
- local AddPlayers,TrashTable = {}, {}
- local Duration, Cooldown, EndTime= 1.7 , 2 , 1
- local Spin = 0
- local function getSpeed(Char,Walk,Jump,Anc)
- Char.Humanoid.WalkSpeed = Walk or 16
- Char.Humanoid.JumpPower = Jump or 50
- Char.HumanoidRootPart.Anchored = Anc or false
- end
- RS.Events.getConHaki.OnServerEvent:Connect(function(Player)
- if CS:HasTag(Player.Character,"DoneEffect") then return end
- if Debounce[Player] then return end
- if Debounce2 then return end; Plr = Player
- Debounce[Player] = game.ReplicatedStorage.Effects.ConqHaki:Clone()
- Debounce[Player].Parent = workspace; Debounce[Player].Position = Player.Character.Head.Position
- TS:Create(Debounce[Player], TweenInfo.new(Duration), {Size = Vector3.new(150,150,150);}):Play()
- end)
- RunService.Heartbeat:Connect(function()
- if not Debounce[Plr] then return end
- Spin += 5
- local NewParams = OverlapParams.new()
- NewParams.FilterDescendantsInstances = {Plr.Character}
- NewParams.FilterType = Enum.RaycastFilterType.Blacklist
- NewParams.MaxParts = 0
- Debounce[Plr].Orientation = Vector3.new(Spin,0,-Spin)
- for Index,Value in pairs(workspace:GetPartsInPart(Debounce[Plr],NewParams)) do
- if Value.Parent:FindFirstChild("Humanoid") and not table.find(AddPlayers,Value.Parent) then
- AddPlayers[#AddPlayers + 1] = Value.Parent
- end
- end
- for Index2,Value2 in pairs(AddPlayers) do
- if CS:HasTag(Value2,"DoneEffect") then continue end
- if Debounce2 then return end
- if Value2 == Plr.Character or not Value2:FindFirstChild("HumanoidRootPart") then continue end
- local Animation = Instance.new("Animation"); Animation.AnimationId = "rbxassetid://7356099138";
- local StartAnim = Value2.Humanoid:LoadAnimation(Animation)
- local HeadEffect = game.ReplicatedStorage.Effects.HeadEffect:Clone()
- HeadEffect.DescendantRemoving:Connect(function(Descendants)
- TrashTable[#TrashTable + 1] = Descendants
- end)
- table.insert(AddPlayers, StartAnim)
- HeadEffect.HakiAttach.Parent = Value2.Head
- CS:AddTag(Value2,"DoneEffect")
- getSpeed(Value2,0,0,true)
- StartAnim:Play()
- if game.Players:GetPlayerFromCharacter(Value2) then
- RS.Events.getConHaki:FireClient(game.Players:GetPlayerFromCharacter(Value2),Duration)
- else
- continue
- end
- end
- task.delay(Duration,function()
- if Debounce2 then return end
- Debounce2 = true
- local Tween2 = TS:Create(Debounce[Plr], TweenInfo.new(EndTime), {Transparency = 1})
- Tween2:Play()
- for Index,Value in pairs(TrashTable) do
- Value:Destroy()
- TrashTable[Index] = nil
- end
- for Index,Value in pairs(AddPlayers) do
- if Value:FindFirstChild("Humanoid") then
- if CS:HasTag(Value,"DoneEffect") then CS:RemoveTag(Value,"DoneEffect") end
- getSpeed(Value)
- else
- Value:Stop()
- end
- AddPlayers[Index] = nil
- end
- wait(Cooldown)
- Tween2:Destroy()
- Debounce[Plr]:Destroy(); Debounce[Plr] = nil
- Debounce2 = false
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement