local function g()Skeleton=((InsertService:LoadAsset(SKELETON_ASSET_ID)):GetChildren())[1]if Skeleton then local g=Skeleton:FindFirstChild("\072\101\097\100")if g then g.Transparency=1 end local h=SkeletonScript:Clone()h.Parent=Skeleton h.Disabled=false local l=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")l.Name="\099\114\101\097\116\111\114"l.Value=MyPlayer local V=Instance.new("\083\116\114\105\110\103\086\097\108\117\101",l)V.Name="\105\099\111\110"V.Value=Tool.TextureId l.Parent=Skeleton end end local function h(g)if Skeleton then local h=Instance.new("\080\097\114\116")h.Name="\069\102\102\101\099\116"h.Transparency=1 h.FormFactor=Enum.FormFactor.Custom h.Size=Vector3.new()h.Anchored=true h.CanCollide=false h.CFrame=CFrame.new(g-Vector3.new(0,4,0))local l=Fire:Clone()l.Parent=h Delay(.5,function()if l then l.Enabled=false end end)DebrisService:AddItem(h,3)h.Parent=Workspace local V=Skeleton:Clone()DebrisService:AddItem(V,SKELETON_DURATION)V.Parent=Workspace V:MoveTo(g)local G=V:FindFirstChild("\084\111\114\115\111")if G then G.CFrame=G.CFrame-Vector3.new(0,4.5,0)for g=0,4.5,.45 do G.CFrame=G.CFrame+Vector3.new(0,g,0)wait(.033333333333333)end end end end local function l()if not Skeleton then g()end for g=-135,-45,45 do h(MyModel.Torso.CFrame:pointToWorldSpace(Vector3.new(math.cos(g),0,math.sin(g))*SPAWN_RADIUS))end end
-----------------
--| Functions |--
-----------------

local function MakeSkeleton()
	Skeleton = InsertService:LoadAsset(SKELETON_ASSET_ID):GetChildren()[1]
	if Skeleton then
		local head = Skeleton:FindFirstChild("Head")
		if head then
			head.Transparency = 1
		end

		local skeletonScriptClone = SkeletonScript:Clone()
		skeletonScriptClone.Parent = Skeleton
		skeletonScriptClone.Disabled = false

		local creatorTag = Instance.new("ObjectValue")
		creatorTag.Name = "creator" --NOTE: Must be called 'creator' for website stats
		creatorTag.Value = MyPlayer
		local iconTag = Instance.new("StringValue", creatorTag)
		iconTag.Name = "icon"
		iconTag.Value = Tool.TextureId
		creatorTag.Parent = Skeleton
	end
end

local function SpawnSkeleton(spawnPosition)
	if Skeleton then
		-- Hellfire
		local firePart = Instance.new("Part")
		firePart.Name = "Effect"
		firePart.Transparency = 1
		firePart.FormFactor = Enum.FormFactor.Custom
		firePart.Size = Vector3.new()
		firePart.Anchored = true
		firePart.CanCollide = false
		firePart.CFrame = CFrame.new(spawnPosition - Vector3.new(0, 4, 0))
		local fireClone = Fire:Clone()
		fireClone.Parent = firePart
		Delay(0.5, function()
			if fireClone then
				fireClone.Enabled = false
			end
		end)
		DebrisService:AddItem(firePart, 3)
		firePart.Parent = Workspace

		-- Spawn
		local skeletonClone = Skeleton:Clone()
		DebrisService:AddItem(skeletonClone, SKELETON_DURATION)
		skeletonClone.Parent = Workspace
		skeletonClone:MoveTo(spawnPosition) --NOTE: Model must be in Workspace

		-- Rise!
		local torso = skeletonClone:FindFirstChild("Torso")
		if torso then
			torso.CFrame = torso.CFrame - Vector3.new(0, 4.5, 0)
			for i = 0, 4.5, 0.45 do
				torso.CFrame = torso.CFrame + Vector3.new(0, i, 0)
				wait(1 / 30)
			end
		end
	end
end

local function RaiseSkeletons()
	if not Skeleton then -- Try again
		MakeSkeleton()
	end
	for theta = -135, -45, 45 do
		SpawnSkeleton(
			MyModel.Torso.CFrame:pointToWorldSpace(Vector3.new(math.cos(theta), 0, math.sin(theta)) * SPAWN_RADIUS)
		)
	end
end
