-- Local Functions

local function setupPlayerStats(player)
	local character = player.Character or player.CharacterAdded:wait()
	local humanoid = character:WaitForChild("Humanoid")	
	
	local stats = Instance.new("Folder")
	stats.Name = "stats"
	stats.Parent = player
 
	local points = Instance.new("NumberValue")
	points.Name = GameSettings.pointsName
	points.Value = DataStore:GetCurrentPoints(player)
	points.Parent = stats

	local totalpoints = Instance.new("IntValue")
	totalpoints.Name = "Total" .. GameSettings.pointsName
	totalpoints.Value = DataStore:GetTotalPoints(player)
	totalpoints.Parent = stats
	
	local upgrade = Instance.new("IntValue")
	upgrade.Name = GameSettings.upgradeName
	upgrade.Value = DataStore:GetUpgrades(player)
	upgrade.Parent = stats
end
