local I=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local x=require((I: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=x: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 U=u:Extend()U:SetClassName("\083\110\111\119\098\097\108\108\065\116\116\097\099\107")function U.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.BrickColor=BrickColor.new("\073\110\115\116\105\116\117\116\097\116\105\111\110\097\108 \119\104\105\116\101")I.Material=Enum.Material.Sand I.Size=Vector3.new(1,1,1)I.CFrame=k.CFrame I.CanCollide=false I.Shape=Enum.PartType.Ball I.Parent=x local U=Instance.new("\066\111\100\121\086\101\108\111\099\105\116\121")U.MaxForce=Vector3.new(math.huge,math.huge,math.huge)U.Velocity=(CFrame.new(k.CFrame.Position,u)).LookVector*500 U.Parent=I I.Touched:Connect(function(I)local u=I.Parent if u and u:IsDescendantOf(x)then local I=u:FindFirstChild("\072\101\097\100")if I and not I.Anchored then for I,x in pairs(u:GetDescendants())do if x:IsA("\066\097\115\101\080\097\114\116")then x.Reflectance=x.Reflectance+.5 x.Anchored=true end end wait(5)for I,x in pairs(u:GetDescendants())do if x:IsA("\066\097\115\101\080\097\114\116")then x.Reflectance=x.Reflectance-.5 x.Anchored=false end end end end end)delay(3,function()I:Destroy()end)end end end return U
--[[
TheNexusAvenger

Attack for a snowball.
The details of this attack are not known because
of the lack of reference material.
Class is static (should not be created).
--]]

local ReplicatedStorage = game:GetService("ReplicatedStorage")

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

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

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



--[[
Performs the attack on the server.
--]]
function SnowballAttack.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 SnowballProjectile = Instance.new("Part")
            SnowballProjectile.BrickColor = BrickColor.new("Institutational white")
            SnowballProjectile.Material = Enum.Material.Sand
            SnowballProjectile.Size = Vector3.new(1,1,1)
            SnowballProjectile.CFrame = HumanoidRootPart.CFrame
            SnowballProjectile.CanCollide = false
            SnowballProjectile.Shape = Enum.PartType.Ball
            SnowballProjectile.Parent = DungeonModel
            
            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 = SnowballProjectile

            --Set up setting freezing enemies.
            SnowballProjectile.Touched:Connect(function(TouchPart)
                local MonsterCharacter = TouchPart.Parent
                if MonsterCharacter and MonsterCharacter:IsDescendantOf(DungeonModel) then
                    local Head = MonsterCharacter:FindFirstChild("Head")
                    if Head and not Head.Anchored then
                        --Anchor the monster.
                        for _,Part in pairs(MonsterCharacter:GetDescendants()) do
                            if Part:IsA("BasePart") then
                                Part.Reflectance = Part.Reflectance + 0.5
                                Part.Anchored = true
                            end
                        end

                        --Unanchor the monster.
                        wait(5)
                        for _,Part in pairs(MonsterCharacter:GetDescendants()) do
                            if Part:IsA("BasePart") then
                                Part.Reflectance = Part.Reflectance - 0.5
                                Part.Anchored = false
                            end
                        end
                    end
                end
            end)

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



return SnowballAttack