local assets=
{
	Asset("ANIM", "anim/frosthammer.zip"),
	Asset("ANIM", "anim/swap_frosthammer.zip"),
	Asset("ATLAS", "images/inventoryimages/frosthammer.xml"),
	Asset("IMAGE", "images/inventoryimages/frosthammer.tex"),
}

local prefabs =
{
	--"collapse_small",
	--"collapse_big",
}
---------------------------
local function levelexp(inst,data)

	local max_exp = 4100
	local exp = math.min(inst.level, max_exp)

if inst.level <= 4000 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:RemoveTag("levelup")
end
if inst.level >=0 and inst.level <10 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[10]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level1")
elseif inst.level >=10 and inst.level <30 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[30]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level2")
inst:RemoveTag("level1")
elseif inst.level >=30 and inst.level <60 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[60]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level3")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
elseif inst.level >=60 and inst.level <100 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[100]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level4")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
elseif inst.level >=100 and inst.level <150 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[150]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level5")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
elseif inst.level >=150 and inst.level <200 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[200]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level6")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
elseif inst.level >=200 and inst.level <250 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[250]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level7")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
elseif inst.level >=250 and inst.level <300 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[300]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level8")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
elseif inst.level >=300 and inst.level <350 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[350]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level9")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
elseif inst.level >=350 and inst.level <450 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[450]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level10")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
elseif inst.level >=450 and inst.level <600 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[600]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level11")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
elseif inst.level >=600 and inst.level <700 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[700]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level12")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
elseif inst.level >=700 and inst.level <800 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[800]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level13")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
elseif inst.level >=800 and inst.level <900 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[900]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level14")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
elseif inst.level >=900 and inst.level <1000 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[1000]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level15")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
elseif inst.level >=1000 and inst.level <1100 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[1100]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level16")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
inst:RemoveTag("level15")
elseif inst.level >=1100 and inst.level <1200 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[1200]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level17")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
inst:RemoveTag("level15")
inst:RemoveTag("level16")
elseif inst.level >=1200 and inst.level <1300 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[1300]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level18")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
inst:RemoveTag("level15")
inst:RemoveTag("level16")
inst:RemoveTag("level17")
elseif inst.level >=1300 and inst.level <1400 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[1400]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level19")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
inst:RemoveTag("level15")
inst:RemoveTag("level16")
inst:RemoveTag("level17")
inst:RemoveTag("level18")
elseif inst.level >=1400 and inst.level <1500 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[1500]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level20")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
inst:RemoveTag("level15")
inst:RemoveTag("level16")
inst:RemoveTag("level17")
inst:RemoveTag("level18")
inst:RemoveTag("level19")
elseif inst.level >=1500 and inst.level <1600 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[1600]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level21")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
inst:RemoveTag("level15")
inst:RemoveTag("level16")
inst:RemoveTag("level17")
inst:RemoveTag("level18")
inst:RemoveTag("level19")
inst:RemoveTag("level20")
elseif inst.level >=1600 and inst.level <1800 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[1800]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level22")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
inst:RemoveTag("level15")
inst:RemoveTag("level16")
inst:RemoveTag("level17")
inst:RemoveTag("level18")
inst:RemoveTag("level19")
inst:RemoveTag("level20")
inst:RemoveTag("level21")
elseif inst.level >=1800 and inst.level <2000 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[2000]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level23")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
inst:RemoveTag("level15")
inst:RemoveTag("level16")
inst:RemoveTag("level17")
inst:RemoveTag("level18")
inst:RemoveTag("level19")
inst:RemoveTag("level20")
inst:RemoveTag("level21")
inst:RemoveTag("level22")
elseif inst.level >=2000 and inst.level <2200 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[2200]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level24")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
inst:RemoveTag("level15")
inst:RemoveTag("level16")
inst:RemoveTag("level17")
inst:RemoveTag("level18")
inst:RemoveTag("level19")
inst:RemoveTag("level20")
inst:RemoveTag("level21")
inst:RemoveTag("level22")
inst:RemoveTag("level23")
elseif inst.level >=2200 and inst.level <2400 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[2400]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level25")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
inst:RemoveTag("level15")
inst:RemoveTag("level16")
inst:RemoveTag("level17")
inst:RemoveTag("level18")
inst:RemoveTag("level19")
inst:RemoveTag("level20")
inst:RemoveTag("level21")
inst:RemoveTag("level22")
inst:RemoveTag("level23")
inst:RemoveTag("level24")
elseif inst.level >=2400 and inst.level <2600 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[2600]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level26")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
inst:RemoveTag("level15")
inst:RemoveTag("level16")
inst:RemoveTag("level17")
inst:RemoveTag("level18")
inst:RemoveTag("level19")
inst:RemoveTag("level20")
inst:RemoveTag("level21")
inst:RemoveTag("level22")
inst:RemoveTag("level23")
inst:RemoveTag("level24")
inst:RemoveTag("level25")
elseif inst.level >=2600 and inst.level <2800 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[2800]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level27")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
inst:RemoveTag("level15")
inst:RemoveTag("level16")
inst:RemoveTag("level17")
inst:RemoveTag("level18")
inst:RemoveTag("level19")
inst:RemoveTag("level20")
inst:RemoveTag("level21")
inst:RemoveTag("level22")
inst:RemoveTag("level23")
inst:RemoveTag("level24")
inst:RemoveTag("level25")
inst:RemoveTag("level26")
elseif inst.level >=2800 and inst.level <3000 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[3000]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level28")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
inst:RemoveTag("level15")
inst:RemoveTag("level16")
inst:RemoveTag("level17")
inst:RemoveTag("level18")
inst:RemoveTag("level19")
inst:RemoveTag("level20")
inst:RemoveTag("level21")
inst:RemoveTag("level22")
inst:RemoveTag("level23")
inst:RemoveTag("level24")
inst:RemoveTag("level25")
inst:RemoveTag("level26")
inst:RemoveTag("level27")
elseif inst.level >=3000 and inst.level <4000 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \nNext:[4000]\n[ ³É ³¤ µã Êý ]".. (inst.level))
inst:AddTag("level29")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
inst:RemoveTag("level15")
inst:RemoveTag("level16")
inst:RemoveTag("level17")
inst:RemoveTag("level18")
inst:RemoveTag("level19")
inst:RemoveTag("level20")
inst:RemoveTag("level21")
inst:RemoveTag("level22")
inst:RemoveTag("level23")
inst:RemoveTag("level24")
inst:RemoveTag("level25")
inst:RemoveTag("level26")
inst:RemoveTag("level27")
inst:RemoveTag("level28")
elseif inst.level >=4000 then
inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ] \n[MAX]")
inst:AddTag("level30")
inst:RemoveTag("level1")
inst:RemoveTag("level2")
inst:RemoveTag("level3")
inst:RemoveTag("level4")
inst:RemoveTag("level5")
inst:RemoveTag("level6")
inst:RemoveTag("level7")
inst:RemoveTag("level8")
inst:RemoveTag("level9")
inst:RemoveTag("level10")
inst:RemoveTag("level11")
inst:RemoveTag("level12")
inst:RemoveTag("level13")
inst:RemoveTag("level14")
inst:RemoveTag("level15")
inst:RemoveTag("level16")
inst:RemoveTag("level17")
inst:RemoveTag("level18")
inst:RemoveTag("level19")
inst:RemoveTag("level20")
inst:RemoveTag("level21")
inst:RemoveTag("level22")
inst:RemoveTag("level23")
inst:RemoveTag("level24")
inst:RemoveTag("level25")
inst:RemoveTag("level26")
inst:RemoveTag("level27")
inst:RemoveTag("level28")
inst:RemoveTag("level29")
end
end

local function onpreload(inst, data)
	if data then
		if data.level then
		inst.level = data.level
			levelexp(inst)
end
	end
		end
local function onsave(inst, data)
	data.level = inst.level
	data.charge_time = inst.charge_time
end

local function OnDurability(inst, data)
inst:AddTag("broken")
    inst.components.weapon:SetDamage(1)
	inst.components.talker:Say("-Broken Frost Hammer \nÉË º¦ (1)")
end
--------
    local function TakeItem(inst)
	inst.components.fueled:DoDelta(5000000)
	inst.level = inst.level + 1
	levelexp(inst)
		local fx = SpawnPrefab("splash")
	local pos = Vector3(inst.Transform:GetWorldPosition())
fx.Transform:SetPosition(pos:Get())
if inst:HasTag ("broken") then
inst:RemoveTag ("broken")
    end
end

local function Upgradedamage(inst)
if inst.components.fueled:IsEmpty() then
inst:AddTag("broken") 
   inst.components.weapon:SetDamage(1)
	inst.components.talker:Say("- ÆÆ ¾É µÄ ±ù Ëª Ö® ´¸\nÉË º¦ (1)")
end

if inst:HasTag("broken") then
    inst.components.weapon:SetDamage(1)
	inst.components.talker:Say("- ÆÆ ¾É µÄ ±ù Ëª Ö® ´¸\nÉË º¦ (1)")
   end
if not inst:HasTag("broken") then
        if inst:HasTag("level1") then
    inst.components.weapon:SetDamage(40)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV1) ]\nÉË º¦ (40)\nÁÙ ½ç (1per)")
        elseif inst:HasTag("level2") then
    inst.components.weapon:SetDamage(41)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV2) ]\nÉË º¦ (41)\nÁÙ ½ç (2per)")
        elseif inst:HasTag("level3") then
    inst.components.weapon:SetDamage(42)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV3) ]\nÉË º¦ (42)\nÁÙ ½ç (3per)")
        elseif inst:HasTag("level4") then
    inst.components.weapon:SetDamage(43)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV4) ]\nÉË º¦ (43)\nÁÙ ½ç (4per)")
        elseif inst:HasTag("level5") then
    inst.components.weapon:SetDamage(44)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV5) ]\nÉË º¦ (44)\nÁÙ ½ç (5per)")
        elseif inst:HasTag("level6") then
    inst.components.weapon:SetDamage(45)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV6) ]\nÉË º¦ (45)\nÁÙ ½ç (6per)")
        elseif inst:HasTag("level7") then
    inst.components.weapon:SetDamage(46)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV7) ]\nÉË º¦ (46)\nÁÙ ½ç (7per)")
        elseif inst:HasTag("level8") then
    inst.components.weapon:SetDamage(47)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV8) ]\nÉË º¦ (47)\nÁÙ ½ç (8per)")
        elseif inst:HasTag("level9") then
    inst.components.weapon:SetDamage(48)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV9) ]\nÉË º¦ (48)\nÁÙ ½ç (9per)")
        elseif inst:HasTag("level10") then
    inst.components.weapon:SetDamage(49)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV10) ]\nÉË º¦ (49)\nÁÙ ½ç (10per)")
        elseif inst:HasTag("level11") then
    inst.components.weapon:SetDamage(50)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV11) ]\nÉË º¦ (50)\nÁÙ ½ç (11per)")
        elseif inst:HasTag("level12") then
    inst.components.weapon:SetDamage(51)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV12) ]\nÉË º¦ (51)\nÁÙ ½ç (12per)")
        elseif inst:HasTag("level13") then
    inst.components.weapon:SetDamage(52)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV13) ]\nÉË º¦ (52)\nÁÙ ½ç (13per)")
        elseif inst:HasTag("level14") then
    inst.components.weapon:SetDamage(53)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV14) ]\nÉË º¦ (53)\nÁÙ ½ç (14per)")
        elseif inst:HasTag("level15") then
    inst.components.weapon:SetDamage(54)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV15) ]\nÉË º¦ (54)\nÁÙ ½ç (15per)")
        elseif inst:HasTag("level16") then
    inst.components.weapon:SetDamage(55)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV16) ]\nÉË º¦ (55)\nÁÙ ½ç (16per)")
        elseif inst:HasTag("level17") then
    inst.components.weapon:SetDamage(56)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV17) ]\nÉË º¦ (56)\nÁÙ ½ç (17per)")
        elseif inst:HasTag("level18") then
    inst.components.weapon:SetDamage(57)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV18) ]\nÉË º¦ (57)\nÁÙ ½ç (18per)")
        elseif inst:HasTag("level19") then
    inst.components.weapon:SetDamage(58)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV19) ]\nÉË º¦ (58)\nÁÙ ½ç (19per)")
        elseif inst:HasTag("level20") then
    inst.components.weapon:SetDamage(59)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV20) ]\nÉË º¦ (59)\nÁÙ ½ç (20per)")
        elseif inst:HasTag("level21") then
    inst.components.weapon:SetDamage(60)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV21) ]\nÉË º¦ (60)\nÁÙ ½ç (21per)")
        elseif inst:HasTag("level22") then
    inst.components.weapon:SetDamage(61)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV22) ]\nÉË º¦ (61)\nÁÙ ½ç (22per)")
        elseif inst:HasTag("level23") then
    inst.components.weapon:SetDamage(62)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV23) ]\nÉË º¦ (62)\nÁÙ ½ç (23per)")
        elseif inst:HasTag("level24") then
    inst.components.weapon:SetDamage(63)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV24) ]\nÉË º¦ (63)\nÁÙ ½ç (24per)")
        elseif inst:HasTag("level25") then
    inst.components.weapon:SetDamage(64)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV25) ]\nÉË º¦ (64)\nÁÙ ½ç (25per)")
        elseif inst:HasTag("level26") then
    inst.components.weapon:SetDamage(65)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV26) ]\nÉË º¦ (65)\nÁÙ ½ç (26per)")
        elseif inst:HasTag("level27") then
    inst.components.weapon:SetDamage(66)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV27) ]\nÉË º¦ (66)\nÁÙ ½ç (27per)")
        elseif inst:HasTag("level28") then
    inst.components.weapon:SetDamage(67)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV28) ]\nÉË º¦ (67)\nÁÙ ½ç (28per)")
        elseif inst:HasTag("level29") then
    inst.components.weapon:SetDamage(68)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (LV29) ]\nÉË º¦ (68)\nÁÙ ½ç (29per)")
        elseif inst:HasTag("level30") then
    inst.components.weapon:SetDamage(70)
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ (Max30) ]\nÉË º¦ (70)\nÁÙ ½ç (30per)")
end
end
end


local function OnLoad(inst, data)
    Upgradedamage(inst)
end

--------
local function cansummon(staff, caster, target, pos)
    local ground = GetWorld()
    if ground and pos then
        local tile = ground.Map:GetTileAtPoint(pos.x, pos.y, pos.z)
        return tile ~= GROUND.IMPASSIBLE and tile < GROUND.UNDERGROUND
    end
    return false
end

local function summoning(staff, target, pos)
local player = GetPlayer()
    local caster = staff.components.inventoryitem.owner
if caster.components.sanity.current >= 40 then
    local light = SpawnPrefab("splash")
    local light2 = SpawnPrefab("tentacle_frost")

    light.Transform:SetPosition(pos.x, pos.y, pos.z)
    light2.Transform:SetPosition(pos.x, pos.y, pos.z)
        light2.components.follower:SetLeader(player)
caster.components.sanity:DoDelta(-30)

    elseif caster.components.sanity.current < 40 then
	player.components.talker:Say("Ã» ÓÐ ×ã ¹» µÄ [ Àí ÖÇ ]..")
        
    end

end


local function onattack_FROST(inst, attacker, target)
local freezechance1 = 0.01
local freezechance2 = 0.02
local freezechance3 = 0.03
local freezechance4 = 0.04
local freezechance5 = 0.05
local freezechance6 = 0.06
local freezechance7 = 0.07
local freezechance8 = 0.08
local freezechance9 = 0.09
local freezechance10 = 0.1
local freezechance11 = 0.11
local freezechance12 = 0.12
local freezechance13 = 0.13
local freezechance14 = 0.14
local freezechance15 = 0.15
local freezechance16 = 0.16
local freezechance17 = 0.17
local freezechance18 = 0.18
local freezechance19 = 0.19
local freezechance20 = 0.2
local freezechance21 = 0.21
local freezechance22 = 0.22
local freezechance23 = 0.23
local freezechance24 = 0.24
local freezechance28 = 0.25
local freezechance26 = 0.26
local freezechance27 = 0.27
local freezechance28 = 0.28
local freezechance29 = 0.29
local freezechance30 = 0.3

local player = GetPlayer()

local expchance = 0.05
local damagedur1 = 0.2
local damagedur2 = 0.5
local damagedur3 = 0.7
local damagedur4 = 1


if math.random() < expchance and not inst:HasTag("broken") then
	inst.level = inst.level + 1
	levelexp(inst)
end
    if target and not inst:HasTag("broken") and math.random() < damagedur1 then
inst.components.fueled:DoDelta(-150000)
    elseif target and not inst:HasTag("broken") and math.random() < damagedur2 then
inst.components.fueled:DoDelta(-75000)
    elseif target and not inst:HasTag("broken") and math.random() < damagedur3 then
inst.components.fueled:DoDelta(-35000)
    elseif target and not inst:HasTag("broken") and math.random() < damagedur4 then
inst.components.fueled:DoDelta(-20000)
    elseif target and inst:HasTag("broken") then
		local fx = SpawnPrefab("splash")
	local pos = Vector3(target.Transform:GetWorldPosition())
fx.Transform:SetPosition(pos:Get())
	inst.components.talker:Say("- ÆÆ ¾É µÄ Îä Æ÷ \nÉË º¦ (1)")
    end

     if target.components.freezable and not player:HasTag("frosta") then
        target.components.freezable:AddColdness(0.15)
        target.components.freezable:SpawnShatterFX()
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance1 and inst:HasTag("level1") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
        target.components.health:DoDelta(-20)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance2 and inst:HasTag("level2") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
        target.components.health:DoDelta(-21)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance3 and inst:HasTag("level3") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
        target.components.health:DoDelta(-22)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance4 and inst:HasTag("level4") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-23)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance5 and inst:HasTag("level5") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-24)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance6 and inst:HasTag("level6") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-25)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance7 and inst:HasTag("level7") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-26)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance8 and inst:HasTag("level8") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-27)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance9 and inst:HasTag("level9") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-28)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance10 and inst:HasTag("level10") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-29)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance11 and inst:HasTag("level11") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-30)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance12 and inst:HasTag("level12") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-31)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance13 and inst:HasTag("level13") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-32)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance14 and inst:HasTag("level14") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-33)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance15 and inst:HasTag("level15") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-34)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance16 and inst:HasTag("level16") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-35)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance17 and inst:HasTag("level17") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-36)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance18 and inst:HasTag("level18") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-37)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance19 and inst:HasTag("level19") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-38)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance20 and inst:HasTag("level20") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-39)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance21 and inst:HasTag("level21") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-40)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance22 and inst:HasTag("level22") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-41)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance23 and inst:HasTag("level23") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-42)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance24 and inst:HasTag("level24") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-43)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance25 and inst:HasTag("level25") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-44)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance26 and inst:HasTag("level26") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-45)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance27 and inst:HasTag("level27") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-46)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance28 and inst:HasTag("level28") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-47)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance29 and inst:HasTag("level29") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-48)
     elseif target.components.freezable and not player:HasTag("frosta") and math.random() < freezechance30 and inst:HasTag("level30") and target.components.health then
        target.components.freezable:AddColdness(1)
        target.components.freezable:SpawnShatterFX()
      target.components.health:DoDelta(-50)

elseif target.components.freezable and player:HasTag("frosta") and not player:HasTag("DLC") then
        target.components.freezable:AddColdness(10)
        target.components.freezable:SpawnShatterFX()
local fx = SpawnPrefab("statue_transition_2")
local pos = Vector3(target.Transform:GetWorldPosition())
	fx.Transform:SetPosition(pos:Get())
		target.components.health:DoDelta(-90)
	player:RemoveTag("frosta") 
elseif target.components.freezable and player:HasTag("frosta") and player:HasTag("DLC") then
        target.components.freezable:AddColdness(10)
        target.components.freezable:SpawnShatterFX()
        attacker.components.sanity:DoDelta(-20)
local fx = SpawnPrefab("groundpoundring_fx")
local pos = Vector3(target.Transform:GetWorldPosition())
	fx.Transform:SetPosition(pos:Get())
		target.components.health:DoDelta(-100)
	player:RemoveTag("frosta") 
    end
    if target.components.sleeper and target.components.sleeper:IsAsleep() then
        target.components.sleeper:WakeUp()
    end
    if target.components.burnable and target.components.burnable:IsBurning() then
        target.components.burnable:Extinguish()
    end
    if target.components.combat then
        target.components.combat:SuggestTarget(attacker)


    end
	player:RemoveTag("frosta") 

end

local function OnDropped(inst,data)
   inst:AddTag("talkf")
    end
local function OnPutInInventory(inst)
   inst:RemoveTag("talkf")
    end

local function onequip(inst, owner) 
local player = GetPlayer()
   inst:AddTag("talkf")
    Upgradedamage(inst)

    owner.AnimState:OverrideSymbol("swap_object", "swap_frosthammer", "swap_umbrella")
    owner.AnimState:Show("ARM_carry") 
    owner.AnimState:Hide("ARM_normal") 
	player:AddTag("frosthammer") 

 --   owner.components.inventory:SetOverflow(inst)
-- inst.components.container:Open(owner)

end

local function onunequip(inst, owner) 
   inst:RemoveTag("talkf")
local player = GetPlayer()
    owner.AnimState:Hide("ARM_carry") 
    owner.AnimState:Show("ARM_normal") 
--    owner.components.inventory:SetOverflow(nil)
    inst.components.container:Close(owner)
	player:RemoveTag("frosthammer") 
	player:RemoveTag("frosta") 
       inst:RemoveComponent("spellcaster")
      inst:RemoveComponent("heater")

 end
 
local function OnOpen(inst)
  inst.SoundEmitter:PlaySound("dontstarve/common/gem_shatter")
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ]\n¼õ ËÙ\nÕÙ »½ ¹Ö Îï\nÀä È´ Ìå ÎÂ\n( ÎÞ ±ù Ïä )")
    inst.components.equippable.walkspeedmult = 0.6
      inst:AddComponent("heater")
     inst.components.heater.iscooler = true
     inst.components.heater.equippedheat = -1
       inst:AddComponent("spellcaster")
    inst.components.spellcaster:SetSpellFn(summoning)
    inst.components.spellcaster:SetSpellTestFn(cansummon)
    inst.components.spellcaster.canuseonpoint = true
    inst.components.spellcaster.canusefrominventory = false
	inst:AddTag("nocool")

end 

local function OnClose(inst) 
  inst.SoundEmitter:PlaySound("dontstarve/common/fireOut")
	inst.components.talker:Say("-[ ±ù Ëª Ö® ´¸ ]\n¼Ó ËÙ\n½µ ÎÂ ±ù Ïä\n\n")
    inst.components.equippable.walkspeedmult = 0.8
       inst:RemoveComponent("spellcaster")
      inst:RemoveComponent("heater")
	inst:RemoveTag("nocool")

end 

local slotpos_2 = {}

for y = 0, 1 do
table.insert(slotpos_2, Vector3(-126, -y*75 + 114 ,-126 +75, -y*75 + 114 ))

	--table.insert(slotpos_2, Vector3(-162, -y*75 + 114 ,0))
	--table.insert(slotpos_2, Vector3( -162 +75, -y*75 + 114 ,0))

end



local function itemtest(inst, item, slot)
	if not item:HasTag("tstonehammer") then
			return true
end
end

local function fn(Sim)

	local inst = CreateEntity()
	local trans = inst.entity:AddTransform()
	local anim = inst.entity:AddAnimState()
	inst.entity:AddSoundEmitter()

    MakeInventoryPhysics(inst)

 --   anim:SetBank("hammer")
    anim:SetBank("umbrella")

    anim:SetBuild("frosthammer")
    anim:PlayAnimation("idle")
     
    inst:AddComponent("weapon")
    inst.components.weapon:SetOnAttack(Upgradedamage)

    inst.components.weapon:SetRange(1.65)
	
  inst.components.weapon:SetOnAttack(onattack_FROST)
  

    inst.OnLoad = OnLoad

    inst:AddComponent("talker")
    inst.components.talker.fontsize = 19
    inst.components.talker.font = TALKINGFONT
    inst.components.talker.colour = Vector3(0.7, 0.85, 1, 1)
    inst.components.talker.offset = Vector3(200,-250,0)
    inst.components.talker.symbol = "swap_object"

    -----
    inst:AddComponent("tool")
    inst.components.tool:SetAction(ACTIONS.HAMMER)
    -------
    -------
    
    inst:AddComponent("inspectable")
    
    inst:AddComponent("inventoryitem")
    inst.components.inventoryitem:SetOnDroppedFn(OnDropped)
    inst.components.inventoryitem:SetOnPutInInventoryFn(OnPutInInventory)
    	inst.components.inventoryitem.atlasname = "images/inventoryimages/frosthammer.xml"
     inst.entity:AddMiniMapEntity()
	inst.MiniMapEntity:SetIcon( "frosthammer.tex" )
   ---------------------  
	inst:AddTag("fridge")
     
     ----------------------
    inst:AddComponent("container")
    inst.components.container.itemtestfn = itemtest
    inst.components.container:SetNumSlots(#slotpos_2)
    inst.components.container.onopenfn = OnOpen
    inst.components.container.onclosefn = OnClose
    
    inst.components.container.widgetslotpos = slotpos_2
    inst.components.container.widgetanimbank = "ui_backpack_2x4"
    inst.components.container.widgetanimbuild = "ui_frostsmall"

   -- inst.components.container.widgetpos = Vector3(120,-180,0)
   -- inst.components.container.widgetpos = Vector3(-5,-50,0)
    inst.components.container.widgetpos = Vector3(-9,75,0)

    inst.components.container.side_widget = true

    --inst.components.container.side_align_tip = 160
   -- inst.components.container.acceptsstacks = false
   -- inst.components.container.type = "pack"

------------------------
        inst:AddComponent("fueled")
       inst.components.fueled.fueltype = "CHEMICAL"
        inst.components.fueled:InitializeFuelLevel(30000000)
       inst.components.fueled:SetDepletedFn(OnDurability)
        inst.components.fueled.ontakefuelfn = TakeItem
        inst.components.fueled.accepting = true
inst.components.fueled:StopConsuming()        

    inst:AddComponent("equippable")

    inst.components.equippable:SetOnEquip( onequip )
    inst.components.equippable:SetOnUnequip( onunequip )

    inst.components.equippable.walkspeedmult = 0.7
    inst.components.equippable.runspeedmult = 0.7

    inst:AddComponent("reticule")
    inst.components.reticule.targetfn = function() 
        return Vector3(GetPlayer().entity:LocalToWorldSpace(5,0,0))
    end
    inst.components.reticule.ease = true

    inst:AddTag("nopunch")
inst:AddTag("level1")
	inst.level = 0
inst:ListenForEvent("levelup", levelexp)
	inst.OnSave = onsave
	inst.OnPreLoad = onpreload

    return inst
end


return Prefab( "common/inventory/frosthammer", fn, assets, prefabs) 
