if CLIENT then
//creates the convars to allow other files to sue these variables.
CreateClientConVar("snow_max_flakes", "-1", true, false)
CreateClientConVar("snow_skybox", "1", true, false)

CreateClientConVar( "snow_colr", 255, true, false )
CreateClientConVar( "snow_colg", 255, true, false )
CreateClientConVar( "snow_colb", 255, true, false )
CreateClientConVar( "snow_alpha", 100, true, false )

//////////////////////////////////////
//////////// Derma Crap //////////////
//////////////////////////////////////
function SnowControlPanel( Panel )
	Panel:ClearControls()
	Panel:AddHeader()
	Panel:AddControl("Label", {
		Text = "Snowflake Color:",
		Description = "...",
	})
	local ColorSelector = Panel:AddControl("Color", {
		Label = "Snow Color",
		Red = "snow_colr",
		Green = "snow_colg",
		Blue = "snow_colb",
		Alpha = "snow_alpha",
		ShowHSV = "1",
		ShowRGB = "1",
		Multiplier = "255",
	})	
	ColorSelector:SetToolTip("Color is obvious, but for transperancy I'd recommend 25-50 for dark maps/rooms and 100+ for brighter maps and rooms.")

	local SnoflakeCount = Panel:AddControl("Slider", {
		Label = "Max Snowflakes",
		Command = "snow_max_flakes",
		Type = "Integer",
		min = "-1",
		max = "1000",
	})
	SnoflakeCount:SetToolTip("You can't physicly have more then ~500 flakes on screen due to how my code handles them. If you dont care for the nmber, set it to -1. For shittier pc, set it bellow 200.")
	
	local SnowButton = Panel:AddControl("Button", {
		Label = "Turn Snow On/Off",
		Text = "...",
		Command = "snow_skybox",
	})
	SnowButton:SetToolTip("This is kinda obvious....")
	SnowButton.DoClick = function()
		RunConsoleCommand("snow_power")
		RunConsoleCommand("snow_skyboxswap")
	end
	
	Panel:AddControl("Label",{
		Text = "Note: All of these settings, are *NOT* applied instantly to all flakes, only NEW ones that have been spawned. Ie: Setting the color to red will only make new flakes red, and turning it off will stop spawning of new flakes, but old ones will finish their cycle."
	})
end
function SnowPanelCreate()
	spawnmenu.AddToolMenuOption(
		"Options",
		"Sabreman's Tools",
		"Snow Script",
		"#Snow Script Control Panel",
		"",
		"",
		SnowControlPanel )
end
end