Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local RunService = game:GetService("RunService")
- local RST = game.ReplicatedStorage.Events.Ragdoll
- local Debounce,v1,v2 = {},{},{}
- local Deb2,v3 = {},{}
- RST.OnServerEvent:Connect(function(Player)
- if Player:WaitForChild("DataFolder").Mana.Value == 0 and not Deb2[Player] then return end
- if Debounce[Player] then return end
- Debounce[Player] = true
- local Mana = Player:WaitForChild("DataFolder").Mana
- local Character = Player.Character
- local IgnisFire = game.ReplicatedStorage.FireForwad:Clone()
- IgnisFire.Position = Character["Right Arm"].Position + Vector3.new(0,-.5,0)
- local IgnisSnap = Character:WaitForChild("Humanoid"):LoadAnimation(script.Parent.IgnisAnimation)
- IgnisSnap:Play()
- IgnisFire.Parent = workspace
- local function BurningEffect(NBR,HMN,HRP)
- local Burn = game.ReplicatedStorage.Burning:Clone()
- Burn.Position = HRP.Position
- Burn.Parent = workspace
- local WeldC = Instance.new("WeldConstraint",HRP)
- WeldC.Part0 = HRP
- WeldC.Part1 = Burn
- v3[Player] = WeldC
- for i = 1,NBR do
- wait(.25)
- HMN:TakeDamage(1)
- if i == NBR then v3[Player]:Destroy() else continue end
- end
- end
- local WC = Instance.new("WeldConstraint",Character["Right Arm"])
- WC.Part0 = Character["Right Arm"]
- WC.Part1 = IgnisFire
- v1[Player] = WC
- Deb2[Player] = true
- Mana.Changed:Connect(function()
- if Mana.Value == 0 and Deb2[Player] then
- Deb2[Player] = false
- end
- end)
- local function CheckRay()
- if Deb2[Player] then
- local RayList = RaycastParams.new()
- RayList.FilterType = Enum.RaycastFilterType.Blacklist
- RayList.FilterDescendantsInstances = {Player.Character}
- local MainRay = workspace:Raycast((Character.HumanoidRootPart.CFrame).p,Character.HumanoidRootPart.CFrame.LookVector * 15.5, RayList)
- if MainRay and Deb2[Player] and Mana.Value ~= 0 then
- if MainRay.Instance.Parent:FindFirstChild("Humanoid") then
- return true, MainRay.Instance.Parent
- end
- end
- end
- end
- while Deb2[Player] do
- wait()
- local U1, U2 = CheckRay()
- if U1 then
- local BV = Instance.new("BodyVelocity", U2:FindFirstChild("HumanoidRootPart"))
- BV.MaxForce = Vector3.new(1e8, 10000, 1e8)
- BV.Velocity = Character.HumanoidRootPart.CFrame.LookVector * 15
- BurningEffect(5,U2:FindFirstChild("Humanoid"),U2:FindFirstChild("HumanoidRootPart"))
- v2[Player] = BV
- wait()
- v2[Player]:Destroy()
- break
- end
- end
- repeat wait() until not Deb2[Player]
- Deb2[Player] = nil
- IgnisSnap:Stop()
- v1[Player]:Destroy() v1[Player] = nil
- if v2[Player] ~= nil then v2[Player]:Destroy() end
- if v3[Player] ~= nil then v3[Player]:Destroy() end
- Debounce[Player] = nil
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement