-- << LOCAL FUNCTIONS >>

local defaultSettingsToAdd = {"NoticeSoundId", "NoticeVolume", "NoticePitch", "ErrorSoundId", "ErrorVolume", "ErrorPitch", "AlertSoundId", "AlertVolume", "AlertPitch", "Prefix", "SplitKey"}
local defaultSettings = {}
coroutine.wrap(function()
	if not main.initialized then
		main.client.Signals.Initialized.Event:Wait()
	end
	for i,v in pairs(defaultSettingsToAdd) do
		defaultSettings[v] = settings[v]
	end
end)()
local function getDataTemplate()
	if not main.initialized then
		main.client.Signals.Initialized.Event:Wait()
	end
	return{
		
		DataKey 		= 0;
		DataToUpdate	= true;
		Theme			= settings.Theme;
		NoticeSoundId	= settings.NoticeSoundId;
		NoticeVolume	= settings.NoticeVolume;
		NoticePitch		= settings.NoticePitch;
		ErrorSoundId	= settings.ErrorSoundId;
		ErrorVolume		= settings.ErrorVolume;
		ErrorPitch		= settings.ErrorPitch;
		AlertSoundId	= settings.AlertSoundId;
		AlertVolume		= settings.AlertVolume;
		AlertPitch		= settings.AlertPitch;
		Prefix 			= settings.Prefix;
		SplitKey		= settings.SplitKey;
		MusicList 		= settings.MusicList;
		MuteLocalSound	= false;
		PreviousServer 	= game.JobId;
		Rank 			= 0;
		SaveRank		= false;
		PermRankedBy	= 3682;
		Donor 			= false;
		Gamepasses 		= {};
		Assets 			= {};
		
		DefaultSettings = defaultSettings; --If the owner changes these Settings, then update everyones data to the new setting.
		
		Groups 			= {};
		Friends 		= {};
		CommandsActive 	= {};
		LaserColor 		= Color3.fromRGB(255,0,0);
		PromptedDonor	= false;
		AutomaticRank	= false;
		Items 			= {};
		SetupData		= false;
		
	}
end

local function dataNotToSave()
	return{
		"Groups";
		"Friend";
		"CommandsActive";
		"LaserColor";
		"PromptedDonor";
		"AutomaticRank";
		"Items";
		"SetupData"
	}
end


