-- Initialize

function PointsService:KnitInit()

    local rng = Random.new()

    -- Give player random amount of points:
    self.Client.GiveMePoints:Connect(function(player)
        local points = rng:NextInteger(0, 10)
        self:AddPoints(player, points)
        print("Gave " .. player.Name .. " " .. points .. " points")
    end)

    -- Clean up data when player leaves:
    game:GetService("Players").PlayerRemoving:Connect(function(player)
        self.PointsPerPlayer[player] = nil
		print("Cleaned up "..player.Name.."'s data because they left!")
    end)

end

return PointsService
