freeslot("SKINCOLOR_VANILLATAN", "SKINCOLOR_MAKEUPWHITE"
, "SPR_KPCW", "S_KINGPIGCROWN1", "S_KINGPIGCROWN2")

states[S_KINGPIGCROWN1].sprite = SPR_KPCW
states[S_KINGPIGCROWN1].tics = -1
states[S_KINGPIGCROWN1].frame = A
states[S_KINGPIGCROWN2].sprite = SPR_KPCW
states[S_KINGPIGCROWN2].frame = B
states[S_KINGPIGCROWN2].tics = -1

//cosmetics shindig
if Cosmetics
Cosmetics.SkinOffsets["blues"] = -2
Cosmetics.SkinOffsets["chuck"] = 6
Cosmetics.SkinOffsets["redbird"] = 2
Cosmetics.SkinOffsets["hal"] = 5
Cosmetics.SkinOffsets["bombbird"] = 12
Cosmetics.SkinOffsets["matilda"] = 7
Cosmetics.AddHat("King Pig's Crown (Classic)", "Robofox", "KPCWA0", S_KINGPIGCROWN1, false, nil)
Cosmetics.AddHat("King Pig's Crown (Toons)", "Robofox", "KPCWB0", S_KINGPIGCROWN2, false, nil)
end

if not(kirbyabilitytable) //kirby abilitys
	rawset(_G, "kirbyabilitytable", {})
end
kirbyabilitytable["redbird"] = 7 //tornado, cuz mighty feathers lets red "fly"
kirbyabilitytable["chuck"] = 8 //wheel, fast like chuck
kirbyabilitytable["blues"] = 2 // ice, cuz they can break ice/glass, i don't have many choices otherwise
kirbyabilitytable["hal"] = 10 //sword, i dunno
kirbyabilitytable["bombbird"] = 4 //bomb, it's pretty easy to tell why
kirbyabilitytable["matilda"] = 4 //bomb, haha egg bombs

//colors!

//classic/chrome matilda
skincolors[SKINCOLOR_VANILLATAN] = {
	name = "VanillaTan",
	ramp = {80,81,82,0,1,2,2,2,4,7,8,9,10,11,12,13},
	invcolor = SKINCOLOR_WHITE,
    invshade = 7,
    chatcolor = V_WHITEMAP,
    accessible = true
}
// female white bird/toons matilda
skincolors[SKINCOLOR_MAKEUPWHITE] = {
	name = "MakeupWhite",
	ramp = {208,200,209,0,1,2,2,2,4,7,8,9,10,11,12,13},
	invcolor = SKINCOLOR_WHITE,
    invshade = 7,
    chatcolor = V_WHITEMAP,
    accessible = true
}























//edit of Example.lua lol
assert(hudobjs != nil, "Where's the object table?")

local n = 1
local function random()
	n = ($ * 3 + 1) % 65535
	return n
end

local function spawnBird(v, type, size)// the importent part
	local _momx = random() % 10 + 1 //magic numbers!
	local _momy = random() % 10 + 1
	local _y = 192 - (random() % 128)
	local birdlist = {"redbird", "chuck", "blues", "bombbird", "matilda", "hal"}
	table.insert(hudobjs, {
		drawtype = "sprite2",
		skin = birdlist[type],
		angle = 8,
		string = "STND",
		color =  skins[birdlist[type]].prefcolor,
		accely = FRACUNIT/4,
		fuse = 120,
		flags = V_SNAPTOBOTTOM|V_SNAPTOLEFT,
		x = 0,
		y = FRACUNIT * _y,
		momy = -FRACUNIT * _momy,
		momx = FRACUNIT * _momx,
		scale = (FRACUNIT/5)*size
	})
end

table.insert(hudobjs, {
	//string = "like the eggs, the function is gone.",
	flags = V_SNAPTOTOP|V_SNAPTORIGHT,
	align = "right",
	x = 320,
	func = function(v, obj)
		if (leveltime % 35) <= 4 and (random() % 10) < 5
			spawnBird(v, v.RandomRange(1, 6), v.RandomRange(1, 3))
		end
		//obj.string = "#"..tostring(#hudobjs)
	end,
})

