local I=game:GetService("\080\108\097\121\101\114\115")local x=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local u=require((x:WaitForChild("\080\114\111\106\101\099\116")):WaitForChild("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101"))local U=u:GetResource("\069\120\116\101\114\110\097\108\085\116\105\108\046\078\101\120\117\115\073\110\115\116\097\110\099\101\046\078\101\120\117\115\079\098\106\101\099\116")local k=U:Extend()k:SetClassName("\080\117\109\112\107\105\110\065\116\116\097\099\107")function k.PerformServerAttack(I,x,u)local U=I.Character if U then local I=U:FindFirstChild("\072\117\109\097\110\111\105\100")local k=U:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")if I and I.Health>0 then local I=Instance.new("\080\097\114\116")I.Size=Vector3.new(1,1,1)I.CFrame=k.CFrame I.CanCollide=false I.Parent=x local R=Instance.new("\083\112\101\099\105\097\108\077\101\115\104")R.MeshType=Enum.MeshType.FileMesh R.Scale=Vector3.new(2,2,2)R.TextureId="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\055\054\048\054\056\049\052"R.MeshId="\114\098\120\097\115\115\101\116\105\100\058\047\047\051\055\050\050\051\055\056\055"R.Parent=I local p=Instance.new("\070\105\114\101")p.Parent=I local z=Instance.new("\066\111\100\121\086\101\108\111\099\105\116\121")z.MaxForce=Vector3.new(math.huge,math.huge,math.huge)z.Velocity=(CFrame.new(k.CFrame.Position,u)).LookVector*500 z.Parent=I I.Touched:Connect(function(u)local k=u.Parent if k and k:IsDescendantOf(x)then local x=k:FindFirstChild("\072\117\109\097\110\111\105\100")local u=k:FindFirstChild("\072\101\097\100")if x then p.Parent=u I:Destroy()x:TakeDamage(20*(U:FindFirstChild("\066\111\111\115\116\069\102\102\101\099\116")and 2 or 1))for I=1,24,1 do x:TakeDamage(3*(U:FindFirstChild("\066\111\111\115\116\069\102\102\101\099\116")and 2 or 1))wait(.125)end p:Destroy()end end end)delay(3,function()I:Destroy()end)end end end return k
--[[
TheNexusAvenger

Attack for a pumpkin.
Class is static (should not be created).
--]]

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local ReplicatedStorageProject = require(ReplicatedStorage:WaitForChild("Project"):WaitForChild("ReplicatedStorage"))

local NexusObject = ReplicatedStorageProject:GetResource("ExternalUtil.NexusInstance.NexusObject")

local PumpkinAttack = NexusObject:Extend()
PumpkinAttack:SetClassName("PumpkinAttack")



--[[
Performs the attack on the server.
--]]
function PumpkinAttack.PerformServerAttack(Player,DungeonModel,Target)
    local Character = Player.Character
    if Character then
        local Humanoid = Character:FindFirstChild("Humanoid")
        local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart")
        if Humanoid and Humanoid.Health > 0 then
            --Create the projectile.
            local PumpkinProjectile = Instance.new("Part")
            PumpkinProjectile.Size = Vector3.new(1,1,1)
            PumpkinProjectile.CFrame = HumanoidRootPart.CFrame
            PumpkinProjectile.CanCollide = false
            PumpkinProjectile.Parent = DungeonModel
            
            local Mesh = Instance.new("SpecialMesh")
            Mesh.MeshType = Enum.MeshType.FileMesh
            Mesh.Scale = Vector3.new(2,2,2)
            Mesh.TextureId = "rbxassetid://37606814"
            Mesh.MeshId = "rbxassetid://37223787"
            Mesh.Parent = PumpkinProjectile

            local Fire = Instance.new("Fire")
            Fire.Parent = PumpkinProjectile

            local BodyVelocity = Instance.new("BodyVelocity")
            BodyVelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
            BodyVelocity.Velocity = CFrame.new(HumanoidRootPart.CFrame.Position,Target).LookVector * 500
            BodyVelocity.Parent = PumpkinProjectile

            --Set up setting enemies on fire.
            PumpkinProjectile.Touched:Connect(function(TouchPart)
                local MonsterCharacter = TouchPart.Parent
                if MonsterCharacter and MonsterCharacter:IsDescendantOf(DungeonModel) then
                    local MonsterHumanoid = MonsterCharacter:FindFirstChild("Humanoid")
                    local Head = MonsterCharacter:FindFirstChild("Head")
                    if MonsterHumanoid then
                        --Destroy the projectile.
                        Fire.Parent = Head
                        PumpkinProjectile:Destroy()

                        --Start damaging the monster.
                        MonsterHumanoid:TakeDamage(20 * (Character:FindFirstChild("BoostEffect") and 2 or 1))
                        for i = 1,24 do
                            MonsterHumanoid:TakeDamage(3 * (Character:FindFirstChild("BoostEffect") and 2 or 1))
                            wait(0.125)
                        end
                        Fire:Destroy()
                    end
                end
            end)


            --Clear the projectile.
            delay(3,function()
                PumpkinProjectile:Destroy()
            end)
        end
    end
end



return PumpkinAttack