local function F(F)F=string.lower(F)if F=="\101"then local F=time()if F>LastSummonTime+SUMMON_COOLDOWN then LastSummonTime=F local T=MyModel:FindFirstChild("\072\117\109\097\110\111\105\100")if T then T.WalkSpeed=0 end Spawn(function()for F=1,3,1 do if GongSound then GongSound:Play()end wait(1.5)end end)if SummonTrack then SummonTrack:Play()wait(3.125)end RaiseSkeletons()wait(1)if T then T.WalkSpeed=18 end end end end local function T(T)MyModel=Tool.Parent T.KeyDown:connect(F)local r=MyModel:FindFirstChild("\072\117\109\097\110\111\105\100")if r then SummonTrack=r:LoadAnimation(SummonAnimation)end end local function r()if SummonTrack then SummonTrack:Stop()end end
--NOTE: Ugly!
local function OnKeyDown(key)
	key = string.lower(key)
	if key == "e" then
		local now = time()
		if now > LastSummonTime + SUMMON_COOLDOWN then
			LastSummonTime = now
			local humanoid = MyModel:FindFirstChild("Humanoid")
			if humanoid then
				humanoid.WalkSpeed = 0
			end
			Spawn(function()
				for i = 1, 3 do
					if GongSound then
						GongSound:Play()
					end
					wait(1.5)
				end
			end)
			if SummonTrack then
				SummonTrack:Play()
				wait(3.125)
			end
			RaiseSkeletons()
			wait(1)
			if humanoid then
				humanoid.WalkSpeed = 18
			end
		end
	end
end

local function OnEquipped(mouse)
	MyModel = Tool.Parent
	mouse.KeyDown:connect(OnKeyDown)

	local humanoid = MyModel:FindFirstChild("Humanoid")
	if humanoid then -- Preload animations
		SummonTrack = humanoid:LoadAnimation(SummonAnimation)
	end
end

local function OnUnequipped()
	if SummonTrack then
		SummonTrack:Stop()
	end
end
